.env.example
2,318 bytes
| 1 | # --------------------------------------------------------------------------- |
|---|---|
| 2 | # Roundtable environment configuration |
| 3 | # Copy to `.env` and fill in. All variables are validated at boot (src/lib/env.ts). |
| 4 | # --------------------------------------------------------------------------- |
| 5 | |
| 6 | # --- Database ------------------------------------------------------------- |
| 7 | # Postgres connection string. In docker-compose this points at the `db` service. |
| 8 | DATABASE_URL="postgresql://roundtable:roundtable@localhost:5432/roundtable?schema=public" |
| 9 | |
| 10 | # --- Auth.js (NextAuth v5) ------------------------------------------------ |
| 11 | # Generate with: openssl rand -base64 32 |
| 12 | AUTH_SECRET="change-me-openssl-rand-base64-32" |
| 13 | # Public origin, used for OAuth callbacks behind the reverse proxy. |
| 14 | AUTH_URL="http://localhost:3000" |
| 15 | # When true, NextAuth trusts the X-Forwarded-* headers set by Caddy. |
| 16 | AUTH_TRUST_HOST="true" |
| 17 | # GitHub OAuth app credentials (https://github.com/settings/developers) |
| 18 | AUTH_GITHUB_ID="" |
| 19 | AUTH_GITHUB_SECRET="" |
| 20 | |
| 21 | # --- BYOK encryption ------------------------------------------------------ |
| 22 | # 32-byte master key (base64) used for AES-256-GCM encryption of saved user |
| 23 | # API keys. Generate with: openssl rand -base64 32 |
| 24 | # THIS IS THE ONLY SECRET REQUIRED FOR PUBLIC DEMO MODE. |
| 25 | ENCRYPTION_KEY="change-me-32-bytes-base64-encoded-value==" |
| 26 | |
| 27 | # --- OpenRouter ----------------------------------------------------------- |
| 28 | # Base URL for the OpenRouter OpenAI-compatible gateway. Rarely changed. |
| 29 | OPENROUTER_BASE_URL="https://openrouter.ai/api/v1" |
| 30 | # Sent as HTTP-Referer / X-Title so OpenRouter attributes usage to this app. |
| 31 | OPENROUTER_APP_URL="http://localhost:3000" |
| 32 | OPENROUTER_APP_TITLE="Roundtable" |
| 33 | |
| 34 | # --- Runtime -------------------------------------------------------------- |
| 35 | # Port the Next.js server listens on (Caddy proxies to this). |
| 36 | PORT="3000" |
| 37 | NODE_ENV="development" |
| 38 | |
| 39 | # --- Mock mode ------------------------------------------------------------ |
| 40 | # When "1", all LLM calls are served by the deterministic mock client — no |
| 41 | # network, no spend. Used for local dev, CI, and the seeded demo. |
| 42 | MOCK_LLM="0" |
| 43 | |
| 44 | # --- Rate limiting -------------------------------------------------------- |
| 45 | # Max debate starts per user per rolling window (protects the server itself; |
| 46 | # inference is paid by each user's own key). |
| 47 | RATE_LIMIT_DEBATES_PER_HOUR="20" |
| 48 | |