From 207798b6676dff08639e3edaca4dcf761f9dfd90 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 22 Apr 2026 12:59:22 -0400 Subject: [PATCH] docs: document two-process dev workflow with Vite proxy Co-Authored-By: Claude Opus 4.7 --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 0fec0d42..9fb46ebe 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,20 @@ Forgejo Actions handles: - Container image build + push to the Forgejo registry on merge to `main` (`:main`) and on `v*` tags (`:`). Task and milestone tracking: Fable (`Minstrel` project, id 12). + +## Development + +Minstrel has two concurrent dev processes: + +1. **Backend:** `docker compose up` — starts Postgres and Minstrel on `:4533`. +2. **Frontend:** `cd web && npm install && npm run dev` — Vite dev server on `:5173` with HMR. + +The Vite dev server proxies `/api/*` and `/rest/*` to the backend on `:4533`, +so session cookies work correctly when the SPA is loaded from the Vite origin. + +### Production build + +`docker build -t minstrel .` runs the SvelteKit build inside a `node` stage, +copies the output into the `golang` stage, and `//go:embed`s it into the +final binary. The resulting container serves the SPA from `/` alongside the +API surfaces. No separate static-file server is required.