feat(web): Phase P5 cutover — Gateway serves the SPA bundle, Next tree deleted #1444

Closed
opened 2026-08-27 02:16:28 +00:00 by fred · 1 comment
Collaborator

Phase P completion, step P5, per the webui-audit T10 ruling (adopted by Jason 2026-08-26): the Gateway serves the SPA bundle and the Next tree is deleted.

Scope:

  1. vite build becomes the production build for apps/web (today pnpm build runs scripts/build-web.mjs, which drives next build).
  2. Gateway serves the built SPA bundle (static assets + SPA fallback to index.html), replacing the separate Next server on port 3101.
  3. Delete the Next tree and its build harness: next.config.ts, next-env.d.ts, src/app/ (Next router tree), scripts/build-web.mjs next-specific machinery, the next/react-server dependencies, and the dev/start next scripts.
  4. Image/deploy pipeline follows: the web image (or the gateway image) carries the SPA bundle; #1407's sha-image publishing stays intact for whatever images remain.

Constraints:

  • Blocked on S1 closure (#1432) — do not start while the S1 PRs are in flight in apps/web.
  • All merges via reviewed squash PRs to next with green CI (constitution gates).
  • Keeper assets are not to be rewritten: chat contract client, freshness layer, origin-agnostic API layer, test suite (REPORT.md A1-8/11/13, A4-3).

Companion: P6 CI issue (Vite build + E2E gate).

Phase P completion, step P5, per the webui-audit T10 ruling (adopted by Jason 2026-08-26): the Gateway serves the SPA bundle and the Next tree is deleted. Scope: 1. `vite build` becomes the production build for `apps/web` (today `pnpm build` runs `scripts/build-web.mjs`, which drives `next build`). 2. Gateway serves the built SPA bundle (static assets + SPA fallback to `index.html`), replacing the separate Next server on port 3101. 3. Delete the Next tree and its build harness: `next.config.ts`, `next-env.d.ts`, `src/app/` (Next router tree), `scripts/build-web.mjs` next-specific machinery, the `next`/`react-server` dependencies, and the `dev`/`start` next scripts. 4. Image/deploy pipeline follows: the web image (or the gateway image) carries the SPA bundle; #1407's sha-image publishing stays intact for whatever images remain. Constraints: - Blocked on S1 closure (#1432) — do not start while the S1 PRs are in flight in `apps/web`. - All merges via reviewed squash PRs to `next` with green CI (constitution gates). - Keeper assets are not to be rewritten: chat contract client, freshness layer, origin-agnostic API layer, test suite (REPORT.md A1-8/11/13, A4-3). Companion: P6 CI issue (Vite build + E2E gate).
fred closed this issue 2026-08-27 13:06:51 +00:00
Author
Collaborator

Done via PR #1453 (squash-merged to next, pipeline 2888 green, reviews 336+337 by rev-code-01). Next.js fully retired: src/app tree, next.config.ts, guards, web.Dockerfile, build-web step, and the .next preflight certification all removed; gateway serves the Vite SPA same-origin with WEB_DIST_DIR.

Done via PR #1453 (squash-merged to next, pipeline 2888 green, reviews 336+337 by rev-code-01). Next.js fully retired: src/app tree, next.config.ts, guards, web.Dockerfile, build-web step, and the .next preflight certification all removed; gateway serves the Vite SPA same-origin with WEB_DIST_DIR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1444