diff --git a/docs/TOOLS.md b/docs/TOOLS.md index 49e3fac..7607131 100644 --- a/docs/TOOLS.md +++ b/docs/TOOLS.md @@ -126,7 +126,7 @@ Run from the repository root. | --- | --- | | `npm install` | dependencies | | `npm run dev` | Vite and the Express API together, via `concurrently`. Frontend on 5173, API on 3001 | -| `npm run build` | **three steps**: the client bundle, then an SSR bundle from `src/entry-server.jsx`, then `scripts/prerender.js`, which writes static HTML for every route. This is the only real gate this project has | +| `npm run build` | **three steps**: the client bundle, then an SSR bundle from `src/entry-server.jsx`, then `scripts/prerender.js`, which writes static HTML for every route. This is the only real gate this project has, and it refuses rather than emit a wrong page: a render that throws, a Suspense fallback, or a template that already carries a canonical each fail the build, naming the route | | `npm run build:client` | the client bundle alone. Does **not** prerender — do not use it to produce a release | | `npm run preview` | serve the built client | | `npm start` / `npm run server` | the Express server alone, serving `dist/` | diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 3b182f4..7b83bac 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -54,6 +54,25 @@ policy text live there as plain data, imported by both the client pages and to static HTML at build time using `src/entry-server.jsx`. Nothing at request time renders React on the server. +It refuses to produce a page rather than produce a wrong one, and each refusal +names its route: + +- a render that throws, so the build does not report a stack trace with no clue + which of the nineteen pages produced it +- a Suspense fallback (``), because `renderToString` does not wait: a + lazy import anywhere above a route would silently ship an empty page to every + crawler +- a template that already carries a canonical, which means the script is being + run over its own output, since `dist/index.html` is both template and home page + +Two rules about what it moves. Metadata React leaves inline is hoisted into +`
`, **except** inside an inline `