Secrets redacted. This is a live environment file. Variable names and comments are shown; every value is replaced with a blurred bar before it reaches your browser — the secret is never transmitted.
1# --------------------------------------------------------------------------- 2# AI Software Factory — environment configuration 3# Copy to .env and fill in real values. NEVER commit secrets to source control. 4# --------------------------------------------------------------------------- 5 6# App 7NODE_ENV= 8PORT= 9WEB_URL= 10API_URL= 11REALTIME_URL= 12PUBLIC_BASE_URL= 13 14# Database (PostgreSQL) 15 16# Redis (caching, queues, presence) 17 18# Auth / Sessions 19JWT_EXPIRES_IN= 20REFRESH_TOKEN_TTL_DAYS= 21BCRYPT_ROUNDS= 22 23# S3-compatible object storage (MinIO in local dev) — TASK-0101 (two private 24# buckets; `S3_BUCKET` is the legacy alias for S3_BUCKET_FILES). 25S3_BUCKET_FILES= 26S3_BUCKET_THUMBS= 27S3_BUCKET= 28S3_REGION= 29S3_FORCE_PATH_STYLE= 30S3_SIGN_EXPIRY_SECONDS= 31# ClamAV (dev mode = empty; Docker profile sets CLAMAV_HOST=clamav:3310) 32CLAMD_SOCKET= 33CLAMAV_HOST= 34CLAMAV_PORT= 35 36# Search (OpenSearch) 37SEARCH_USERNAME= 38SEARCH_PASSWORD= 39SEARCH_INDEX_PREFIX= 40# Content-index dense_vector tuning (TASK-0099 — dimensions are immutable per 41# index; a change rolls a new index via `pnpm search:reindex`). HNSW: m / 42# ef_construction, dimension = the embedding model's output (1536 = 43# text-embedding-3-small). 44SEARCH_VECTOR_DIMENSION= 45SEARCH_KNN_M= 46SEARCH_KNN_EF_CONSTRUCTION= 47 48# AI gateway (provider-agnostic; any OpenAI-compatible endpoint works) 49AI_PROVIDER= 50AI_BASE_URL= 51AI_API_KEY= 52AI_MODEL= 53AI_EMBEDDING_MODEL= 54# Embedding provider for the `embed:chunks` job (TASK-0099). EMPTY (default) 55# = no real provider wired: the job logs "embedding disabled (Phase 12)" and 56# skips (the chunk docs' vector stays null). Set to a provider name to record 57# placeholder AiEmbedding cache rows until Phase 12 wires the real call. 58AI_EMBEDDING_PROVIDER= 59 60# Email (SMTP) 61SMTP_HOST= 62SMTP_PORT= 63SMTP_USER= 64SMTP_PASSWORD= 65SMTP_FROM= 66 67# Realtime 68REALTIME_PORT= 69REALTIME_HEARTBEAT_MS= 70YJS_STORAGE_PREFIX= 71# Shared service token for the internal endpoints (`/internal/*`, TASK-0092 72# slice 2): the realtime gateway authenticates to the api's internal block 73# endpoints (hydration read + the flush's CAS persist) with this bearer 74# token. Empty (default) = the internal endpoints are CLOSED (fail-closed). 75 76# Webhooks 77WEBHOOK_RETRY_MAX= 78WEBHOOK_TIMEOUT_MS= 79 80# Rate limiting 81# NOTE: the realtime app reads RATE_LIMIT_WINDOW_MS / RATE_LIMIT_MAX. The API 82# guard (apps/api/src/common/guards/rate-limit.guard.ts) reads a DIFFERENT pair 83# — RATE_LIMIT_API / RATE_LIMIT_AUTH (per user/min) — so the two lines above 84# do NOT affect the API. The API guard's defaults (100/min, 10/min) throttle 85# the local full-stack E2E (which legitimately makes many calls), so they are 86# raised high here for local dev/E2E only (this .env is gitignored; CI sets its 87# own). Recorded in the Phase 11 gap report as a pre-existing env-naming split. 88RATE_LIMIT_WINDOW_MS= 89RATE_LIMIT_MAX= 90RATE_LIMIT_API= 91RATE_LIMIT_AUTH= 92 93# Observability (optional; enable in Phase 15) 94OTEL_ENABLED= 95OTEL_EXPORTER_OTLP_ENDPOINT= 96 97# Encryption (application-level secret encryption, at-rest secrets) 98DATABASE_URL= 99REDIS_URL= 100SEARCH_URL= 101S3_ENDPOINT= 102S3_ACCESS_KEY= 103S3_SECRET_KEY= 104JWT_SECRET= 105REFRESH_TOKEN_SECRET= 106SESSION_SECRET= 107MASTER_ENCRYPTION_KEY= 108INTERNAL_SERVICE_TOKEN= 109INTERNAL_TEST_SEAM= 110