Skip to content

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.

FileCommittedContains
apps/*/.env.schemayesNames, types, which are public/sensitive
apps/*/.env.exampleyesSafe placeholder values to copy
apps/*/.envnoYour local values and secrets

Variables ​

VariableAppPublicPurpose
NODE_ENVallyesdevelopment, production, test
VITE_SERVER_URLwebyesBase URL of the API Worker
VITE_DOCS_URLwebyesWhere planned screens link their spec chapter (default http://localhost:3010)
BETTER_AUTH_SECRETserversecretMin 32 characters
BETTER_AUTH_URLservernoPublic URL of the API Worker (Alchemy supplies it when deployed)
CORS_ORIGINservernoExact web origin; set after the first deploy
ALCHEMY_PASSWORDinfrasecretEncrypts Alchemy state
BRAVE_API_KEYserversecretOptional. Brave Search API key for Trending Media's Instagram discovery; unset skips that search
OPENAI_API_KEYserversecretOptional. OpenAI speech-to-text for Clipper transcription; unset falls back to the AI binding
OPENAI_BASE_URLserveryesOptional. OpenAI-compatible endpoint for Clipper transcription
OPENAI_TRANSCRIBE_MODELserveryesOptional. Transcription model name
RESEARCH_LLMserveryesOptional. Model backend for research and Clipper scoring: auto, claude-cli, anthropic or off
ANTHROPIC_API_KEYserversecretOptional. Claude Platform key for the anthropic backend in production
ANTHROPIC_MODELserveryesOptional. Model name for the Claude Platform backend
CLAUDE_BRIDGE_URLserveryesOptional. Development only: the Claude app through bun run claude:bridge; never used in production
CLAUDE_BRIDGE_TOKENserversecretOptional. Token for the Claude bridge
OWNER_PASSWORDserversecretRequired. Owner account password, at least 12 characters; reconciled on every start
OWNER_NAMEserveryesOptional. Owner display name
DEV_SEATS_PASSWORDserversecretDevelopment only. Also creates manager, sales, videographer and editor seats; refused on the production stage
AIservern/aWorkers 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.Redacted in packages/infra/alchemy.run.ts deploys them as secret_text).
  • Bun's automatic .env loading is disabled (bunfig.toml); Varlock loads values.

Internal documentation. Not for clients.