Appearance
Environment
Each app owns its environment schema in .env.schema (checked in, no secrets). Varlock validates values and generates src/env.ts (git-ignored) on bun install or bun run env:generate. Run it again after editing a schema.
| File | Committed | Contains |
|---|---|---|
apps/*/.env.schema | yes | Names, types, which are public/sensitive |
apps/*/.env.example | yes | Safe placeholder values to copy |
apps/*/.env | no | Your local values and secrets |
Variables
| Variable | App | Public | Purpose |
|---|---|---|---|
NODE_ENV | all | yes | development, production, test |
VITE_SERVER_URL | web | yes | Base URL of the API Worker |
VITE_DOCS_URL | web | yes | Where planned screens link their spec chapter (default http://localhost:3010) |
BETTER_AUTH_SECRET | server | secret | Min 32 characters |
BETTER_AUTH_URL | server | no | Public URL of the API Worker (Alchemy supplies it when deployed) |
CORS_ORIGIN | server | no | Exact web origin; set after the first deploy |
ALCHEMY_PASSWORD | infra | secret | Encrypts Alchemy state |
BRAVE_API_KEY | server | secret | Optional. Brave Search API key for Trending Media's Instagram discovery; unset skips that search |
OPENAI_API_KEY | server | secret | Optional. OpenAI speech-to-text for Clipper transcription; unset falls back to the AI binding |
OPENAI_BASE_URL | server | yes | Optional. OpenAI-compatible endpoint for Clipper transcription |
OPENAI_TRANSCRIBE_MODEL | server | yes | Optional. Transcription model name |
RESEARCH_LLM | server | yes | Optional. Model backend for research and Clipper scoring: auto, claude-cli, anthropic or off |
ANTHROPIC_API_KEY | server | secret | Optional. Claude Platform key for the anthropic backend in production |
ANTHROPIC_MODEL | server | yes | Optional. Model name for the Claude Platform backend |
CLAUDE_BRIDGE_URL | server | yes | Optional. Development only: the Claude app through bun run claude:bridge; never used in production |
CLAUDE_BRIDGE_TOKEN | server | secret | Optional. Token for the Claude bridge |
OWNER_PASSWORD | server | secret | Required. Owner account password, at least 12 characters; reconciled on every start |
OWNER_NAME | server | yes | Optional. Owner display name |
DEV_SEATS_PASSWORD | server | secret | Development only. Also creates manager, sales, videographer and editor seats; refused on the production stage |
AI | server | n/a | Workers AI binding in packages/infra/alchemy.run.ts. Clipper transcription fallback when OPENAI_API_KEY is unset |
Provider keys (Cloudflare Email, Stripe, R2 access keys) are added when the milestone that needs them lands, as optional variables so the app still runs without them (Rules: integrations are optional).
Secrets
- Never commit secrets or paste them in chat or tickets.
- Production secrets are Alchemy/Cloudflare deployment secrets (
Config.Redactedinpackages/infra/alchemy.run.tsdeploys them assecret_text). - Bun's automatic
.envloading is disabled (bunfig.toml); Varlock loads values.