# Code Generation Plan — Unit 1: Shared blocks and content Single source of truth for code generation of this unit. Workspace root: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots` (worktree); code in `web/`. Branch `feature/soorten-fotoshoots-page` (on master `11a5224`). ## Unit Context - **Requirements**: FR-SF-02 (photos, frame colours), FR-SF-03 (anchor), FR-SF-06, FR-SF-07, SEO-SF-03 (service area), NFR-SF-02, NFR-SF-06 - **Design**: [application-design.md](../../inception/application-design/application-design.md), [component-methods.md](../../inception/application-design/component-methods.md). No Functional Design for this unit (plan decision). - **Depends on**: nothing new; reuses `PageSection`, `Reveal`, `DeferredImage`, theme. - **Used by**: unit 2 (the page); portfolio-page (commit A); contact-page (commit B). - **Behavioural contract for existing pages**: homepage and Over mij render exactly as before, except the invisible `id="prijzen"` on the pricing section and the new `areaServed` in the business JSON-LD on every page. The unit is delivered as **three commits**, in this order, so the parallel features can cherry-pick early (worktrees share the repository, so a local commit hash is enough; no push needed for that). ## Steps ### Commit A — Shoot types and photos (hash → portfolio-page) - [x] **Step 1** — Download the four live shoot photos from andreaslop.nl into the scratchpad (not the repo): `2026/07/F41A8700_websize.jpg` (Newborn), `2026/07/F41A7856_websize.jpg` (Zwangerschap), `2025/08/e77ff000dce5a31c0a38c5d824bfdb95.jpeg` (Loveshoot), `2024/09/DSC_0433-1-scaled.jpg` (Portretten). Check which photo belongs to which shoot by looking at them. - [x] **Step 2** — Gezin photo: collect candidates from the live site (portfolio, homepage), look at them, check with portfolio-page that the candidate is not one of its 10 portfolio photos (or reuse its file if it is), and propose one to the user. - [x] **Step 3** — Write a one-off resize script in the scratchpad (PowerShell/System.Drawing as in earlier features, EXIF orientation, cover crop with `-FocusX`/`-FocusY`, JPEG quality 80). Make a 4:5 crop per photo (960×1200) with a chosen focus point and a contact sheet of the five crops. **Checkpoint: show the crops to the user and adjust focus points or swap a photo until approved** (FR-SF-02). - [x] **Step 4** — Write the approved crops to `web/src/assets/shoots/{newborn,zwangerschap,gezin,loveshoot,portret}.jpg`; record exact sizes. - [x] **Step 5** — Look at each final crop and write a descriptive Dutch alt text (for Andrea to review). - [x] **Step 6** — `theme.ts`: colour tokens `frame.stone` `#ABA699`, `frame.rust` `#975030`, `frame.taupe` `#A18679`, `frame.olive` `#84847C` (English comments). - [x] **Step 7** — `content/types.ts`: `ShootTypeId`, `FrameColor`, `ShootType` (as in component-methods.md). - [x] **Step 8** — `content/shootTypes.ts`: the five shoot types in page order with the approved texts (FR-SF-02; Gezin marked in a comment as a draft pending Andrea's approval), photos, frame colours (Newborn `frame.stone`, Zwangerschap `frame.rust`, Gezin `accent`, Loveshoot `frame.taupe`, Portretten `frame.olive`) and `packageId` for newborn, zwangerschap and gezin. - [x] **Step 9** — `content/shootTypes.test.ts`: ids unique and in the agreed order, every `packageId` exists in `packages.ts`, every `frameColor` exists as a theme token, alt texts non-empty, images 4:5. A `shootType` arbitrary in `test/arbitraries.ts` for unit 2's properties. - [x] **Step 10** — Run the affected tests, lint and type check; commit A ("Adds the shoot types and their photos"); send the hash to portfolio-page. ### Commit B — Service area (hash → contact-page) - [x] **Step 11** — `content/types.ts`: `ServiceArea`, `SiteContent.serviceArea`; `content/siteContent.ts`: `[{ type: 'City', name: 'Huizen' }, { type: 'AdministrativeArea', name: 'Gooi en Vechtstreek' }]`. Update any `SiteContent` fixtures and the `siteContent` arbitrary. - [x] **Step 12** — `seo.ts`: pure `areaServed(areas)` → schema.org items (`{ '@type': type, name }`), used by `professionalService` instead of the fixed `Place` Huizen. - [x] **Step 13** — `seo.test.ts`: example test for the real content; PBT: one item per area, order kept, `@type` only `City`/`AdministrativeArea`, names unchanged, the business JSON-LD still contains no e-mail address; `jsonLdScript` output stays escaped. - [x] **Step 14** — Run the affected tests, lint and type check; commit B ("Shares the service area in the structured data"); send the hash to contact-page. ### Commit C — Shared blocks - [x] **Step 15** — `FramedImage`: optional `frameColor` (default `sand`) on the offset block + test (default unchanged, colour applied, block stays decorative). - [x] **Step 16** — `MediaText`: optional `reverse` (photo in the second column from `lg`, on top when stacked) and `frameColor` passed through + tests (default order unchanged, reversed order, DOM order photo-first in both cases so reading order stays the same). - [x] **Step 17** — Move `components/about/RichParagraph/` → `components/RichParagraph/` (component and test, `git mv`), update the import in `AboutIntro`. - [x] **Step 18** — `components/CallToAction/CallToAction.tsx` + test: section named by its h2, `paper.alt`, narrow centred column, tight spacing, lead and children rendered, `Reveal`, axe. - [x] **Step 19** — `home/Pricing`: `id="prijzen"` on its `PageSection` + test (the section has the id; the anchor lands below the fixed header via the existing `scrollMarginTop`). - [x] **Step 20** — `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse) with nothing else heavy running on the machine. - [x] **Step 21** — Visual check: homepage (About block, pricing) and `/over-mij` against master at desktop, tablet and phone widths; only invisible changes expected. - [x] **Step 22** — Write `construction/shared-blocks-and-content/code/code-summary.md` (files, resize commands, image sizes, alt texts, commit hashes). - [x] **Step 23** — Commit C ("Extends the shared blocks for the shoot types page"). Push only when asked. ## Extension Compliance (unit 1) | Rule | Status | Rationale | |---|---|---| | SECURITY-04 | Compliant | CSP unchanged; only self-hosted images | | SECURITY-10 | Compliant | No new dependencies; image processing is a one-off local step | | SECURITY-11 | Compliant | JSON-LD through `jsonLdScript`; no e-mail (PBT, Step 13) | | SECURITY-13 | Compliant | No external resources at runtime | | Other SECURITY rules | N/A | No data stores, endpoints, auth or infrastructure | | PBT-01 | Compliant | Properties for `areaServed` listed in Step 13; unit 2's in its Functional Design | | PBT-02 | Compliant | `jsonLdScript` round-trip already tested | | PBT-03 | Planned | `areaServed` invariants (Step 13) | | PBT-04, PBT-05, PBT-06 | N/A | No idempotent, oracle or stateful logic in this unit | | PBT-07 | Planned | `shootType` arbitrary, `serviceArea` in the `siteContent` arbitrary (Steps 9, 11) | | PBT-08, PBT-09 | Compliant | Existing seed logging and fast-check setup | | PBT-10 | Planned | Example-based component tests alongside PBT |