Skip to main content

Environment Variables

All application config is loaded from AWS SSM Parameter Store at startup (see common/src/utils/SSMParams.js). For local development, set LOCAL=true in .envrc and the loader falls back to process.env.

API Parameters

SSM path prefix: {SSM_PARAMETER_PATH}/api/ (e.g. /dev/dgi-ai-widgets/api/)

NameSSM TypeDescriptionDefault
API_HOSTStringBind address0.0.0.0
API_PORTStringListen port3000
LOG_LEVELStringPino log levelinfo
MONGO_CONNECTION_STRINGSecureStringMongoDB connection URI
MONGO_MAX_POOL_SIZEStringMongoose connection pool size5
DATABASE_NAMEStringPrimary DB name (canvases, widgets, conversations)dgi-ai-charts
AUTH_DATABASE_NAMEStringAuth DB name (read-only mirror from dtcea)dtcea-mumbai-demo
AUTH_DB_MAX_POOL_SIZEStringAuth DB connection pool size5
CERBOS_URLStringCerbos gRPC endpointlocalhost:3593
albIpCidrStringALB IP CIDR for trusted proxy(empty)
CLAUDE_API_KEYSecureStringAnthropic API key for AI chart generation
DEFAULT_LLMStringPrimary model ID for AI chart/table generation
FALLBACK_LLMStringFallback model ID — used if primary fails or returns no tool use
DATA_DIRStringPath to DuckDB data directory/data
CANVAS_LIMIT_PER_USERStringMax canvases a non-admin user can create15
GCS_BUCKETStringGCS bucket name for DuckDB data filegrid-intelligence-demo
GCS_OBJECT_KEYStringGCS object path for DuckDB data fileduckdb/data.duckdb

Local-Only Variables

These are set in .envrc but are not stored in SSM — they control local dev behavior or AWS credential bootstrapping:

NameDescription
NODE_ENVNode environment (development)
LOCALSet to true to bypass SSM and use process.env
TEST_MONGO_URIMongoDB URI for test database
SSM_PARAMETER_PATHSSM path prefix (e.g. /dev/dgi-ai-widgets)
ROLE_ARN_AWSAWS IAM role ARN for web identity federation
AUDIENCE_SERVICE_ACCOUNTGCP audience for ID token
TARGET_SERVICE_ACCOUNTGCP service account to impersonate locally
CLOUDSDK_ACTIVE_CONFIG_NAMEgcloud config profile name
FETCH_CONFIG_FROM_S3Script workspace: fetch config from S3 or local file

Adding a New Variable

When introducing a new environment variable, complete all of these steps:

  1. SSM Parameter Store — add the put_string or put_secure call to api/ssm/setup-dev.sh (and equivalent scripts for other environments when they exist)
  2. .envrc and .envrc.example — add the variable with a dev default (.envrc) and a blank placeholder (.envrc.example)
  3. api/src/utils/envVars.js — export the variable from ssmParams
  4. This document — add a row to the table above with name, SSM type, description, and default