Development

Environment variables

The environment variables that configure the platform, grouped by concern.

Environment is configured through .env / .env.local at the repo root. Copy .env.local.example to start. The example ships with local-development defaults that already match the Docker services, so most variables can be left as-is for local work.

Variables prefixed with NEXT_PUBLIC_ are exposed to the browser. Everything else is server-only.

Core

VariablePurposeRequired
DATABASE_URLPostgreSQL connection string. Local default points at the Docker Postgres on :6432.Yes
BETTER_AUTH_SECRETSecret used to sign and encrypt auth sessions. Use a long random string.Yes
NEXT_PUBLIC_SAAS_URLAbsolute URL of the product app. Used for auth callbacks and links.Yes
NEXT_PUBLIC_MARKETING_URLAbsolute URL of the marketing site.Yes
NEXT_PUBLIC_DOCS_URLAbsolute URL of this docs site.Yes

AI providers

The platform resolves embedding and chat models through these settings. OpenRouter is the default gateway; Ollama is an optional development-only path.

VariablePurposeRequired
OPENROUTER_API_KEYAPI key for the OpenRouter gateway (chat + embeddings).Yes for live AI
OPENROUTER_SITE_URL, OPENROUTER_APP_NAMEAttribution headers sent to OpenRouter.No
EMBEDDING_PROVIDERopenrouter (default) or ollama.No
EMBEDDING_MODELOverride the embedding model id.No
EMBEDDING_DIMENSIONSEmbedding vector size. Must match the database vector column (default 1536).No
OLLAMA_BASE_URL, OLLAMA_CHAT_MODEL, OLLAMA_API_KEYLocal Ollama endpoint and model (development only; ignored when NODE_ENV=production).No

Changing EMBEDDING_DIMENSIONS after documents are indexed requires a schema migration and a full re-embedding of the corpus, because the stored vectors and the query vectors must have the same dimension. See The knowledge ingestion pipeline.

Storage

Uploaded knowledge and policy documents are stored in S3-compatible object storage (MinIO locally).

VariablePurposeRequired
S3_ENDPOINTS3 endpoint URL. Local default is the Docker MinIO on :9000.Yes
S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYStorage credentials (minioadmin / minioadmin locally).Yes
S3_REGIONRegion name (auto works for MinIO).No
NEXT_PUBLIC_POLICIES_BUCKET_NAMEBucket for fund policy documents.No
NEXT_PUBLIC_AVATARS_BUCKET_NAMEBucket for user/organization avatars.No

Mail, payments, and analytics

These integrations are optional for local development and can be left blank.

GroupVariablesNotes
MailMAIL_FROM, MAIL_HOST, MAIL_PORT, MAIL_USER, MAIL_PASS, and provider keys (RESEND_API_KEY, PLUNK_API_KEY, etc.)Transactional email. Unset = email sending is a no-op locally.
PaymentsProvider keys and PRICE_ID_* valuesThe payment provider and price IDs are configured via environment. Leave blank locally; plan tiers still function without a live provider.
Analytics / monitoringSENTRY_DSN, NEXT_PUBLIC_SENTRY_DSN, and analytics keysAll no-ops when unset.

For the exact list of supported keys, refer to .env.local.example, which is the source of truth.

On this page