normogen/web/normogen-web
goose 1b5c1e2a06 feat: separate frontend container (Axum static serving + API proxy)
A dedicated Rust/Axum binary (web/frontend-server/) that:
- Serves the built Vite SPA bundle from dist/ via tower-http ServeDir
- Falls back to index.html for SPA routing (deep links work)
- Reverse-proxies /api/* to the backend container (same-origin, no CORS)
- Listens on port 8080 (configurable via FRONTEND_PORT)

Dockerfile (web/normogen-web/Dockerfile): 3-stage build:
1. Node: npm ci + npm run build -> dist/
2. Rust: cargo build --release the frontend-server binary
3. Runtime: debian-slim + binary + dist/

docker-compose.yml: new 'frontend' service on :8080, depends on backend healthy,
proxies to http://backend:6500. Independently scalable (run N replicas behind
a load balancer).

Architecture:
  Browser -> :8080 (frontend container)
    /api/* -> proxy -> backend:6500
    /*     -> static dist/ (SPA)
2026-07-05 11:24:19 -03:00
..
public feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
src test: E2E ZK integration tests + frontend lifecycle test 2026-07-05 00:35:33 -03:00
.env.example feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
.gitignore feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
Dockerfile feat: separate frontend container (Axum static serving + API proxy) 2026-07-05 11:24:19 -03:00
index.html feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
package-lock.json feat: Phase 3c — dose logging + adherence, profile management, tests 2026-06-28 10:32:28 -03:00
package.json feat: Phase 3c — dose logging + adherence, profile management, tests 2026-06-28 10:32:28 -03:00
tsconfig.json feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
tsconfig.node.json feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00
vite.config.ts feat(web): Phase 3a — migrate CRA to Vite + make the app runnable 2026-06-28 00:47:19 -03:00