Document backend deployment on Railway/Render
From the PR description
Summary
- Adds
backend/DEPLOY.mdwith package manager (npm), install/build/start commands, Node version, host-specific steps for Railway and Render, the full env var matrix (required, provider keys, optional), an explicit list of secrets that must never ship to the frontend Worker, frontend wire-up viaNEXT_PUBLIC_API_BASE_URL, and a post-deploy smoke test. - Links the new doc from the root
README.mdnext to the existing Cloudflare Workers section, with a one-liner explaining the backend is not Workers-compatible (Node-only APIs + LibreOffice). - No code changes; product behavior unchanged.
Findings worth flagging in review
- Frontend reads the backend URL from
NEXT_PUBLIC_API_BASE_URL. All call sites useprocess.env.NEXT_PUBLIC_API_BASE_URL ?? "http://localhost:3001"- the literallocalhost:3001only appears as a dev fallback and is unreachable when the env var is set at build time. The OpenNext build bakesNEXT_PUBLIC_*atcf:buildtime, so the var must be set before building, not just at runtime. - The only un-gated
localhostisfrontend/src/components/site-logo.tsx:20(http://localhost:3000), but it's behindNODE_ENV === "production"and points to the marketing landing page, not the API. No action needed. backend/src/routes/workflows.ts:8readsprocess.env.NEXT_PUBLIC_SUPABASE_URLwhile the rest of the backend readsSUPABASE_URL. The doc instructs operators to set both to the same value as a workaround; flagged as something to unify in a follow-up.OPENROUTER_API_KEYandRESEND_API_KEYare listed in.env.examplebut not currently referenced inbackend/src- documented as "set if you use them" rather than required.
Test plan
- Render the new
backend/DEPLOY.mdon GitHub and confirm the env var tables and code blocks render correctly. - Deploy backend to Railway following the doc, hit
/health, and confirm{"ok":true}. - Set
NEXT_PUBLIC_API_BASE_URLto the deployed backend URL, rebuild and redeploy the frontend Worker, and walk through the post-deploy smoke test (login → upload → ask one question).
https://claude.ai/code/session_019pRkhcGDRKQWHjzAnV5yCL
Generated by Claude Code
Our analysis
Document backend deployment on Railway and Render — read the full analysis →
Think the analysis missed something the PR description covers?
Commits in this PR (1)
| SHA | Subject | Author | Date | |
|---|---|---|---|---|
24be1632 | Document backend deployment on Railway/Render | Claude | 2026-05-07 | ↗ GitHub |
commit bodyAdds backend/DEPLOY.md with install/build/start commands, the full required-vs-secret env var matrix, host-specific (Railway, Render) steps, frontend wire-up via NEXT_PUBLIC_API_BASE_URL, and a post-deploy smoke test. Links it from the root README so it is discoverable next to the existing frontend/Workers section. https://claude.ai/code/session_019pRkhcGDRKQWHjzAnV5yCL | ||||
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-4.md from
inside the repo you want the changes in.