dotenv. Frontend variables are injected at build time by Vite and must be prefixed with VITE_ to be accessible in the browser bundle.
Backend Environment Variables
These variables are read by the Express server at startup. Copybackend/.env.example to backend/.env and fill in the values before running the server locally.
Frontend Environment Variables
These variables are embedded into the React bundle at build time by Vite. Set them infrontend/.env for local development, or as build-time environment variables in your hosting platform.
frontend/.env.example also includes GOOGLE_GENAI_API_KEY, GOOGLE_API_KEY,
TURSO_DB_URL, and TURSO_AUTH_TOKEN as optional local development overrides.
These keys belong in the backend in production. Do not set them as Vite build
variables in any deployed environment, as they would be exposed in the browser bundle.Security Notes
JWT_SECRETmust be at least 32 randomly-generated characters in any production or staging environment. A short or guessable secret allows token forgery and full account compromise.TURSO_DB_URLon Vercel must use thehttps://protocol, notlibsql://. Thelibsql://WebSocket protocol is blocked in Vercel’s serverless runtime. This requirement was enforced in ADR 029.ALLOWED_ORIGINSmust exactly match your frontend domain, including protocol (https://) and without a trailing slash. The server parses this variable as a comma-separated list and rejects any origin not present in that list whenNODE_ENV=production.