Environment
This page is the canonical runtime configuration reference for the repo.Local setup
Copy the example files before starting the workspace:Required Supabase variables
NEXT_PUBLIC_SUPABASE_URLfor any runtime that creates a Supabase clientNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYfor browser and request-scoped clientsSUPABASE_SECRET_KEYfor server-only admin access
Required Meta variables for real sends and webhook verification
WHATSAPP_META_ACCESS_TOKENfor worker-side outbound dispatch against the Meta Graph APIWEBHOOK_SIGNATURE_SECRETfor validatingx-hub-signature-256on inbound webhooksMETA_WEBHOOK_VERIFY_TOKENif you want deterministic challenge verification for the Meta webhook handshake
Accepted legacy aliases
The repo still accepts these while integrations are being migrated:NEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
Data mode switch
WHATSAPP_PLATFORM_DATA_MODE=mockkeeps the operator app, API routes, and docs running against the typed in-memory storeWHATSAPP_PLATFORM_DATA_MODE=supabaseenables the Supabase-backed data path where implemented
mock mode by default.
Optional variables
SUPABASE_DB_URLfor direct Postgres tooling, migrations, and server-side jobs that need the connection string. It is also required if you want workspace-managed provider secrets to be stored in Supabase Vault from the product UI.WHATSAPP_META_API_VERSIONto override the default Graph API version. The repo defaults tov25.0.WORKSPACE_BOOTSTRAP_ADMIN_EMAILSas a comma-separated list of emails allowed to bootstrap privileged workspace access without an invite.WORKSPACE_ALLOW_FIRST_CLAIMto permit a single first-user owner claim when no workspace members exist yet. Default behavior is disabled unless you explicitly set this totrue.DEFAULT_WORKSPACE_SLUGfor bootstrapping the default workspace contextDEFAULT_CHANNEL_WABA_ID,DEFAULT_CHANNEL_PHONE_NUMBER_ID,DEFAULT_CHANNEL_PHONE_E164, andDEFAULT_CHANNEL_DISPLAY_NAMEfor default channel metadata
Deployment split
- Vercel-hosted
apps/web,apps/app, andapps/apishould receive the public Supabase variables they need for their runtime path - server runtimes such as
apps/api,apps/worker, andapps/control-planealso needSUPABASE_SECRET_KEY apps/workeron Railway needsWHATSAPP_META_ACCESS_TOKENfor real provider dispatchapps/apion Vercel needsWEBHOOK_SIGNATURE_SECRETfor signed webhook ingestion in the current alpha posture- only server runtimes should receive
SUPABASE_DB_URL - the operator app server needs
SUPABASE_DB_URLif you want/setupandSettings -> Providerto store or rotate workspace-managed secrets - the operator app server also needs
WORKSPACE_BOOTSTRAP_ADMIN_EMAILSif you want the first privileged operator path to be explicit instead of invite-only - if a first authenticated operator reaches
/pending-accesswith zero workspace members, recover by settingWORKSPACE_BOOTSTRAP_ADMIN_EMAILS, temporarily enablingWORKSPACE_ALLOW_FIRST_CLAIM=true, or manually provisioning theworkspace_membersrow; deleting the auth user is not required apps/control-planeremains in the repo but is not part of the current hosted alpha contract unless the ingress decision changes