Skip to content

Configuration

Derma Consent is configured through environment variables. Copy .env.example to .env and adjust values for your deployment.

Required Variables

These must be set for the application to start:

VariableDescription
DATABASE_URLPostgreSQL connection string
AUTH_SECRETJWT signing secret (random 64+ character string)
FRONTEND_URLPublic URL of the frontend (e.g., https://app.example.com)
NEXT_PUBLIC_API_URLPublic URL of the backend API (e.g., https://api.example.com)

Optional Variables

Backend Server

VariableDefaultDescription
BACKEND_PORT3001Port for the NestJS server

Stripe (Billing)

VariableDescription
STRIPE_SECRET_KEYStripe secret API key
STRIPE_WEBHOOK_SECRETWebhook signing secret
STRIPE_PLATFORM_FEE_PERCENTPlatform fee percentage (default: 5)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripe publishable key (frontend)

Leave Stripe variables empty to run without billing features.

Email (Resend)

VariableDescription
RESEND_API_KEYAPI key from resend.com

Without this, email features (consent links, team invites) will be disabled.

File Storage (Supabase)

VariableDescription
SUPABASE_URLSupabase project URL
SUPABASE_SERVICE_KEYService role key
SUPABASE_ANON_KEYAnonymous key

Without Supabase, PDF storage falls back to local filesystem.

OAuth Providers

OAuth providers auto-register when their environment variables are set:

ProviderVariables
GoogleGOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
Microsoft EntraAZURE_AD_CLIENT_ID, AZURE_AD_CLIENT_SECRET, AZURE_AD_TENANT_ID
AppleAPPLE_ID, APPLE_SECRET

Credentials-based login (email + password) is always available regardless of OAuth configuration.

Full Reference

See Environment Variables Reference for the complete table with all variables, defaults, and descriptions.

DSGVO-konforme digitale Einwilligungen