Add deployment configs and DEPLOYMENT.md so the repo can be launched as a website
From the PR description
Summary
The repo already builds locally, but to actually launch it as a public website a few pieces were missing: a Dockerfile for the backend (with LibreOffice), a Dockerfile for the frontend, the Cloudflare wrangler config that npm run deploy relies on, a self-hosted docker-compose.yml, CI to verify builds, and an end-to-end deployment walkthrough.
This PR adds all of that without changing application code.
Changes
backend/Dockerfile+backend/.dockerignore- multi-stage Debian-slim image, LibreOffice + fonts baked in, non-root user,/healthhealthcheck, tini as init.frontend/Dockerfile+frontend/.dockerignore- multi-stage build using Next.js standalone output, non-root user,NEXT_PUBLIC_*accepted as build args.frontend/next.config.ts- opt-inoutput: "standalone"controlled byNEXT_OUTPUT_MODE, so the Docker build path producesserver.jswhilenext dev/next start/the OpenNext Cloudflare path stay unaffected.frontend/wrangler.jsonc- Cloudflare Workers config matching the OpenNext output, withnodejs_compatenabled. Required fornpm run deployto actually work.docker-compose.ymlat repo root - brings the whole stack up locally or on any Docker host. Frontend waits for the backend healthcheck..github/workflows/ci.yml- parallel backend and frontendnpm run buildon every push/PR. Lint runs as a non-blocking check because the repo has a backlog of pre-existing warnings.DEPLOYMENT.md- end-to-end guide covering Supabase / R2 / model-provider setup, every required env var, and concrete deploy steps for Cloudflare Workers, Vercel, Fly.io, Render, Railway, and plain Docker, plus wiring and troubleshooting.README.md- short "Deployment" section linking to the new guide and showing the one-linerdocker compose up --buildpath.
Why
The deployment story was implicit. With these additions a maintainer (or anyone forking) can pick a host, follow DEPLOYMENT.md, and have a working site without reverse-engineering env vars or build commands. The frontend Cloudflare deploy in particular was unusable before this PR because wrangler.jsonc was missing.
Testing
Locally on Node 20:
npm ci --prefix backend && npm run build --prefix backend # ok
npm ci --prefix frontend # ok
NEXT_PUBLIC_SUPABASE_URL=https://example.supabase.co \
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY=ci-anon-key \
NEXT_PUBLIC_API_BASE_URL=http://localhost:3001 \
NEXT_OUTPUT_MODE=standalone \
npm run build --prefix frontend # ok, .next/standalone/server.js produced
Both builds match what the new CI workflow runs. Docker images were not built in this environment (no Docker daemon available), but the Dockerfiles follow the same npm ci + npm run build paths that pass above, plus the standard Next.js standalone runtime layout.
Notes for the reviewer
- No application code is touched. The only product-code change is the conditional
outputfield innext.config.ts, gated on an env var that is unset by default. wrangler.jsoncuses the standard OpenNext output paths (.open-next/worker.js,.open-next/assets). If your account already has a Worker namedmike, change thenamefield before deploying.- The CI lint step is intentionally
continue-on-error: true. Flipping it to blocking is a separate cleanup PR.
Our analysis
Make the deployment story explicit with Docker, Wrangler, and CI — read the full analysis →
Think the analysis missed something the PR description covers?
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-1.md from
inside the repo you want the changes in.

