From ce2cb92539a6f3ad4722cab40e298b49f9bd7974 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 25 Oct 2026 13:00:28 +0100 Subject: [PATCH] Records unit 2 of the Soorten fotoshoots page as generated Adds the functional design and code generation plan of unit 2, its code summary with the verification, the agreements with the parallel features, and updates the shared reverse engineering lines, the state and the audit log. Co-Authored-By: Claude Opus 5.5 --- .../reverse-engineering/api-documentation.md | 8 ++- .../reverse-engineering/architecture.md | 6 +- .../reverse-engineering/business-overview.md | 3 +- .../reverse-engineering/code-structure.md | 9 ++- .../component-inventory.md | 2 +- aidlc-docs/active-features.md | 2 +- .../soorten-fotoshoots-page/aidlc-state.md | 7 +- .../features/soorten-fotoshoots-page/audit.md | 72 +++++++++++++++++++ ...en-fotoshoots-page-code-generation-plan.md | 64 +++++++++++++++++ .../soorten-fotoshoots-page-fd-questions.md | 46 ++++++++++++ ...-fotoshoots-page-functional-design-plan.md | 10 +++ .../code/code-summary.md | 31 ++++++++ .../functional-design/business-logic-model.md | 60 ++++++++++++++++ .../functional-design/business-rules.md | 56 +++++++++++++++ .../functional-design/domain-entities.md | 66 +++++++++++++++++ .../functional-design/frontend-components.md | 49 +++++++++++++ 16 files changed, 477 insertions(+), 14 deletions(-) create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-code-generation-plan.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-fd-questions.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-functional-design-plan.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/code/code-summary.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/functional-design/business-logic-model.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/functional-design/business-rules.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/functional-design/domain-entities.md create mode 100644 aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/functional-design/frontend-components.md diff --git a/aidlc-docs/_shared/reverse-engineering/api-documentation.md b/aidlc-docs/_shared/reverse-engineering/api-documentation.md index e2e5078..4e4e97b 100644 --- a/aidlc-docs/_shared/reverse-engineering/api-documentation.md +++ b/aidlc-docs/_shared/reverse-engineering/api-documentation.md @@ -14,7 +14,7 @@ None. There is no back-end yet (`api/` is empty). The static design README antic | `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` + six home sections; search `?pakket=` | yes | | `/over-mij` | `routes/over-mij.tsx` | `pageHead('/over-mij')` + `AboutPage` JSON-LD | `PageIntro`, `AboutIntro`, `StorySection` ×2, `PhotoDuo`, `LinkButton` | yes | | `/portfolio` | `routes/portfolio.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | -| `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | +| `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead('/soorten-fotoshoots')` + `WebPage` JSON-LD (`webPage()` + `shootServices()`) | `PageIntro`, `shoots/ShootList` (5× `ShootBlock`), `CallToAction`, `RichParagraph`, `LinkButton` | yes | | `/contact` | `routes/contact.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | | `/privacyverklaring` | `routes/privacyverklaring.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | | (not found) | — | — | `NotFound` | — | @@ -33,14 +33,16 @@ None. There is no back-end yet (`api/` is empty). The static design README antic - `Hero({ content: HeroContent, socials: SocialLink[] })`, `HeroArrows({ onPrev, onNext })`, `HeroPauseButton({ stopped, onToggle })`, `HeroSocials({ socials })` - `PageIntro({ title, eyebrow?, children? })` — renders the page's only h1 - `PageSection({ labelledBy, id?, tone?: 'paper' | 'alt', width?: 'default' | 'narrow' | 'full', spacing?: 'default' | 'tight' | 'flushTop', 'data-testid'?, children })` (was `HomeSection`) -- `MediaText({ image, aspectRatio, 'data-testid'?, children })` — framed photo next to a text column +- `MediaText({ image, aspectRatio, priority?, reverse?, frameColor?, 'data-testid'?, children })` — framed photo next to a text column; `reverse` puts the photo right from `lg`, `frameColor` colours the block behind it (default `sand`) +- `CallToAction({ title, titleId, lead?, 'data-testid'?, children })` — closing block of a page: h2, lead, action, on `paper.alt` +- `RichParagraph({ paragraph: RichText })` — paragraph with inline links (moved from `about/`) - `Eyebrow(TextProps & { as?: 'p' | 'span' | 'h2' | 'h3' | 'h4' })` — accent label, optionally a heading - `SectionHeading({ id, title, eyebrow?, lead?, align?: 'center' | 'start', spacing?: 'default' | 'compact', focusable? })` — renders an h2 - `FramedImage({ image: ContentImage, aspectRatio })`, `DeferredImage(ImageProps & { image, near? })`, `Reveal(BoxProps & { delay? })` - `IntroGallery({ content })`, `AboutBlock({ content })`, `Pricing({ content, packages })`, `PriceCard(...)`, `Testimonials({ content, testimonials })`, `ContactSection({ content, packages, enabled, email, pakket? })`, `InstagramGrid({ content, profileUrl })` - `ContactForm(...)`, `ContactFormGate({ enabled, email, ... })` - `PhotoDuo({ photos: [ContentImage, ContentImage], label, 'data-testid'? })` -- `about/AboutIntro({ content })`, `about/StorySection({ content, titleId, tone?, spacing?, children? })`, `about/RichParagraph({ paragraph: RichText })` +- `about/AboutIntro({ content })`, `about/StorySection({ content, titleId, tone?, spacing?, children? })`, `shoots/ShootList({ shoots, packages, portfolioLive })`, `shoots/ShootBlock({ shoot, packages, reverse, priority, portfolioLive })` - `StatusPage({ title, children, actions? })`, `ErrorPage({ error, reset })` - `LinkButton(RouterLink props & { variant?: 'outline' | 'accent' | 'light' })` - `UmamiAnalytics({ hostname? })` diff --git a/aidlc-docs/_shared/reverse-engineering/architecture.md b/aidlc-docs/_shared/reverse-engineering/architecture.md index 5444516..d283e15 100644 --- a/aidlc-docs/_shared/reverse-engineering/architecture.md +++ b/aidlc-docs/_shared/reverse-engineering/architecture.md @@ -17,10 +17,10 @@ graph TD Shell --> Umami["UmamiAnalytics"] Outlet --> Home["routes/index.tsx: Hero + six sections"] Outlet --> About["routes/over-mij.tsx: about page"] - Outlet --> Placeholders["portfolio, soorten-fotoshoots, contact, privacyverklaring: PageIntro"] + Outlet --> Placeholders["portfolio, contact, privacyverklaring: PageIntro"] Home --> Hero["Hero (HeroArrows, HeroPauseButton, HeroSocials, useHeroSlider)"] Home --> Sections["components/home/: IntroGallery, AboutBlock, Pricing, Testimonials, ContactSection, InstagramGrid"] - Sections --> Blocks["Shared blocks: PageSection, MediaText, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal"] + Sections --> Blocks["Shared blocks: PageSection, MediaText, CallToAction, RichParagraph, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal"] Sections --> Form["ContactForm + ContactFormGate (lazy), contact/"] Content["content/: siteContent, heroContent, homeContent, packages, testimonials, types"] -.-> Shell Content -.-> Home @@ -79,7 +79,7 @@ Text alternative: main.tsx starts Sentry and mounts the router; the root route r ### Shared section building blocks - **Purpose**: Reusable pieces extracted during homepage-sections; `HomeSection` was renamed to `PageSection` and `MediaText`/`Eyebrow` were extracted in over-mij-page -- **Responsibilities**: `PageSection` (section frame: `aria-labelledby`, tone `paper`/`alt`, width `default`/`narrow`/`full`, spacing `default`/`tight`/`flushTop`, anchor offset), `MediaText` (framed photo next to a text column, design `.about`), `Eyebrow` (accent label, optionally a heading), `SectionHeading` (eyebrow + h2 + lead, align start/center, compact spacing), `FramedImage` (photo with sand-coloured offset block, design `.about__media`), `DeferredImage` (loads after page load and near the viewport, reserves space), `Reveal` (fade-in on scroll, content always in the DOM, reduced motion respected) +- **Responsibilities**: `PageSection` (section frame: `aria-labelledby`, tone `paper`/`alt`, width `default`/`narrow`/`full`, spacing `default`/`tight`/`flushTop`, anchor offset), `MediaText` (framed photo next to a text column, design `.about`), `Eyebrow` (accent label, optionally a heading), `SectionHeading` (eyebrow + h2 + lead, align start/center, compact spacing), `FramedImage` (photo with a coloured offset block, sand by default, design `.about__media`), `CallToAction` (closing block: h2, lead, action; added in soorten-fotoshoots-page), `RichParagraph` (paragraph with inline links), `DeferredImage` (loads after page load and near the viewport, reserves space), `Reveal` (fade-in on scroll, content always in the DOM, reduced motion respected) - **Type**: Application (shared UI) ### components/PageIntro/, StatusPage/ diff --git a/aidlc-docs/_shared/reverse-engineering/business-overview.md b/aidlc-docs/_shared/reverse-engineering/business-overview.md index 4cd8886..1fe1735 100644 --- a/aidlc-docs/_shared/reverse-engineering/business-overview.md +++ b/aidlc-docs/_shared/reverse-engineering/business-overview.md @@ -36,7 +36,8 @@ Text alternative: visitors and crawlers use the website, which links out to soci - **Share / discover pages** — per-page title, description, canonical URL, Open Graph tags, JSON-LD (ProfessionalService), sitemap.xml, robots.txt - **Recover from errors** — 404 page inside the shell, error page with retry - **Read about the photographer** — Over mij page: introduction with portrait, how it started, two photos, life outside photography, links to the portfolio and contact, "Boek je shoot" - - *Placeholder pages (noindex)*: Portfolio, Soorten fotoshoots, Contact, Privacyverklaring + - *Soorten fotoshoots* (`/soorten-fotoshoots`, indexed): the five shoot types (Newborn, Zwangerschap, Gezin, Loveshoot, Portretten) with photo, text, a contact link (package preselected where one exists) and, once the portfolio is live, a filtered portfolio link; closing call to action to the prices + - *Placeholder pages (noindex)*: Portfolio, Contact, Privacyverklaring - *Planned (static design only)*: portfolio with lightbox, shoot types and pricing page, contact page - **Business Dictionary**: - **Shell** — the Header / page content / Footer frame shared by every page (see LAYOUT.md) diff --git a/aidlc-docs/_shared/reverse-engineering/code-structure.md b/aidlc-docs/_shared/reverse-engineering/code-structure.md index f71dc65..c41f0aa 100644 --- a/aidlc-docs/_shared/reverse-engineering/code-structure.md +++ b/aidlc-docs/_shared/reverse-engineering/code-structure.md @@ -57,10 +57,15 @@ Candidates for modification are marked with ★ for the over-mij-page feature. - `web/src/routes/__root.tsx` — root layout, site head, 404/error - `web/src/routes/index.tsx` — home (`/`): Hero + six sections, `?pakket=` search param - `web/src/routes/over-mij.tsx` — the about page (indexed; `AboutPage` JSON-LD) -- `web/src/components/about/*` — `AboutIntro`, `StorySection`, `RichParagraph` +- `web/src/components/about/*` — `AboutIntro`, `StorySection` +- `web/src/components/shoots/*` — `ShootList`, `ShootBlock` (soorten-fotoshoots page) +- `web/src/components/{CallToAction,RichParagraph}/` — shared closing block; paragraph with inline links +- `web/src/content/{shootTypes,shootTypesPageContent}.ts` — shoot types (also used by the portfolio filters) and page texts; `web/src/assets/shoots/` — 4:5 shoot photos +- `web/src/lib/shootLinks.ts` — contact and portfolio link targets per shoot type - `web/src/components/PhotoDuo/PhotoDuo.tsx` — two photos side by side - `web/src/content/aboutContent.ts` — about page content; `web/src/assets/about/*` — portrait and duo photos; `web/public/og-over-mij.jpg` — preview image -- `web/src/routes/{portfolio,soorten-fotoshoots,contact,privacyverklaring}.tsx` — placeholders with `PageIntro` +- `web/src/routes/soorten-fotoshoots.tsx` — the shoot types page +- `web/src/routes/{portfolio,contact,privacyverklaring}.tsx` — placeholders with `PageIntro` - `web/src/components/AppShell.tsx` — shell - `web/src/components/NavigationBar/*` — header, NavLink, MobileNav - `web/src/components/Footer/*` — footer, FooterColumn, FooterLink diff --git a/aidlc-docs/_shared/reverse-engineering/component-inventory.md b/aidlc-docs/_shared/reverse-engineering/component-inventory.md index 1c76faf..becfd09 100644 --- a/aidlc-docs/_shared/reverse-engineering/component-inventory.md +++ b/aidlc-docs/_shared/reverse-engineering/component-inventory.md @@ -8,7 +8,7 @@ - `web/config/` + `web/deploy/` — security headers and generated nginx (test) / IIS (production) configuration ## Shared Packages -- None as separate packages. Inside `web`: `theme.ts`, `recipes/`, `content/`, `lib/`, `seo.ts`, `navigation.ts`, `hooks/`, `components/LinkButton.tsx`, `components/RouterLink.tsx`, `components/PageIntro/`, and the section blocks `PageSection`, `MediaText`, `Eyebrow`, `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal` +- None as separate packages. Inside `web`: `theme.ts`, `recipes/`, `content/`, `lib/`, `seo.ts`, `navigation.ts`, `hooks/`, `components/LinkButton.tsx`, `components/RouterLink.tsx`, `components/PageIntro/`, and the section blocks `PageSection`, `MediaText`, `CallToAction`, `RichParagraph`, `Eyebrow`, `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal` ## Test Packages - None as separate packages. Tests are co-located (`*.test.ts(x)`) and run with Vitest (unit, component, property-based with fast-check, accessibility with axe-core); Lighthouse CI for quality budgets diff --git a/aidlc-docs/active-features.md b/aidlc-docs/active-features.md index 3944764..ba5df61 100644 --- a/aidlc-docs/active-features.md +++ b/aidlc-docs/active-features.md @@ -6,4 +6,4 @@ | Feature | frontend-shell | ✅ Complete | feature/frontend-shell | web/src (AppShell, NavigationBar, Footer, Hero socials, new BackToTop/SkipLink/404/error pages, routes, theme.ts, main.tsx), web/vite.config.js, web/package.json | 2026-10-14 | | Feature | homepage-sections | ✅ Complete | feature/homepage-sections | web/src/routes/index.tsx, new homepage section components, web/src/content (types + static content), possibly web/config/securityHeaders.ts (contact form) | 2026-10-19 | | Feature | over-mij-page | ✅ Complete | feature/over-mij-page | web/src/routes/over-mij.tsx, web/src/content, possibly shared components (PageIntro, FramedImage, SectionHeading) and web/src/seo.ts | 2026-10-22 | -| Feature | soorten-fotoshoots-page | 🔵 Inception | feature/soorten-fotoshoots-page | web/src/routes/soorten-fotoshoots.tsx, new web/src/content/shootTypes.ts, new web/src/assets/shoots/, new shared CallToAction, MediaText (reverse prop), Pricing (id="prijzen" only), siteContent (service area), own entries in sitePages.ts / lighthouserc.cjs, JSON-LD via the shared webPage() helper in seo.ts | 2026-10-24 | +| Feature | soorten-fotoshoots-page | 🟢 Construction | feature/soorten-fotoshoots-page | web/src/routes/soorten-fotoshoots.tsx, new web/src/content/shootTypes.ts, new web/src/assets/shoots/, new shared CallToAction, MediaText (reverse prop), Pricing (id="prijzen" only), siteContent (service area), own entries in sitePages.ts / lighthouserc.cjs, JSON-LD via the shared webPage() helper in seo.ts | 2026-10-24 | diff --git a/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md b/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md index 817f8d3..845d1ad 100644 --- a/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md +++ b/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: soorten-fotoshoots-page - **Project Type**: Brownfield - **Start Date**: 2026-10-24T19:30:00Z -- **Current Stage**: CONSTRUCTION - Code Generation unit 1 Shared blocks and content (generated, awaiting approval) +- **Current Stage**: CONSTRUCTION - Code Generation unit 2 Soorten fotoshoots page (generated and verified; push, deploy to test and PR in progress) - **Branch**: feature/soorten-fotoshoots-page (fast-forwarded to master 11a5224 after over-mij-page merged, PR #7) - **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots @@ -46,6 +46,7 @@ Agreed with the parallel sessions (contact-page, portfolio-page, over-mij-page) - If this feature reaches Code Generation before contact-page's `webPage()` commit exists: ask contact-page first whether this feature should add `webPage()` exactly to the agreed signature (then contact-page rebases on it), rather than writing a page-specific function - contact-page also changes `content/types.ts` and `siteContent.ts` (its unit 2): `SocialLink.label?`, `SiteContent.contactForm = { enabled, replyTime }`. Different fields from `serviceArea`; whoever commits second resolves the small textual conflict - Lighthouse (`pnpm check`, preview on port 4173 `--strictPort`): send "claim 4173" to the other sessions before starting and "4173 free" when done; no heavy runs (full vitest with coverage, build) while someone else's Lighthouse runs +- Test environment (one, last deploy wins): "claim test" with the reason before a `deploy_test` dispatch, "test free" after the review; a merge to master also deploys to test, so check for an open test claim before merging and announce the merge - Claims of others: contact-page — ContactForm generalisation, contact-details block, `/contact?onderwerp=` (pending its user's decision); portfolio-page — PortfolioGrid, Lightbox, InstagramGrid move to shared - over-mij-page sends the merge commit once merged; all stacked features then rebase onto master @@ -71,11 +72,11 @@ Agreed with the parallel sessions (contact-page, portfolio-page, over-mij-page) - [x] Units Generation - SKIP ### 🟢 CONSTRUCTION PHASE -- [ ] Functional Design - EXECUTE (unit 2) / SKIP (unit 1) +- [x] Functional Design - EXECUTE (unit 2 ✅) / SKIP (unit 1) - [x] NFR Requirements - SKIP - [x] NFR Design - SKIP - [x] Infrastructure Design - SKIP -- [~] Code Generation - EXECUTE (per unit): 1 Shared blocks and content (generated, commits eb23536 / befe97a / 6cf9095, awaiting approval) → 2 Soorten fotoshoots page +- [~] Code Generation - EXECUTE (per unit): 1 Shared blocks and content ✅ (eb23536 / befe97a / 6cf9095) → 2 Soorten fotoshoots page (generated, verified, awaiting review on test) - [ ] Build and Test - EXECUTE ### 🟡 OPERATIONS PHASE diff --git a/aidlc-docs/features/soorten-fotoshoots-page/audit.md b/aidlc-docs/features/soorten-fotoshoots-page/audit.md index 766b7be..008d4ff 100644 --- a/aidlc-docs/features/soorten-fotoshoots-page/audit.md +++ b/aidlc-docs/features/soorten-fotoshoots-page/audit.md @@ -179,3 +179,75 @@ **Context**: CONSTRUCTION - Code Generation unit 1 (complete, awaiting approval) --- + +## Code Generation Unit 1 — Approval + +**Timestamp**: 2026-10-25T08:45:00Z + +**User Input**: "Ga verder" + +**AI Response**: "Unit 1 approved. active-features.md status set to 🟢 Construction. Started Functional Design for unit 2: plan and a separate question file with 3 questions (anchor per shoot, publication of the Gezin draft and alt texts, Service description source)." + +**Context**: CONSTRUCTION - Code Generation unit 1 (approved) → Functional Design unit 2 (questions open) + +--- + +## Functional Design Unit 2 — Answers and Artifacts + +**Timestamp**: 2026-10-25T09:00:00Z + +**User Input**: "Kan de vragen hierheen sturen" — answered in chat: Q1 "Ja, alleen ankers (Recommended)", Q2 "Merge wacht op Andrea (Recommended)", Q3 "Eerste alinea (Recommended)"; then "Zet de antwoorden ook in het bestand voor naslag" + +**AI Response**: "Asked the three questions in chat at the user's request and recorded the answers (A, A, A) in soorten-fotoshoots-page-fd-questions.md. Generated functional-design/ (domain-entities, business-rules BR-SF-01..18, business-logic-model with PBT properties, frontend-components)." + +**Context**: CONSTRUCTION - Functional Design unit 2 (awaiting approval) + +--- + +## Functional Design Unit 2 — Approval + +**Timestamp**: 2026-10-25T09:15:00Z + +**User Input**: "Ga verder" + +**AI Response**: "Functional design approved. Asked contact-page about the status of webPage() and offered to add it to the agreed signature in a separate commit. Wrote construction/plans/soorten-fotoshoots-page-code-generation-plan.md (19 steps) and asked for plan approval." + +**Context**: CONSTRUCTION - Functional Design unit 2 (approved) → Code Generation unit 2, Part 1 (awaiting plan approval) + +--- + +## Code Generation Unit 2 — Plan Approval and Generation + +**Timestamp**: 2026-10-25T09:30:00Z + +**User Input**: "Approve plan. Je mag meteen committen en pushen en deployen naar test zodat het daar bekeken kan worden. Alzodra de build slaagt mag je een pr maken zodat er voor deze run geen dubbele workflow draait" + +**AI Response**: "Plan approved, with permission (scoped to this unit) to commit, push, deploy to test and open a PR once the run succeeds. Generated the preview image (sent to the user), cherry-picked contact-page's webPage() (790495d → 3c7d00e), content, shootLinks, shootServices/absoluteUrl, ShootList/ShootBlock, the route, route tests, LAYOUT.md and the RE lines. Contact link name changed to aria-label after a failing test showed the hidden span's leading space was dropped. Agreed a 'claim test / test free' protocol with the peers (merge to master also deploys to test)." + +**Context**: CONSTRUCTION - Code Generation unit 2 (Part 2) + +--- + +## Code Generation Unit 2 — Lighthouse Thresholds + +**Timestamp**: 2026-10-25T11:00:00Z + +**User Input**: answered in chat: first "Bundel eerst kleiner maken", then "Drempel gelijk aan homepage-aanpak (Recommended)" + +**AI Response**: "Diagnosed failing Lighthouse runs: one homepage run at 0.69 was taken at half CPU speed (benchmarkIndex 1909); otherwise the homepage sits at 0.77–0.80 against 0.8 and the photo pages at ~0.897 against 0.9 (simulated LCP 3.22 s, same on /over-mij). Tried a no-fade priority photo (no effect, reverted); re-cropped the shoot photos at 848×1060 because the two 1600 px originals had been upscaled (fewer bytes, LCP unchanged). At the user's choice, moved the JSON-LD from head() into the page component (main bundle +0.3 kB gzip instead of +1.3 kB) and added photoPagePaths (/over-mij, /soorten-fotoshoots) with mobile 0.85 to lighthouserc.cjs; the desktop config now raises every entry to 0.9. Rule shared with portfolio-page and contact-page. A leftover vite preview of the measurement script held port 4173 for a while; stopped, script fixed, contact informed." + +**Context**: CONSTRUCTION - Code Generation unit 2 (Part 2) + +--- + +## PC Restart and Resume + +**Timestamp**: 2026-10-25T12:58:00Z + +**User Input**: "de pc is tussendoor uit gegaan. kan je de ssh agent weer starten. dan voeg ik mijn key toe dan kunnen alle sessies weer pushen wanneer ik dat vraag. Dan kan je verder waar je gebleven was" and "mijn sessielimiet zit er bijna op, die wordt over een uur gereset. kan je een timer zetten dat je over een uur weer verder gaat waar je mee bezig was?" + +**AI Response**: "Started a new ssh-agent without a lifetime (~/.ssh/agent.env); the user added their key. Reran Lighthouse on the same build (passed). Scheduled a one-shot resume at 12:58. Visual check of /soorten-fotoshoots at three widths against the design (screenshots sent); filled in the verification in the code summary." + +**Context**: CONSTRUCTION - Code Generation unit 2 (verification complete, committing) + +--- diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-code-generation-plan.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-code-generation-plan.md new file mode 100644 index 0000000..daa4b71 --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-code-generation-plan.md @@ -0,0 +1,64 @@ +# Code Generation Plan — Unit 2: Soorten fotoshoots page + +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`. + +## Unit Context +- **Requirements**: FR-SF-01..05 (incl. 04b), FR-SF-08, SEO-SF-01..05, NFR-SF-01, 03..05, 07 +- **Design**: [application-design.md](../../inception/application-design/application-design.md); functional design in [construction/soorten-fotoshoots-page/functional-design/](../soorten-fotoshoots-page/functional-design/) (BR-SF-01..18) +- **Depends on**: unit 1 (`shootTypes`, `MediaText` options, `CallToAction`, `RichParagraph`, `#prijzen`, `areaServed`) — done; `webPage()` from contact-page (see Step 6) +- **Behavioural contract for other pages**: none change, except that the sitemap and Lighthouse indexed list gain `/soorten-fotoshoots` + +## Steps + +### Preview image +- [x] **Step 1** — 1200×630 crop of the Newborn original (focus on the face) with the unit 1 scratchpad script → `web/public/og-soorten-fotoshoots.jpg`; show it to the user with the alt text before it is fixed (checkpoint, like the shoot crops). + +### Content +- [x] **Step 2** — `content/types.ts`: `ShootTypesPageContent` (domain-entities.md). +- [x] **Step 3** — `content/shootTypesPageContent.ts`: page head, closing title, lead (`RichText` with "de pakketten" → `/#prijzen`) and booking link. + +### Pure functions +- [x] **Step 4** — `lib/shootLinks.ts`: `shootContactLink(shoot, packages)`, `shootPortfolioLink(shoot)`, `isPortfolioLive(pages)` (BR-SF-01..05). +- [x] **Step 5** — `lib/shootLinks.test.ts`: examples for the real content (newborn with `?pakket`, loveshoot without, portfolio live/not live) and PBT from business-logic-model.md (`to`/`hash` fixed, `pakket` iff visible package id, no foreign values, portfolio search equals id). + +### SEO +- [x] **Step 6** — `webPage()`: contact-page has it done and tested, waiting for its user's approval (generic over `extra`: `webPage(type, path, extra?)`). Do **not** build it here: write against the signature and cherry-pick contact-page's commit (seo.ts + seo.test.ts) as soon as the hash arrives; the route and its head test can only be committed after that. +- [x] **Step 7** — `seo.ts`: `absoluteUrl(src)` and `shootServices(shoots, site)` (BR-SF-10..15). +- [x] **Step 8** — `seo.test.ts`: examples for the real shoot list (5 items, `@id`s with anchors, first paragraph, provider, area, no prices) and PBT (count and positions, distinct `@id`s, provider/area invariants, no e-mail, `absoluteUrl` invariant + idempotency). +- [x] **Step 9** — `sitePages.ts`: `/soorten-fotoshoots` `indexed: true`, new description, `ogImage`. `lighthouserc.cjs`: move `/soorten-fotoshoots` to `indexedPaths` (only this entry). + +### Components +- [x] **Step 10** — `components/shoots/ShootBlock/ShootBlock.tsx` + test: `article` with anchor id and name, h2, paragraphs, `MediaText` (4:5, frame colour, reverse, priority), contact link with hidden completion, portfolio link only when live, axe. +- [x] **Step 11** — `components/shoots/ShootList/ShootList.tsx` + test: order, alternation (`reverse` on 2nd/4th), divider on every block after the first, only the first photo with priority, axe. + +### Route +- [x] **Step 12** — `routes/soorten-fotoshoots.tsx`: head (`pageHead` + `structuredDataScript(webPage(...))`) and composition (PageIntro with intro → ShootList → CallToAction with RichParagraph lead and `LinkButton accent`). +- [x] **Step 13** — Route tests in `app.test.tsx`: `/soorten-fotoshoots` in the shell; heading outline (h1, 5× h2 shoots, h2 closing); five articles with anchors; contact links incl. `?pakket` targets; no portfolio links while `/portfolio` is noindex; `/#prijzen` link; no `noindex`; the `WebPage` script with 5 services; axe on the whole page. + +### Documentation +- [x] **Step 14** — `LAYOUT.md`: "Types of shoots" → Intro, Newborn, Pregnancy, Family, Loveshoot, Portraits, Prices & Book, per `.ai/layout-conventions.md`. +- [x] **Step 15** — `_shared/reverse-engineering/`: only this feature's lines (route table, new components `CallToAction`, `shoots/*`, `RichParagraph` location, content `shootTypes`/page content, `serviceArea`, `/soorten-fotoshoots` indexed). + +### Verification and summary +- [x] **Step 16** — `pnpm check` (lint, format, tests incl. coverage, build, audits, Lighthouse with `/soorten-fotoshoots` as indexed page), after "claim 4173" to the peers and "4173 free" afterwards. +- [x] **Step 17** — Visual check of `/soorten-fotoshoots` against `design/andreaslop-static/soorten-fotoshoots.html` at desktop, tablet and phone widths (puppeteer-core screenshots); anchors `#newborn` and `/#prijzen` land below the header; screenshots sent to the user. +- [x] **Step 18** — Write `construction/soorten-fotoshoots-page/code/code-summary.md` (files, preview image, verification, open items for Andrea). +- [x] **Step 19** — Commit(s) on `feature/soorten-fotoshoots-page`. Push/deploy to test only when asked; the merge to master waits for Andrea's approval of the Gezin text and the alt texts (BR-SF-17). + +## Extension Compliance (unit 2) +| Rule | Status | Rationale | +|---|---|---| +| SECURITY-04 | Compliant | CSP unchanged; only self-hosted images | +| SECURITY-05 | Compliant | Query parameters only from our own package and shoot ids (BR-SF-03, PBT) | +| SECURITY-10 | Compliant | No new dependencies | +| SECURITY-11 | Compliant | JSON-LD through `jsonLdScript`; no e-mail, no prices (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 | Link and structured data invariants (Steps 5, 8) | +| PBT-04 | Planned | `absoluteUrl` idempotency (Step 8) | +| PBT-05, PBT-06 | N/A | No oracle, no stateful logic | +| PBT-07 | Compliant | `shootType`/`uniqueShootTypes` from unit 1, existing package and site arbitraries | +| PBT-08, PBT-09 | Compliant | Existing seed logging and fast-check setup | +| PBT-10 | Planned | Example-based component and route tests alongside PBT | diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-fd-questions.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-fd-questions.md new file mode 100644 index 0000000..ff9ca3e --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-fd-questions.md @@ -0,0 +1,46 @@ +# Vragen Functional Design — Soorten fotoshoots-pagina (unit 2) + +Al vastgelegd (geen vraag nodig): + +- **Contactlink**: `?pakket=` alleen voor shoots met een bestaand pakket (Newborn, Zwangerschap, Gezin); anders zonder. Voorlopig naar `/#contact` op de homepage, later naar `/contact` (één functie). +- **Portfoliolink**: alleen zichtbaar als `/portfolio` geïndexeerd is, en (zodra de helper van portfolio er is) alleen voor shoots met portfoliofoto's. +- **Koppen**: elke shoot is een `article` met een h2 (id `shoot--title`); het afsluitende blok een `section` met een h2. +- **Foto's**: alleen de eerste shootfoto laadt meteen (die is op grote schermen direct in beeld); de rest laadt pas als hij in beeld komt. +- **Gestructureerde data**: een `Service` per shoot in paginavolgorde, met naam, foto, aanbieder (het bedrijf) en werkgebied; geen prijzen. + +Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. + +--- + +## Vraag 1: Een eigen anker per shoot + +Elke shoot kan een eigen adres krijgen, bijvoorbeeld `/soorten-fotoshoots#newborn`. Dan kun je vanaf elke plek (homepage, Instagram, een mail) direct naar één shoot linken, en zoekmachines kunnen elke `Service` aan zijn eigen plek op de pagina koppelen. Het anker landt net onder de vaste header, zoals `/#contact`. + +- A) Ja: elke shoot krijgt zijn id als anker (`#newborn`, `#zwangerschap`, `#gezin`, `#loveshoot`, `#portret`), en de gestructureerde data verwijst per `Service` naar dat adres. Geen andere pagina's aanpassen in deze feature. (aanbevolen: kost niets, en de ids liggen al vast) +- B) Ja, en meteen ook de prijskaarten op de homepage een link "Meer over deze shoot" naar het anker geven +- C) Nee, geen ankers per shoot +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A (via de chat beantwoord: "Ja, alleen ankers") + +## Vraag 2: De concepttekst van Gezin en de alt-teksten + +De tekst van Gezin is een concept en de vijf alt-teksten zijn door mij geschreven. De pagina wordt bij de merge geïndexeerd (zichtbaar voor Google). + +- A) De pagina gaat met deze teksten naar de testomgeving; Andrea leest ze daar na. De merge naar master (en dus live) wacht op haar akkoord of haar aanpassingen. (aanbevolen: zo ging het ook bij Over mij) +- B) Gewoon mergen; aanpassingen van Andrea komen later als losse wijziging +- C) Het blok Gezin voorlopig weglaten tot Andrea de tekst heeft goedgekeurd; de rest gaat wel mee +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A (via de chat beantwoord: "Merge wacht op Andrea") + +## Vraag 3: Omschrijving per shoot in de gestructureerde data + +Newborn heeft twee alinea's; de tweede is een uitnodiging ("Stuur gerust een berichtje…"), geen omschrijving van de shoot. Bij de andere shoots is er één alinea. + +- A) Alleen de eerste alinea als omschrijving (bij Newborn dus zonder de uitnodiging). Eenvoudig en altijd een echte omschrijving. (aanbevolen) +- B) Alle alinea's samengevoegd +- C) Een aparte, korte omschrijving per shoot in `shootTypes.ts` (een nieuw veld), los van de tekst op de pagina +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A (via de chat beantwoord: "Eerste alinea") diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-functional-design-plan.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-functional-design-plan.md new file mode 100644 index 0000000..cb9281b --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/soorten-fotoshoots-page-functional-design-plan.md @@ -0,0 +1,10 @@ +# Functional Design Plan — Unit 2: Soorten fotoshoots page + +Depth: minimal. Scope from the execution plan: the rules for the contact and portfolio links, the structured data (`WebPage` + `ItemList` of `Service`) and their testable properties (PBT-01), the page content model and the component behaviour. Questions: [soorten-fotoshoots-page-fd-questions.md](soorten-fotoshoots-page-fd-questions.md). + +- [x] Collect and analyse the answers in `soorten-fotoshoots-page-fd-questions.md` +- [x] `domain-entities.md`: `ShootType` (from unit 1), `ShootTypesPageContent`, link targets, structured data entities (`WebPage`, `ItemList`, `ListItem`, `Service`, provider `@id`, `areaServed`) +- [x] `business-rules.md`: contact link rules (package preselect, fallback, switch to `/contact`), portfolio link rules (live check, types with photos), structured data rules (fields, sources, order, exclusions), content and SEO registry rules (indexed, description, preview image, alt texts) +- [x] `business-logic-model.md`: how the route turns content and site data into head tags, JSON-LD and the rendered page; the pure functions and their properties for PBT +- [x] `frontend-components.md`: component hierarchy, props, heading ids, alternation and dividers, links with accessible names, priority photo, reveal, test ids +- [x] Validate against requirements.md, application-design.md and the extension rules diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/code/code-summary.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/code/code-summary.md new file mode 100644 index 0000000..2880c6d --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/soorten-fotoshoots-page/code/code-summary.md @@ -0,0 +1,31 @@ +# Code Summary — Unit 2: Soorten fotoshoots page + +Plan: [soorten-fotoshoots-page-code-generation-plan.md](../../plans/soorten-fotoshoots-page-code-generation-plan.md). Branch `feature/soorten-fotoshoots-page`, worktree `AndreaSlopFotografie-soorten-fotoshoots`. + +## Files +- Cherry-picked: contact-page's `790495d` "Adds a generic WebPage structured data helper" (`seo.ts`, `seo.test.ts`), as `3c7d00e` +- Created: `web/public/og-soorten-fotoshoots.jpg` (1200×630 from the Newborn original, focus 0.5/0.42, 54 KB; alt "Een pasgeboren baby slaapt in een gestreept pakje") +- Modified: `web/src/content/types.ts` (`ShootTypesPageContent`) +- Created: `web/src/content/shootTypesPageContent.ts` +- Created: `web/src/lib/shootLinks.ts` (+ test): `shootContactLink`, `shootPortfolioLink`, `isPortfolioLive` +- Modified: `web/src/seo.ts` (+ test): `absoluteUrl`, `shootServices` +- Modified: `web/src/sitePages.ts` (`/soorten-fotoshoots` indexed, description, `ogImage`), `web/src/sitemap.test.ts` (expected indexed pages) +- Modified: `web/lighthouserc.cjs` (`/soorten-fotoshoots` indexed; new `photoPagePaths` exception, see below), `web/lighthouserc.desktop.cjs` (every entry back to 0.9) +- Created: `web/src/components/shoots/ShootBlock/` and `ShootList/` (+ tests) +- Modified: `web/src/routes/soorten-fotoshoots.tsx` (the page), `web/src/app.test.tsx` (route test) +- Modified: `web/src/assets/shoots/*.jpg` and `content/shootTypes.ts`: re-cropped at 848×1060 instead of 960×1200, same crops and focus points as approved; the two landscape 1600 px originals only give an 854 px wide 4:5 crop, so 960×1200 was upscaled (15–20% fewer bytes now) +- Modified: `LAYOUT.md` ("Types of shoots" with Family), `aidlc-docs/_shared/reverse-engineering/*` (this feature's lines only) + +## Decisions made during generation +- **Contact link name** (BR-SF-06): `aria-label` "Stuur een berichtje over een {shoot}" instead of a `VisuallyHidden` part; the accessible name dropped the hidden span's leading space ("berichtjeover"). +- **Router links**: the shoot links use TanStack's own `Link` via Chakra `asChild` (as the price cards do), so `search` is type-checked against the target route. +- **Structured data in the component, not in `head()`** (user's choice): `head()` is part of the main bundle; with the shoot texts in it the main bundle grew 1.3 kB gzip. Now +0.3 kB gzip versus unit 1; the texts load with the page's own chunk. The `WebPage` JSON-LD is a `