# Copy this file to `.env` in the repo root: cp .env.example .env # The API and the web app both read this one file. # Postgres started by `docker compose up` (see docker-compose.yml). DATABASE_URL=postgres://binary:binary@localhost:5432/binary # A long random string (32+ characters) used to sign sessions. # The API refuses to start until you replace "change-me". # Generate one with: openssl rand -base64 32 BETTER_AUTH_SECRET=change-me # Encrypts the LLM API keys users save in Settings (32 bytes, base64). # Generate one with: openssl rand -base64 32 # Keep it safe: if you lose it, saved API keys can no longer be read. ENCRYPTION_KEY=change-me # Where the API runs. BETTER_AUTH_URL=http://localhost:4000 # Where the web app runs (allowed to call the API with cookies). WEB_URL=http://localhost:3000 # Read by the web app (Next.js) to reach the API. NEXT_PUBLIC_API_URL=http://localhost:4000 # Trigger.dev (Chapter 7, optional). Without it, routines run inside the API # and schedules never fire. Put your project's ref in apps/api/trigger.config.ts, # paste its DEV secret key here (dashboard → API keys), then run # `pnpm trigger:dev` next to `pnpm dev`. TRIGGER_SECRET_KEY= # E2B (Chapter 9, optional). With it, characters whose computer is "Cloud # sandbox" can run code, commands and files in a private cloud machine. # Get a key at https://e2b.dev/dashboard (API keys). E2B_API_KEY=