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/)
| Name | SSM Type | Description | Default |
|---|---|---|---|
API_HOST | String | Bind address | 0.0.0.0 |
API_PORT | String | Listen port | 3000 |
LOG_LEVEL | String | Pino log level | info |
MONGO_CONNECTION_STRING | SecureString | MongoDB connection URI | — |
MONGO_MAX_POOL_SIZE | String | Mongoose connection pool size | 5 |
DATABASE_NAME | String | Primary DB name (canvases, widgets, conversations) | dgi-ai-charts |
AUTH_DATABASE_NAME | String | Auth DB name (read-only mirror from dtcea) | dtcea-mumbai-demo |
AUTH_DB_MAX_POOL_SIZE | String | Auth DB connection pool size | 5 |
CERBOS_URL | String | Cerbos gRPC endpoint | localhost:3593 |
albIpCidr | String | ALB IP CIDR for trusted proxy | (empty) |
CLAUDE_API_KEY | SecureString | Anthropic API key for AI chart generation | — |
DEFAULT_LLM | String | Primary model ID for AI chart/table generation | — |
FALLBACK_LLM | String | Fallback model ID — used if primary fails or returns no tool use | — |
DATA_DIR | String | Path to DuckDB data directory | /data |
CANVAS_LIMIT_PER_USER | String | Max canvases a non-admin user can create | 15 |
GCS_BUCKET | String | GCS bucket name for DuckDB data file | grid-intelligence-demo |
GCS_OBJECT_KEY | String | GCS object path for DuckDB data file | duckdb/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:
| Name | Description |
|---|---|
NODE_ENV | Node environment (development) |
LOCAL | Set to true to bypass SSM and use process.env |
TEST_MONGO_URI | MongoDB URI for test database |
SSM_PARAMETER_PATH | SSM path prefix (e.g. /dev/dgi-ai-widgets) |
ROLE_ARN_AWS | AWS IAM role ARN for web identity federation |
AUDIENCE_SERVICE_ACCOUNT | GCP audience for ID token |
TARGET_SERVICE_ACCOUNT | GCP service account to impersonate locally |
CLOUDSDK_ACTIVE_CONFIG_NAME | gcloud config profile name |
FETCH_CONFIG_FROM_S3 | Script workspace: fetch config from S3 or local file |
Adding a New Variable
When introducing a new environment variable, complete all of these steps:
- SSM Parameter Store — add the
put_stringorput_securecall toapi/ssm/setup-dev.sh(and equivalent scripts for other environments when they exist) .envrcand.envrc.example— add the variable with a dev default (.envrc) and a blank placeholder (.envrc.example)api/src/utils/envVars.js— export the variable fromssmParams- This document — add a row to the table above with name, SSM type, description, and default