Skip to main content

Environment Variables

Configuration is validated with Zod at startup (packages/core/src/config.schema.ts); an invalid value fails fast rather than falling back silently.

API (apps/api/.env.local)

VariableDefaultPurpose
NODE_ENVdevelopment | production
PORT3000HTTP port
LOG_LEVELinfopino log level
MONGO_URIMongoDB connection string
MONGO_DB_NAMEDatabase name
REDIS_HOST, REDIS_PORT, REDIS_PASSWORDBullMQ / Redis connection
CORS_ORIGINComma-separated allowed origins

Worker (apps/worker/.env.local)

VariableDefaultPurpose
NODE_ENV, PORT (3002), LOG_LEVEL, MONGO_URI, MONGO_DB_NAME, REDIS_HOST, REDIS_PORT, REDIS_PASSWORDSame meaning as the API's
BROWSER_POOL_MAX4Max concurrent pooled browser processes; see Browser Execution and Pooling
CHALLENGER_CONFIG_CACHE_TTL_MS3000How long the Challenger dispatcher caches extension config/enable flags before re-reading them; 0 disables caching for strictly live toggles
CHALLENGER_ALLOWED_CAPABILITIESunset (all allowed)Comma-separated allowlist of ChallengerCapability values

Web (apps/web)

VariableDefaultPurpose
NEXT_PUBLIC_API_URLhttp://localhost:3000Base URL the admin UI calls

Admin and notification (module-level tuning, safe defaults)

ADMIN_DASHBOARD_DEFAULT_LIST_LIMIT, ADMIN_WORKER_HEARTBEAT_INTERVAL_MS, ADMIN_WORKER_HEALTHY_THRESHOLD_MS, ADMIN_WORKER_STALE_THRESHOLD_MS, ADMIN_WORKER_SUPPORTED_MODULES, ADMIN_WORKER_SUPPORTED_QUEUES, NOTIFICATION_DEFAULT_LIST_LIMIT — module-owned tuning knobs with safe defaults; only set these when you need to change the behavior.

Never commit .env.local files. Local-only overrides belong there, not in version control.