Adds AI-DLC construction docs for the front-end shell feature

Functional design, NFR requirements, code generation plan and summary,
and build-and-test instructions with results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 17:05:03 +02:00
co-authored by Claude Opus 5.5
parent 4d6408b607
commit 069c7cb7eb
27 changed files with 2343 additions and 16 deletions
@@ -0,0 +1,40 @@
# Performance Test Instructions — frontend-shell
## Purpose
This is a static front-end without a server, so load, stress and throughput testing do not apply (NFR scalability: N/A). Performance here means **page-load quality as a visitor experiences it**, measured with Lighthouse.
## Requirements (NFR-P-01)
- **Performance**: ≥ 90 on every page, mobile and desktop.
- **Temporary exception**: home page on mobile ≥ 80, until responsive images come from the API/CMS and prerendering exists.
- **Accessibility, Best Practices**: 100 on every page.
- **SEO**: 100 on indexed pages. On `noindex` pages only the "is crawlable" audit may fail.
## Run
```bash
pnpm build
pnpm lighthouse # mobile (lighthouserc.cjs), then desktop (lighthouserc.desktop.cjs)
```
- Lighthouse CI starts `pnpm preview` itself (port 4173, real security headers).
- It measures all six routes plus `/bestaat-niet` (404) once per form factor.
- It fails if any assertion fails.
- Reports are written to `.lighthouseci/` (git-ignored). Open the `.html` files for details.
- Requires a local Chrome.
Manual measurement in a browser: `pnpm build && pnpm preview`, then open `http://localhost:4173` in a **private window** (extensions and Brave Shields skew results) and run Lighthouse from DevTools.
## Results (2026-10-18, clean install)
| Page | Mobile Perf | Desktop Perf | A11y | Best Pr. | SEO |
|---|---|---|---|---|---|
| `/` | **82** (target 80) | 99 | 100 | 100 | 100 |
| `/over-mij`, `/portfolio`, `/soorten-fotoshoots`, `/contact`, `/privacyverklaring` | 94 | 100 | 100 | 100 | 69 (noindex, accepted) |
| `/bestaat-niet` (404) | 95 | 100 | 100 | 100 | 58 (noindex, no description; accepted) |
Home page mobile: LCP ≈ 4.3 s (simulated slow 4G), total download ≈ 1.2 MB, CLS ≈ 0.
## Known bottlenecks and follow-ups
- **Responsive images**: the first hero photo is 2560 px wide (≈325 KB), also on a phone. The fix is image variants per width from the API/CMS or an image service, used via `srcset`.
- **Render after JavaScript**: the hero title appears only after the JS bundle (≈170 kB gzip, mostly Chakra) has loaded. Prerendering (planned with hosting) fixes this.
- **Already done in this feature**:
- Hero slides load just-in-time (active, next, previous), so the download went from 2.6 MB to 1.2 MB.
- The logo is sized correctly (`htmlWidth`/`htmlHeight`).