Files
SluijsensandClaude Opus 5.5 e15215393e Adds the Over mij page
Replaces the placeholder with the page from the design and the texts from
the live site: Andrea's introduction with her portrait, how it started,
two photos, life outside photography and a booking button. The page is
now indexed, with its own title, description, preview image and AboutPage
data about Andrea.

The portrait loads straight away instead of after the page, since on
phones it is the largest paint. Lighthouse no longer lets every indexed
page use the homepage's lower mobile performance target; it now only
applies to the homepage itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 01:17:33 +02:00

65 lines
5.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Code Generation Plan — Unit 2: Over mij page
Single source of truth for code generation of this unit. Workspace root: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie`; code in `web/`. Branch `feature/over-mij-page`.
## Unit Context
- **Requirements**: FR-OM-01..08, SEO-OM-01..05, NFR-OM-01, 03..06
- **Design**: [application-design.md](../../inception/application-design/application-design.md); functional design in [construction/over-mij-page/functional-design/](../over-mij-page/functional-design/) (BR-OM-*, BR-SD-*, BR-SEO-OM-*)
- **Depends on**: unit 1 (`PageSection`, `MediaText`, `Eyebrow`) — done
- **Behavioural contract for existing pages**: the homepage and other pages only change in their head: the business JSON-LD gains `@id` and `founder`
## Steps
### Images
- [x] **Step 1** — Download the originals from andreaslop.nl: portrait `2024/10/WhatsApp-Image-2024-10-27-at-14.31.41.jpeg`, `2025/08/slide-1.jpg`, `2025/08/IMG_1718.jpg` (into the scratchpad, not the repo).
- [x] **Step 2** — Resize once with the same one-off PowerShell/System.Drawing approach as homepage-sections (quality 80): portrait and duo photos to 1200 px wide → `web/src/assets/about/andrea-portret.jpg`, `about-1.jpg`, `about-2.jpg`; a 1200×630 centre-weighted crop of the portrait → `web/public/og-over-mij.jpg`. Record exact sizes for `width`/`height`.
- [x] **Step 3** — Look at each photo and write descriptive Dutch alt texts (BR-OM-04), plus the preview image alt.
### Content
- [x] **Step 4** — `content/types.ts`: add `LinkTarget`, `InlineLink`, `RichText`, `AboutPageContent` (domain-entities.md).
- [x] **Step 5** — Create `content/aboutContent.ts` with the live texts, photos, booking link and person data.
### SEO and pure helpers
- [x] **Step 6** — `lib/knowsAboutList.ts` + test: trim, drop empties, dedupe keeping first (example + PBT: invariants, idempotency).
- [x] **Step 7** — `seo.ts`: `businessId`, `personId`; `professionalService` gains `@id` + `founder`; new `person(...)`, `aboutPage(...)`, `structuredDataScript(...)`; `siteHead` uses `structuredDataScript`. Comments in English for new code.
- [x] **Step 8** — `seo.test.ts`: example tests for the real content and PBT properties from business-logic-model.md (ids, sameAs, no e-mail, registry match); add a `siteContent` and `knowsAbout` arbitrary to `test/arbitraries.ts`.
- [x] **Step 9** — `sitePages.ts`: `/over-mij` title, description, `indexed: true`, `ogImage`. `lighthouserc.cjs`: move `/over-mij` to `indexedPaths` (desktop config builds on it). Existing sync and sitemap tests updated where they list noindex pages.
### Components
- [x] **Step 10** — `PageSection`: `labelledBy` optional (BR-OM-11) + test case (no region role without it).
- [x] **Step 11** — `components/PhotoDuo/PhotoDuo.tsx` + test (two images with alt, list named by `label`, axe).
- [x] **Step 12** — `components/about/RichParagraph.tsx` + test (text and links in order, link targets incl. hash).
- [x] **Step 13** — `components/about/AboutIntro.tsx` + test (h2, eyebrow, paragraphs, two links, portrait, region name, axe).
- [x] **Step 14** — `components/about/StorySection.tsx` + test (h3 label names the region, paragraphs, children, tone, axe).
### Route
- [x] **Step 15** — `routes/over-mij.tsx`: head (`pageHead` + AboutPage script) and composition (PageIntro → AboutIntro → StorySection background → PhotoDuo in an unnamed PageSection → StorySection personal with `LinkButton accent`).
- [x] **Step 16** — Route tests in `app.test.tsx`: `/over-mij` renders in the shell with the heading outline h1/h2/h3/h3, links `/portfolio`, `/#contact` (×2), no `noindex`, the AboutPage script; axe on the whole page.
### Documentation
- [x] **Step 17** — `LAYOUT.md`: About me diagram → Intro, About Me, Background, Photos, Personal (letters/colours A–E per `.ai/layout-conventions.md`).
- [x] **Step 18** — Update the shared reverse engineering docs (routes table, new components, content model, `/over-mij` indexed, debt item about Over mij images resolved).
### Verification and summary
- [x] **Step 19** — `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse incl. `/over-mij` as indexed page) — nothing else running on the machine during Lighthouse.
- [x] **Step 20** — Visual check of `/over-mij` against `design/andreaslop-static/over-mij.html` in the browser at desktop, tablet and phone widths (screenshots); homepage layout comparison against the unit 1 build (only head changes expected).
- [x] **Step 21** — Write `construction/over-mij-page/code/code-summary.md` incl. the resize command and image sizes.
- [x] **Step 22** — Commit on `feature/over-mij-page` (push/deploy only when asked).
## Extension Compliance (unit 2)
| Rule | Status | Rationale |
|---|---|---|
| SECURITY-04 | Compliant | CSP unchanged; only self-hosted images |
| SECURITY-10 | Compliant | No new dependencies; image resizing is a one-off local step |
| SECURITY-11 | Compliant | JSON-LD through `jsonLdScript`; e-mail excluded (BR-SD-01, PBT) |
| SECURITY-13 | Compliant | No external resources at runtime |
| Other SECURITY rules | N/A | No data stores, endpoints, auth or infrastructure |
| PBT-01 | Compliant | Properties identified in business-logic-model.md |
| PBT-02 | Compliant | `jsonLdScript` round-trip already tested |
| PBT-03 | Planned | Invariants for ids, sameAs, no e-mail, knowsAbout (Steps 6, 8) |
| PBT-04 | Planned | `knowsAboutList` idempotency (Step 6) |
| PBT-05, PBT-06 | N/A | No oracle, no stateful logic |
| PBT-07 | Planned | `siteContent` and `knowsAbout` arbitraries (Step 8) |
| PBT-08, PBT-09 | Compliant | Existing seed logging and fast-check setup |
| PBT-10 | Planned | Example-based component and route tests alongside PBT |