Deployment
Backend — Railway
Push backend/ to Railway. Attach the Postgres plugin (auto-injects DATABASE_URL). Set the following env vars:
OPENROUTER_API_KEYBACKEND_JWT_SECRETAUTH_SHARED_SECRETRESEND_API_KEYEMAIL_FROMFRONTEND_BASE_URLCORS_ORIGINS
Railway builds the Dockerfile and runs boot.sh (alembic upgrade head then uvicorn).
Frontend — Cloudflare Workers
See web-client/DEPLOY.md for the full guide. Set build-time vars in .env.production and runtime secrets via wrangler secret put:
wrangler secret put AUTH_SECRET
wrangler secret put BACKEND_JWT_SECRET
wrangler secret put AUTH_SHARED_SECRET
# OAuth (optional)
wrangler secret put AUTH_GOOGLE_ID
wrangler secret put AUTH_GOOGLE_SECRET
wrangler secret put AUTH_GITHUB_ID
wrangler secret put AUTH_GITHUB_SECRET
Then deploy:
npm run deploy