SOMA docs
Ops

Environment variables

What every env var does and where it's required.

Secrets live in Doppler (project soma, config prod). The same values are pushed to Vercel via vercel env add. Local dev uses doppler run -- pnpm dev.

Required — app won't start without these

VarPurpose
DATABASE_URLSupabase Postgres (session pooler URL, IPv4-compatible)
DATABASE_URL_SERVICE_ROLESame pooler URL for backend operations (bypass RLS)
NEXT_PUBLIC_SUPABASE_URLSupabase origin (browser client)
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase publishable key
SUPABASE_SERVICE_ROLE_KEYSupabase secret key (server-side admin)
ANTHROPIC_API_KEYClaude models
VOYAGE_API_KEYVoyage embeddings + rerank
INNGEST_EVENT_KEYInngest event signing
INNGEST_SIGNING_KEYInngest webhook signature verification
OAUTH_ENCRYPTION_KEYAES-GCM-256 (base64) — encrypts OAuth tokens at rest
TELEGRAM_BOT_TOKENgrammY bot token
TELEGRAM_WEBHOOK_SECRETVerifies Telegram webhook callers
GOOGLE_OAUTH_CLIENT_IDGoogle OAuth (Gmail + Calendar data access)
GOOGLE_OAUTH_CLIENT_SECRETSame
GMAIL_PUBSUB_TOKENVerifies Google Pub/Sub webhook pushes

Optional — graceful degradation

These enable features. Missing = no-op.

VarEnables
LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URLLLM tracing
SENTRY_DSN, NEXT_PUBLIC_SENTRY_DSNError tracking
SENTRY_ORG, SENTRY_PROJECT, SENTRY_AUTH_TOKENSource map upload at build time
POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_HOSTProduct analytics
AXIOM_TOKEN, AXIOM_DATASETLog shipping
OPENAI_API_KEYWhisper voice transcription
SLACK_OAUTH_CLIENT_ID, SLACK_OAUTH_CLIENT_SECRETSlack integration
DEV_USER_IDlocal only — bypass auth during dev. Ignored when NODE_ENV=production.

Non-secret config

VarDefault
SOMA_SERVICEsoma
LOG_LEVELinfo prod, debug dev
PORT3000
GIT_SHA(CI-set for Sentry release tagging)

:::caution Do not set NODE_ENV in Doppler. Next.js requires development for next dev and production for next build. Letting Next manage it avoids a prerender crash (<Html> should not be imported outside of pages/_document) on /_error fallback pages. :::

Local development

doppler setup  # pick project=soma, config=prod (for MVP we share prod secrets)
doppler run -- pnpm dev

Optionally set DEV_USER_ID=<uuid> to bypass Supabase auth locally. Generate one via pnpm db:seed-dev-user after running pnpm db:setup.