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>
5.7 KiB
5.7 KiB
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; functional design in construction/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
@idandfounder
Steps
Images
- 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). - 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 forwidth/height. - Step 3 — Look at each photo and write descriptive Dutch alt texts (BR-OM-04), plus the preview image alt.
Content
- Step 4 —
content/types.ts: addLinkTarget,InlineLink,RichText,AboutPageContent(domain-entities.md). - Step 5 — Create
content/aboutContent.tswith the live texts, photos, booking link and person data.
SEO and pure helpers
- Step 6 —
lib/knowsAboutList.ts+ test: trim, drop empties, dedupe keeping first (example + PBT: invariants, idempotency). - Step 7 —
seo.ts:businessId,personId;professionalServicegains@id+founder; newperson(...),aboutPage(...),structuredDataScript(...);siteHeadusesstructuredDataScript. Comments in English for new code. - 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 asiteContentandknowsAboutarbitrary totest/arbitraries.ts. - Step 9 —
sitePages.ts:/over-mijtitle, description,indexed: true,ogImage.lighthouserc.cjs: move/over-mijtoindexedPaths(desktop config builds on it). Existing sync and sitemap tests updated where they list noindex pages.
Components
- Step 10 —
PageSection:labelledByoptional (BR-OM-11) + test case (no region role without it). - Step 11 —
components/PhotoDuo/PhotoDuo.tsx+ test (two images with alt, list named bylabel, axe). - Step 12 —
components/about/RichParagraph.tsx+ test (text and links in order, link targets incl. hash). - Step 13 —
components/about/AboutIntro.tsx+ test (h2, eyebrow, paragraphs, two links, portrait, region name, axe). - Step 14 —
components/about/StorySection.tsx+ test (h3 label names the region, paragraphs, children, tone, axe).
Route
- Step 15 —
routes/over-mij.tsx: head (pageHead+ AboutPage script) and composition (PageIntro → AboutIntro → StorySection background → PhotoDuo in an unnamed PageSection → StorySection personal withLinkButton accent). - Step 16 — Route tests in
app.test.tsx:/over-mijrenders in the shell with the heading outline h1/h2/h3/h3, links/portfolio,/#contact(×2), nonoindex, the AboutPage script; axe on the whole page.
Documentation
- Step 17 —
LAYOUT.md: About me diagram → Intro, About Me, Background, Photos, Personal (letters/colours A–E per.ai/layout-conventions.md). - Step 18 — Update the shared reverse engineering docs (routes table, new components, content model,
/over-mijindexed, debt item about Over mij images resolved).
Verification and summary
- Step 19 —
pnpm check(lint, format, tests incl. coverage thresholds, build, audits, Lighthouse incl./over-mijas indexed page) — nothing else running on the machine during Lighthouse. - Step 20 — Visual check of
/over-mijagainstdesign/andreaslop-static/over-mij.htmlin the browser at desktop, tablet and phone widths (screenshots); homepage layout comparison against the unit 1 build (only head changes expected). - Step 21 — Write
construction/over-mij-page/code/code-summary.mdincl. the resize command and image sizes. - 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 |