Skip to main content

Configuration & Environments

Environment model

APP_ENV is the master switch — production, development, or local. It selects which domain set and external endpoints a node uses. The API asserts that its APP_DOMAIN belongs to the allowed set for its APP_ENV at startup (assertFqdnConsistency) and exits on mismatch, so a development image can never boot against production DNS, and vice-versa.

NodeProductionDevelopment
App (ftm-web)app.illumera.usdevapp.illumera.us
APIapi.illumera.usapid.illumera.us
Marketing (www)www.illumera.uswwwd.illumera.us
Docs (this site)docs.illumera.usdocd.illumera.us

Email sender addresses are derived from APP_DOMAIN, so a development environment never sends mail from a production address.

Environment variables

Auto-generatedBuilt from .env.example at deploy time. To change it, edit the source — not this page.

The reference below is generated from the repository's .env.example. Each variable is tagged by when it's needed:

  • Runtime — required to run the full application (or the noted feature) in a real environment.
  • Test — required only for a specific test suite.
  • Optional — has a safe default or enhances functionality.

Core application

VariableRequiredExampleDescription
APP_ENVOptionaldevelopmentApplication environment: development | staging | production Defaults to "development" when absent.
NODE_ENVOptionaldevelopmentNode.js environment — always set to "development" for local work. Defaults to "development".
PORTOptional3001Port the API server binds to. Defaults to 3001.
APP_DOMAINRuntimehttp://localhost:3001Public domain of the deployed app (used for CORS and email links). Required for invite emails and CORS in non-dev environments.
CORS_ORIGINSRuntimehttp://localhost:5173Comma-separated list of allowed CORS origins. Required when frontend and API run on different origins.

Database

VariableRequiredExampleDescription
DATABASE_URLTestpostgresql://postgres:postgres@localhost:5432/illumera_devPostgreSQL connection string. Required only for m4a-schema-foundation.test.ts (DB integration test). All other tests mock the database — this is NOT needed for pnpm test:unit. Required to run the API server.

Authentication (Clerk)

VariableRequiredExampleDescription
CLERK_SECRET_KEYRuntimesk_test_REPLACE_MEClerk secret key — keep this out of version control. Required — the API server validates all requests using this key.
CLERK_PUBLISHABLE_KEYRuntimepk_test_REPLACE_MEClerk publishable key — safe to expose to the browser. Required by the web frontend.
CLERK_WEBHOOK_SECRETRuntimewhsec_REPLACE_MEClerk webhook signing secret — used to verify incoming webhook payloads. Required if you use Clerk webhooks (user sync, etc.).

Internal secrets

VariableRequiredExampleDescription
INTERNAL_API_SECRETRuntimeREPLACE_ME_internal_api_secretShared secret for internal service-to-service calls (e.g. PDF worker → API). Required when PDF generation is enabled.
BOOTSTRAP_SECRETOptionalREPLACE_ME_bootstrap_secretBootstrap secret — grants temporary admin access for initial setup. Leave unset in production after initial bootstrap is complete.

AI integrations

VariableRequiredExampleDescription
AI_INTEGRATIONS_ANTHROPIC_BASE_URLRuntimehttps://api.anthropic.comBase URL for Replit-proxied Anthropic access (used in production on Replit). Required for AI features that use the Replit AI integration proxy.
ANTHROPIC_API_KEYRuntimeREPLACE_ME_anthropic_api_keyDirect Anthropic API key — used when not routing through the Replit proxy. Required for AI resume parsing and capability AI features.
OPENAI_API_KEYOptionalREPLACE_ME_openai_api_keyOpenAI API key — used for embeddings or any OpenAI-backed features. Leave unset if no OpenAI features are active.

Email (Resend)

VariableRequiredExampleDescription
RESEND_API_KEYRuntimere_REPLACE_MEResend API key for transactional email. Required for sending invitation, welcome, and notification emails.
RESEND_WEBHOOK_SECRETOptionalREPLACE_ME_resend_webhook_secretResend webhook signing secret — validates inbound delivery event webhooks. Only needed if you process delivery/bounce webhooks.

Object storage (S3-compatible)

VariableRequiredExampleDescription
S3_BUCKETRuntimeillumera-devS3 bucket name. Required for avatar uploads, resume storage, and report exports.
S3_REGIONOptionalus-east-1AWS/S3 region.
S3_ENDPOINTOptionalS3-compatible endpoint URL (leave blank to use AWS default). Set this when using a non-AWS provider such as Cloudflare R2 or MinIO.
S3_PUBLIC_URLOptionalhttps://your-bucket.s3.amazonaws.comPublic base URL for serving stored objects.
ILLUMERA_DOWNLOAD_TOKEN_SECRETOptionalREPLACE_ME_random_hex_secretHMAC-SHA256 secret for signing marketing capability-statement download tokens (ALN-MKTG-P3). Generate with: openssl rand -hex 32
AWS_ACCESS_KEY_IDOptionalREPLACE_ME_access_key_idAWS credentials.
AWS_SECRET_ACCESS_KEYOptionalREPLACE_ME_secret_access_key
S3_PRESIGN_EXPIRYOptional3600Presigned URL expiry in seconds (default: 3600 = 1 hour).
S3_FORCE_PATH_STYLEOptionalfalseSet to "true" when using path-style S3 addressing (MinIO, localstack).

Integration token encryption

VariableRequiredExampleDescription
INTEGRATION_ENCRYPTION_KEYRuntimeREPLACE_ME_integration_encryption_keyPlatform-wide encryption key for integration tokens at rest (Align, Fireflies, GitHub, Calendly) and for signing OAuth `state`. 32 random bytes, base64-encoded: openssl rand -base64 32 Required in production once ANY integration is used (the server throws on encrypt/decrypt if unset). Required for pnpm test:align. Do not rotate once real tokens are stored — existing connections become undecryptable. Legacy name ALIGN_ENCRYPTION_KEY is still read as a fallback (ALN-153).

Align integration

VariableRequiredExampleDescription
ALIGN_BASE_URLTesthttps://app.alignsoftware.ioBase URL for the Align API. Required only for pnpm test:align. Defaults to the production Align URL when absent.

PDF worker

VariableRequiredExampleDescription
PDF_WORKER_URLRuntimehttp://localhost:3002URL of the PDF generation microservice. Required for report PDF export.
PDF_WORKER_SECRETRuntimeREPLACE_ME_pdf_worker_secretShared secret between the API server and the PDF worker. Required for report PDF export.

Logging

VariableRequiredExampleDescription
LOG_LEVELOptionalinfoPino log level: trace | debug | info | warn | error | fatal Defaults to "info".
Secrets

Never commit real values. INTEGRATION_ENCRYPTION_KEY in particular must not be rotated once real integration tokens are stored, or existing connections become undecryptable.