Getting Started
Environment Variables
Required and optional environment variables for local development.
Environment Variables
Required
| Variable | Purpose | Example |
|---|---|---|
MONGODB_URI | MongoDB connection string | mongodb://localhost:27017/questionnaire |
Development (localhost)
| Variable | Purpose | Default |
|---|---|---|
DEV_TENANT_DOMAIN | Domain used to look up tenant on localhost | getbestanswers.com |
DEV_TENANT_ID | Fallback tenant lookup by ID if domain fails | — |
How tenant resolution works on localhost
Tenant-specific config (in MongoDB, not env)
These are stored on the Tenant document, not in .env:
adConfig— GAM network code, ad units, KV values, AdSense publisher IDpixelConfig— Google/Meta pixel IDs, conversion IDstaboolaConfig— Taboola publisher ID, widget placementpushAlertConfig— Push notification scripts
See Data Models for the full schema.