Every page is now built as complete HTML at build time, so visitors see content before the JavaScript runs and crawlers get the full text without executing it. Built with AI-DLC in three units; docs in aidlc-docs/features/prerendering/.
Before merging: the new nginx config is already live on the test Pi, and test was deployed from this branch (run 598). A merge to master deploys to test again, which is safe now. Production (IIS) is not set up yet, so deploy-production cannot run.
What changes
TanStack Start with static prerendering. All 11 pages plus 404.html are prerendered from sitePages.ts. src/main.tsx and index.html are gone; the entry is src/client.tsx and the document shell lives in __root.tsx.
Output is dist/client; dist/server is never deployed.
The CSP stays unchanged. Start writes inline scripts, which script-src 'self' blocks.
A post-build step (config/externalizeInlineScripts.ts) moves them to hashed files in /assets.
The build fails if an executable inline script remains, a page is missing, or the e-mail address appears in any output file.
Hydration matches the HTML. Browser-only values (search parameters, media queries, the footer year, the 404 buttons) apply after hydration.
E-mail address stays out of the HTML. It appears only after hydration, as before (owner's decision).
Fade-in (Reveal). Visible in the HTML. Only content below the viewport hides after hydration and fades in on scroll; content in view never flashes. This also fixes the empty grid on /portfolio on phones.
Without JavaScript. Text and photos are visible (<noscript> twins for deferred images), the mobile menu works through CSS, and useless controls are hidden.
First photo. React preloads non-lazy images. /portfolio loads its first row eagerly per column count, with media-bound preloads.
URLs on nginx, IIS and the preview server. No SPA fallback.
/x serves x.html.
Other forms (/x/, /X, /x.html, /index.html) get one 301.
Unknown URLs get a real 404.
/%5C... can no longer become an open redirect.
Compression. The generated nginx block turns on gzip. Test now sends the main bundle as 156 kB instead of 547 kB.
Deploy.
An artifact guard runs before upload.
A post-deploy check compares served bytes with the build, so an old server config turns the deploy red.
The production upload goes in three lftp passes: assets, then web.config and HTML, then cleanup.
Lighthouse targets are a table with a recorded reason per exception. Mobile now:
0.9 for /over-mij, /soorten-fotoshoots, newborn, /portfolio, /contact, /privacyverklaring and the 404 page.
0.85 for / (was 0.8), zwangerschap, portret, gezin and loveshoot.
Every page is now built as complete HTML at build time, so visitors see content before the JavaScript runs and crawlers get the full text without executing it. Built with AI-DLC in three units; docs in `aidlc-docs/features/prerendering/`.
**Before merging:** the new nginx config is already live on the test Pi, and test was deployed from this branch (run 598). A merge to master deploys to test again, which is safe now. Production (IIS) is not set up yet, so `deploy-production` cannot run.
## What changes
- **TanStack Start with static prerendering.** All 11 pages plus `404.html` are prerendered from `sitePages.ts`. `src/main.tsx` and `index.html` are gone; the entry is `src/client.tsx` and the document shell lives in `__root.tsx`.
- Output is `dist/client`; `dist/server` is never deployed.
- **The CSP stays unchanged.** Start writes inline scripts, which `script-src 'self'` blocks.
- A post-build step (`config/externalizeInlineScripts.ts`) moves them to hashed files in `/assets`.
- The build fails if an executable inline script remains, a page is missing, or the e-mail address appears in any output file.
- **Hydration matches the HTML.** Browser-only values (search parameters, media queries, the footer year, the 404 buttons) apply after hydration.
- **E-mail address stays out of the HTML.** It appears only after hydration, as before (owner's decision).
- **Fade-in (`Reveal`).** Visible in the HTML. Only content below the viewport hides after hydration and fades in on scroll; content in view never flashes. This also fixes the empty grid on `/portfolio` on phones.
- **Without JavaScript.** Text and photos are visible (`<noscript>` twins for deferred images), the mobile menu works through CSS, and useless controls are hidden.
- **First photo.** React preloads non-lazy images. `/portfolio` loads its first row eagerly per column count, with media-bound preloads.
- **URLs on nginx, IIS and the preview server.** No SPA fallback.
- `/x` serves `x.html`.
- Other forms (`/x/`, `/X`, `/x.html`, `/index.html`) get one 301.
- Unknown URLs get a real 404.
- `/%5C...` can no longer become an open redirect.
- **Compression.** The generated nginx block turns on gzip. Test now sends the main bundle as 156 kB instead of 547 kB.
- **Deploy.**
- An artifact guard runs before upload.
- A post-deploy check compares served bytes with the build, so an old server config turns the deploy red.
- The production upload goes in three lftp passes: assets, then `web.config` and HTML, then cleanup.
- **Lighthouse targets** are a table with a recorded reason per exception. Mobile now:
- 0.9 for `/over-mij`, `/soorten-fotoshoots`, newborn, `/portfolio`, `/contact`, `/privacyverklaring` and the 404 page.
- 0.85 for `/` (was 0.8), zwangerschap, portret, gezin and loveshoot.
## Measured (mobile, PC, 3 runs, median; master -> now)
| Page | Score |
|---|---|
| `/` | 0.75 -> 0.85 |
| `/over-mij` | 0.86 -> 0.92 |
| `/soorten-fotoshoots` | 0.85 -> 0.92 |
| shoot pages | 0.82-0.85 -> 0.88-0.91 |
| `/contact` | 0.87 -> 0.94 |
FCP is about 2.6 s -> 1.36 s on every page; desktop is 0.99-1.00. Full tables: `construction/hosting-and-targets/code/measurement-final.md`.
## Tests
- **Unit tests:** 1390, up from 888.
- **Browser tests:** 471 in CI (run 599, green). They include:
- hydration under the production CSP, and every page without JavaScript;
- 198 tests against real nginx 1.24, with parity against the preview server;
- the deploy scripts against real lftp.
- **Defects CI found, all fixed:**
- a case-insensitive nginx `map` key;
- the `%5C` open redirect;
- a duplicated upload script that would have left `web.config` backups.
## Open
- **No-JavaScript mobile menu:** still to check by hand in Firefox, Safari and Chrome on Android.
- **IIS and FTPS:** unverified until a host exists. The questions for the host are in `infrastructure-design.md` (Before go-live on IIS).
- **PC runner:** stopped, because image pulls fail with "no policy.json". All jobs run on the Pi.
- **`/`:** sits exactly at its 0.85 target with `numberOfRuns: 1`, so `pnpm check` can fail there by chance.
- **Bigger gains:** smaller (responsive) photos, a separate feature.
Generated with [Claude Code](https://claude.com/claude-code)
Records the requirements, execution plan, application design, the first unit's
functional design and code generation plan, and the baseline on master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every page is now built as HTML from sitePages.ts, with a catch-all route for
404.html. Hooks that read the browser during render are safe for prerendering.
The script step that keeps the CSP intact follows, so this build still has
inline scripts and is not deployable yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TanStack Start writes inline scripts into each page, which the strict CSP
blocks. This step moves them to hashed files and checks the output: every page
is present, no executable inline script remains and the e-mail address appears
nowhere. It is not part of the build yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search values, the 404 buttons and the footer year now apply after hydration.
The e-mail address stays out of the HTML behind a placeholder, and all review
texts are in the page, so crawlers can read them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lighthouse and the browser tests need a real 404 status, the .html mapping and
the production headers, which vite preview does not give. It is not wired into
the scripts yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build now moves inline scripts and fails on a violation. Lighthouse audits
/404.html, because it refuses a page with a real 404 status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The baseline ran on vite preview, which compresses, so measurements could not
be compared without this. Also records that the real servers need compression.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prerendered 404 page is served for other URLs, so its dehydrated match id
differs and the router renders the catch-all's pending component first. Without
one that render was empty, which gave React error 418 and duplicate head tags.
The tests run the built output in a real browser under the production CSP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reveal content is visible in the HTML and only content below the viewport hides
after hydration. Deferred photos get a noscript twin, and the first row of the
portfolio loads eagerly per column count. Some old tests still expect the former
behaviour; they are rewritten next, so this commit's test run is not fully green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mobile menu works through CSS, and controls that need JavaScript are hidden
without it. The contact photo gets its own preload, and the tests cover the new
Reveal behaviour, the first row and the noscript markup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests cover every page without JavaScript, the menu by keyboard and pointer,
the fade-in at load and on scroll, and image requests per width. They found that
the closed menu's shoot links could take focus, which is fixed here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lazy loading saved its bytes during page load, but left the logo empty for a
moment when navigating to the homepage on a wide screen. Also adds the second
unit's code summary and the shared docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pages now map to their html file, other forms get one redirect, unknown URLs
get a real 404 and responses are compressed. A browser-free test suite runs the
rules against a real nginx, in CI only so far.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI jobs share the host's network, so that service would try to bind the
runner's port 80. The tests start their own nginx on a free port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router swaps its pending copy for the real page after 500 ms, so a heading
found before that can leave the document before the assertion. CI on the Pi
caught this. The page itself shows identical content during the swap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plain map keys compare case-insensitively, so /Over-Mij was not redirected. A
path starting with an encoded backslash could become an open redirect through
the trailing-slash rule; it now gets the 404 page. Also makes the tests readable
for nginx's workers and less sensitive to the slow CI runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Real nginx passes all 134 server rule tests in CI. The seven remaining failures
were tests cut off at 60 seconds on the Raspberry Pi.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview server and web.config now follow the same URLs as nginx, without
the SPA fallback. Lighthouse exceptions need a recorded reason and the 404 page
is audited through an opt-in route. The deploy checks the build first and the
served result afterwards. The IIS rules stay unverified until a host exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview server must behave like the real server, or Lighthouse and the
browser tests prove the wrong thing. The tests also cover the new URLs in a real
browser: one redirect, one title, a clean hydration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each pass is now its own lftp session with a marker in the log, so a failed
asset pass stops the script before any HTML goes up. The test checks those
markers instead of lftp's output format.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A remote of . or .. could have made the cleanup pass delete the wrong folder, so
such paths are refused before anything runs. A connection error now ends in the
normal summary instead of aborting the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three pages no longer need an exception and the homepage target rises to its
measured score, so the gain cannot slip away unnoticed. Also adds the third
unit's code summary and updates the shared docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The script body had been saved twice, so a production upload would have run
twice and left web.config backups on the host. Browser tests also get longer
limits on the slow CI runner; the page behaves the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Every page is now built as complete HTML at build time, so visitors see content before the JavaScript runs and crawlers get the full text without executing it. Built with AI-DLC in three units; docs in
aidlc-docs/features/prerendering/.Before merging: the new nginx config is already live on the test Pi, and test was deployed from this branch (run 598). A merge to master deploys to test again, which is safe now. Production (IIS) is not set up yet, so
deploy-productioncannot run.What changes
404.htmlare prerendered fromsitePages.ts.src/main.tsxandindex.htmlare gone; the entry issrc/client.tsxand the document shell lives in__root.tsx.dist/client;dist/serveris never deployed.script-src 'self'blocks.config/externalizeInlineScripts.ts) moves them to hashed files in/assets.Reveal). Visible in the HTML. Only content below the viewport hides after hydration and fades in on scroll; content in view never flashes. This also fixes the empty grid on/portfolioon phones.<noscript>twins for deferred images), the mobile menu works through CSS, and useless controls are hidden./portfolioloads its first row eagerly per column count, with media-bound preloads./xservesx.html./x/,/X,/x.html,/index.html) get one 301./%5C...can no longer become an open redirect.web.configand HTML, then cleanup./over-mij,/soorten-fotoshoots, newborn,/portfolio,/contact,/privacyverklaringand the 404 page./(was 0.8), zwangerschap, portret, gezin and loveshoot.Measured (mobile, PC, 3 runs, median; master -> now)
//over-mij/soorten-fotoshoots/contactFCP is about 2.6 s -> 1.36 s on every page; desktop is 0.99-1.00. Full tables:
construction/hosting-and-targets/code/measurement-final.md.Tests
mapkey;%5Copen redirect;web.configbackups.Open
infrastructure-design.md(Before go-live on IIS)./: sits exactly at its 0.85 target withnumberOfRuns: 1, sopnpm checkcan fail there by chance.Generated with Claude Code