Plans the Contact page and records unit 1 as generated

Workspace detection, a reverse engineering delta, requirements with the
approved layout mockups, the execution plan and the application design
for the Contact page, plus the code generation plan and summary of the
webPage helper. Corrects the contact payload in the shared API notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 08:50:48 +01:00
co-authored by Claude Opus 5.5
parent 790495d700
commit 9127eba776
23 changed files with 1766 additions and 1 deletions
@@ -0,0 +1,51 @@
# Application Design — Contact Page
Consolidates [components.md](components.md), [component-methods.md](component-methods.md), [services.md](services.md) and [component-dependency.md](component-dependency.md). Decisions: [application-design-plan.md](../plans/application-design-plan.md).
## Design decisions
| # | Decision |
|---|---|
| Q1 | `ContactPanel` = gate + form loading (`lazy` / `eager`) + shoot options + preselect + mail subject. The heading and the URL clean-up, scroll and focus stay with each page |
| Q2 | The contact card is rendered twice: one per screen width, the other `display: none`, each with its own heading id. The DOM order always matches the visual order |
| Q3 | Optional `label` per social link in the content; without a label the platform name is shown |
| Q4 | `ContactAside` (photo with an overlapping card) is a page component in `components/contact/` |
| — | `webPage()` / `WebPageType` / `contactPage()` in `seo.ts`; `aboutPage()` rebuilt with identical output |
| — | Privacy line inside `ContactForm`; reply time as `siteContent.contactForm.replyTime` |
## Units and what they touch
| Unit | New | Changed |
|---|---|---|
| 1 webPage helper | `webPage`, `WebPageType` | `aboutPage` (internals), `seo.test.ts` |
| 2 Shared contact blocks | `ContactPanel`, `ContactDetails` | `ContactForm`, `home/ContactSection`, `routes/index.tsx` (prop pass-through), `content/types.ts`, `siteContent.ts` |
| 3 Contact page | `contact/ContactAside`, `contactContent.ts`, `contactPage()`, photos | `routes/contact.tsx`, `aboutContent.ts`, `sitePages.ts`, `lighthouserc*.cjs`, LAYOUT.md |
## Page composition (`/contact`)
```mermaid
graph TD
Intro["PageIntro: eyebrow, h1 Contact, intro"]
Section["PageSection flushTop"]
Narrow["ContactDetails with portrait (narrow only)"]
FormCol["Form column: hidden h2 + ContactPanel eager"]
Aside["ContactAside: photo + ContactDetails (wide only)"]
Intro --> Section
Section --> Narrow
Section --> FormCol
Section --> Aside
classDef head fill:#e76f51,stroke:#ad533d,color:#000;
classDef block fill:#2a9d8f,stroke:#20766b,color:#000;
classDef card fill:#f4a261,stroke:#b77a49,color:#000;
class Intro head;
class Section,FormCol block;
class Narrow,Aside card;
```
Text alternative: the page has the intro and one section; inside it, in DOM order, the narrow-screen card, the form column and the wide-screen aside with photo and card.
## Coordination
- Unit 1 is a separate commit (only `seo.ts` + `seo.test.ts`); its hash goes to portfolio-page and soorten-fotoshoots-page.
- `content/types.ts` and `siteContent.ts` are also changed by soorten-fotoshoots-page (`serviceArea`); different fields, small rebase at most.
## Extension compliance (design level)
- **Security**: no new endpoints or third parties; e-mail only assembled in the browser (`ContactDetails` reuses `emailAddress`); `?pakket=` validated against package ids inside `ContactPanel` and never rendered; structured data through `jsonLdScript`. Compliant / N/A as in requirements.
- **PBT-01**: properties identified now for unit 1: `webPage()` `@id` = `url` = canonical URL of the path, `@type` preserved, `inLanguage` fixed, `extra` keys present in the output; `aboutPage()` equals the previous implementation for generated content (oracle); `jsonLdScript` round-trip. Unit 2 and 3 properties follow in their Functional Design.
@@ -0,0 +1,51 @@
# Component Dependencies — Contact Page
## Dependency graph
```mermaid
graph TD
ContactRoute["routes/contact.tsx"] --> PageIntro["PageIntro"]
ContactRoute --> PageSection["PageSection"]
ContactRoute --> Panel["ContactPanel"]
ContactRoute --> Details["ContactDetails"]
ContactRoute --> Aside["contact/ContactAside"]
ContactRoute --> ContactContent["contactContent"]
ContactRoute --> Seo["seo.ts: contactPage, webPage"]
HomeSection["home/ContactSection"] --> Panel
Panel --> Gate["ContactFormGate"]
Panel --> Form["ContactForm"]
Panel --> Lib["lib: shootOptions, packageFromSearch, visiblePackages, mailSubject"]
Details --> Platforms["socialPlatforms"]
Details --> Lib2["lib: emailAddress, visibleSocials, mailtoLink"]
Aside --> Img["DeferredImage or eager image"]
Form --> Router["RouterLink to privacyverklaring"]
ContactRoute --> SiteContent["siteContent: email, socials, contactForm"]
AboutRoute["routes/over-mij.tsx"] --> Seo
classDef newpart fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000;
classDef changed fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef existing fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
class ContactRoute,Panel,Details,Aside,ContactContent newpart;
class HomeSection,Form,Seo,SiteContent,AboutRoute changed;
class PageIntro,PageSection,Gate,Lib,Lib2,Platforms,Img,Router existing;
```
Text alternative: the contact route uses PageIntro, PageSection, the new ContactPanel, ContactDetails and ContactAside, new content and the SEO helpers; the homepage contact section also uses ContactPanel; ContactPanel wraps the gate and the form and uses the existing package helpers; ContactDetails uses the platform registry and the e-mail and social helpers; the form links to the privacy page; the about route uses the rebuilt SEO helper.
## Dependency matrix
| Component | Depends on | Used by |
|---|---|---|
| `webPage()` | `sitePages`, `canonicalUrl` | `aboutPage`, `contactPage`, portfolio-page, soorten-fotoshoots-page |
| `ContactPanel` | `ContactFormGate`, `ContactForm` (lazy or eager), `shootOptions`, `packageFromSearch`, `visiblePackages`, `mailSubject`, `useInView` | `home/ContactSection`, `routes/contact.tsx` |
| `ContactForm` | reducer and validation helpers, `RouterLink` (privacy) | `ContactPanel` |
| `ContactDetails` | `emailAddress`, `mailtoLink`, `mailSubject`, `visibleSocials`, `socialPlatforms`, `Eyebrow` | `routes/contact.tsx` (twice) |
| `ContactAside` | image component | `routes/contact.tsx` |
| `contactContent` | `ContactPageContent`, assets | `routes/contact.tsx` |
## Communication patterns
- Props down only; no context, store or events beyond what exists (the form's reducer stays internal).
- The URL is the only input from outside the content: `?pakket=` read by the route, validated in `ContactPanel`, removed by the route.
- No new cycles: `ContactPanel` does not import routes; `ContactDetails` does not know the page.
## Data flow
`siteContent` + `packages` + `contactContent` → route → components. Nothing flows back except the form submit, which goes to `submitContactForm` (unchanged, gated).
@@ -0,0 +1,127 @@
# Component Methods — Contact Page
Signatures and props only; business rules follow in Functional Design (units 2 and 3).
## `seo.ts`
```ts
export type WebPageType =
| 'WebPage'
| 'AboutPage'
| 'ContactPage'
| 'ImageGallery'
| 'CollectionPage';
// Unit 1. @id = url = canonicalUrl(path); name/description from sitePages[path];
// inLanguage 'nl-NL'; extra spread last.
export function webPage(
type: WebPageType,
path: RoutePath,
extra?: Record<string, unknown>,
): Record<string, unknown>;
// Unit 1. Signature unchanged; output identical to today.
export function aboutPage(
path: RoutePath,
content: AboutPageContent['person'],
site: SiteContent,
): Record<string, unknown>;
// Unit 3. webPage('ContactPage', path, { about: { '@id': businessId } })
export function contactPage(path: RoutePath): Record<string, unknown>;
```
## `ContactPanel` (unit 2)
```ts
type ContactPanelProps = {
// Prefix for the form's field ids (unique per page)
idPrefix: string;
packages: PricingPackage[];
enabled: boolean; // siteContent.contactForm.enabled
email: EmailAddress;
replyTime: string; // siteContent.contactForm.replyTime
// Raw ?pakket= value from the page; validated inside (packageFromSearch)
pakket?: string;
// 'lazy': load the form near the screen, with a placeholder (homepage)
// 'eager': load it with the page (contact page)
load: 'lazy' | 'eager';
};
```
## `ContactForm` (changed, unit 2)
```ts
type ContactFormProps = {
idPrefix: string;
options: ShootOption[];
preselect?: { shoot: string; key: number };
mailSubject: string;
email: EmailAddress;
replyTime: string; // new: used in the thank-you message
submit?: (payload: ContactPayload) => Promise<void>;
};
```
## `home/ContactSection` (changed, unit 2)
Props unchanged: `{ content, packages, enabled, email, pakket? }`, plus `replyTime` passed through to `ContactPanel`.
## `ContactDetails` (unit 2)
```ts
type ContactDetailsProps = {
// Id of the h2, unique on the page (the card can appear twice)
titleId: string;
title: string; // "Direct contact"
email: EmailAddress;
socials: SocialLink[];
// Small round portrait next to the heading (narrow screens)
portrait?: ContentImage;
'data-testid'?: string;
};
// Renders null when no channel is valid.
```
## `contact/ContactAside` (unit 3)
```ts
type ContactAsideProps = {
image: ContentImage; // the 4:5 contact photo
children: ReactNode; // the card that overlaps the photo
};
```
## Content types (`content/types.ts`)
```ts
export interface SocialLink {
platform: SocialPlatform;
href: string;
label?: string; // new (unit 2), e.g. '@andreaslopfotografie'
}
export interface SiteContent {
// ...
contactForm: { enabled: boolean; replyTime: string }; // replyTime new (unit 2)
}
// Unit 3
export interface ContactPageContent {
head: { eyebrow: string; title: string; intro: string };
formTitle: string; // "Stuur me een bericht" (visually hidden h2)
detailsTitle: string; // "Direct contact"
image: ContentImage; // 4:5 photo (wide screens)
portrait: ContentImage; // small round face crop (narrow screens, decorative)
}
```
The intro and the reply time are combined in Functional Design (unit 3), so the reply time stays a single value.
## Route `routes/contact.tsx` (unit 3)
```ts
type ContactSearch = { pakket?: string };
// validateSearch: keeps pakket only when it is a string (same as routes/index.tsx)
// head: pageHead('/contact') + structuredDataScript(contactPage('/contact'))
```
@@ -0,0 +1,49 @@
# Components — Contact Page
Decisions: [application-design-plan.md](../plans/application-design-plan.md) (Q1–Q4 = A). Requirements: [requirements.md](../requirements/requirements.md).
## New shared components (`web/src/components/`)
### `ContactPanel` (unit 2)
- **Purpose**: the contact form as a ready-to-place block, used by the homepage section and the contact page.
- **Responsibilities**: the "Binnenkort" gate (`ContactFormGate`); loading the form either with the page (`eager`) or when it comes near the screen (`lazy`, with the reserved placeholder height); the shoot options from the packages; the preselect from a `pakket` value and the mail subject that follows from it. *Q1 = A*
- **Not its job**: the section heading, removing `?pakket=` from the address bar, scrolling and focus — those stay with the page.
### `ContactDetails` (unit 2)
- **Purpose**: the "Direct contact" card: a small h2 in eyebrow style and a list of channels (icon + link text).
- **Responsibilities**: show e-mail (assembled in the browser, left out when invalid), then the valid social links (`visibleSocials`), each with the platform icon and its label (or the platform name when there is no label, *Q3 = A*); render nothing when no channel is valid; optional small round portrait next to the heading.
- **Interface**: plain props (data in, no fetching); the heading id comes from the caller so the card can appear twice on one page without duplicate ids. *Q2 = A*
## Changed shared components
### `ContactForm`
- Privacy line under the submit button ("Lees in de privacyverklaring wat ik met je gegevens doe.", link to `/privacyverklaring`).
- Thank-you message takes the reply time from a prop instead of a hard-coded "1-2 werkdagen".
### `home/ContactSection`
- Keeps the heading, the `?pakket=` clean-up, scroll to `#contact` and focus move; delegates gate, form, options, preselect and mail subject to `ContactPanel` with `load="lazy"`. Output and behaviour unchanged apart from the privacy line.
## New page components (`web/src/components/contact/`)
### `ContactAside` (unit 3)
- **Purpose**: the right column on wide screens: the contact photo (4:5) with a card overlapping its bottom edge. *Q4 = A*
- **Responsibilities**: photo and overlap layout only; the card is passed in as `children` (the page passes `ContactDetails`). Hidden on narrow screens (and the photo not downloaded there — mechanism in Functional Design unit 3).
## Route
### `routes/contact.tsx` (unit 3)
- Validates the `pakket` search parameter (text only), renders `PageIntro`, then one `PageSection` (`flushTop`) with: the narrow-screen `ContactDetails` (with portrait), the form column (visually hidden h2 + `ContactPanel load="eager"`) and `ContactAside` with the wide-screen `ContactDetails`. Removes `?pakket=` from the address bar after it has been applied, without a focus move. Head: `pageHead('/contact')` plus the `ContactPage` JSON-LD.
## SEO (`web/src/seo.ts`, unit 1 and 3)
- **`webPage()`** + **`WebPageType`** (unit 1): generic page structured data, shared with portfolio-page and soorten-fotoshoots-page.
- **`aboutPage()`** (unit 1): rebuilt on `webPage()`, identical output.
- **`contactPage()`** (unit 3): `ContactPage` about the business.
## Content (`web/src/content/`)
- `types.ts`: `SocialLink.label?` (unit 2), `SiteContent.contactForm.replyTime` (unit 2), `ContactPageContent` (unit 3).
- `siteContent.ts`: labels for Instagram and Facebook, `replyTime: '1-2 werkdagen'` (unit 2).
- `contactContent.ts` (unit 3): page head, form and card headings, photo and portrait.
- `aboutContent.ts` (unit 3): "neem contact op" and "Boek je shoot" → `/contact`.
## Reused unchanged
`PageIntro`, `PageSection`, `Reveal`, `DeferredImage`, `Eyebrow`, `ContactFormGate`, `RouterLink`, `Link` (`underline`), `linkButton` recipe, `socialPlatforms`, `emailAddress`, `mailtoLink`/`mailSubject`, `visibleSocials`, `shootOptions`, `packageFromSearch`, `visiblePackages`, `contactFormReducer`.
@@ -0,0 +1,38 @@
# Services — Contact Page
There is no service layer in this SPA: routes compose components from static content, and pure helpers in `lib/` and `seo.ts` hold the logic. The only "service" is the existing `submitContactForm` (always fails until the API exists), reached through `ContactForm`; it is unchanged.
## Composition per route
### `/contact` (unit 3)
```mermaid
sequenceDiagram
box rgba(99,179,237,0.4) Routing
participant R as Router
participant P as contact route
end
box rgba(255,167,38,0.4) Shared components
participant Pn as ContactPanel
participant D as ContactDetails
end
R->>P: render with search pakket
P->>D: narrow card (portrait, titleId A)
P->>Pn: load eager, pakket
Pn->>Pn: validate pakket, preselect, mail subject
P->>D: wide card in ContactAside (titleId B)
P->>R: replace URL without pakket, no focus move
```
Text alternative: the router renders the contact route with the search parameter; the route renders the narrow-screen card, the panel (which validates the package and preselects it) and the wide-screen card inside ContactAside, then removes the parameter from the URL without moving focus.
### `/` (unit 2, behaviour unchanged)
`ContactSection` renders its heading, `ContactPanel` with `load="lazy"`, and keeps its own effect that removes `?pakket=`, scrolls to `#contact` and focuses the heading.
### `/over-mij` (unit 3)
Content change only: two link targets become `/contact`.
## Head (SEO)
- Every route: `pageHead(path)` from the page registry.
- `/over-mij`: `aboutPage()` (now on `webPage()`); `/contact`: `contactPage()`; both through `structuredDataScript` (escaped by `jsonLdScript`).
- Portfolio-page and soorten-fotoshoots-page add their own page types on `webPage()` in their branches.
@@ -0,0 +1,68 @@
# Application Design Plan — Contact Page
Depth: minimal. Business rules (what `ContactPanel` must keep from the homepage, which channels the card shows, the `?pakket=` handling on this page, the responsive photo) follow in Functional Design for units 2 and 3.
## Plan
- [x] Answer the design questions below
- [x] Generate `components.md` — new and changed components with responsibilities and interfaces
- [x] Generate `component-methods.md` — props and function signatures (incl. `webPage()`)
- [x] Generate `services.md` — composition in the routes (there is no service layer in this SPA)
- [x] Generate `component-dependency.md` — dependency matrix and data flow
- [x] Generate `application-design.md` — consolidated design
- [x] Validate completeness and consistency against requirements.md
## Already decided (no question needed)
- **`webPage(type: WebPageType, path: RoutePath, extra = {})`** in `seo.ts`, as agreed with portfolio-page and soorten-fotoshoots-page: `@context`, `@type`, `@id` = `url` = `canonicalUrl(path)`, `name`/`description` from `sitePages[path]`, `inLanguage: 'nl-NL'`, then `...extra`. `WebPageType = 'WebPage' | 'AboutPage' | 'ContactPage' | 'ImageGallery' | 'CollectionPage'`. `aboutPage()` keeps its signature and becomes `webPage('AboutPage', path, { mainEntity: person(...) })`. A new `contactPage(path)` = `webPage('ContactPage', path, { about: { '@id': businessId } })`.
- **Icons**: the card reuses the existing platform registry (`content/socialPlatforms.ts`: name + offline icon for Facebook and Instagram) plus one mail icon from the same set (`@iconify-icons/ant-design`). No new dependency.
- **Privacy line**: part of `ContactForm` itself (under the submit button), so every form that uses it has the line. Link target `/privacyverklaring` as a typed route.
- **Reply time**: one value in `SiteContent` (e.g. `contactForm: { enabled, replyTime: '1-2 werkdagen' }`), passed to `ContactForm` for the thank-you message and used by the contact page intro.
- **Folders**: shared pieces at the top level of `components/` (`ContactPanel/`, `ContactDetails/`), page-specific pieces in `components/contact/` (like `components/about/` for Over mij). Content in `content/contactContent.ts` with a `ContactPageContent` interface in `content/types.ts`.
---
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
## Vraag 1: Wat gaat er mee in `ContactPanel`?
Het contactblok op de homepage (`ContactSection`) doet nu zes dingen: (1) de kop "Contact", (2) de gate, (3) het formulier lazy laden met een placeholder, (4) de shoot-opties uit de pakketten, (5) de voorselectie uit `?pakket=` plus het mailonderwerp, en (6) `?pakket=` uit de adresbalk halen, naar `#contact` scrollen en de focus op de kop zetten.
- A) **Punt 2 t/m 5 gaan in `ContactPanel`**, met een prop voor het laden (`lazy` op de homepage, direct op de contactpagina). Punt 1 en 6 blijven bij de pagina, omdat ze per pagina verschillen: de homepage scrollt en verplaatst de focus, de contactpagina ruimt alleen de URL op. (aanbevolen)
- B) **Alleen punt 2, 4 en 5** in `ContactPanel`. Het lazy laden (3) blijft in `ContactSection`, dat het formulier dan als `children` aan het panel geeft. Het panel blijft kleiner, maar de koppeling tussen gate, formulier en placeholder wordt omslachtiger.
- C) **Ook punt 6** in `ContactPanel`, met opties voor wel of niet scrollen en de focus verplaatsen. Alles op één plek, maar het panel moet dan de router en de pagina kennen.
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 2: Hoe komt de contactkaart op twee plekken?
Op brede schermen staat de kaart rechts, over de foto, ná het formulier. Op smalle schermen staat hij bovenaan, vóór het formulier en met het kleine portret. Voor toetsenbord- en screenreadergebruikers moet de volgorde in de HTML gelijk zijn aan wat je ziet.
- A) **Twee keer renderen, per schermbreedte één zichtbaar**: één kaart in de rechterkolom (alleen breed), één boven het formulier met portret (alleen smal). De verborgen kaart is met `display: none` volledig weg, ook voor screenreaders. Ze krijgen elk een eigen id, zodat er geen dubbele ids zijn. De volgorde klopt dan altijd. (aanbevolen)
- B) **Eén keer renderen, vóór het formulier in de HTML**. Op brede schermen zet CSS hem rechts. Op desktop komt de toetsenbordfocus dan eerst langs de kaart en pas daarna bij het formulier, terwijl je het formulier links als eerste ziet.
- C) **Eén keer renderen, op de plek die past bij de schermbreedte**: React kiest met een media query waar hij staat. Na het laden kan hij één keer verspringen als de schermbreedte bekend wordt.
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 3: De tekst bij Instagram en Facebook in de kaart
Bij e-mail is het adres de linktekst. Voor Instagram en Facebook heeft de content nu alleen het platform en de URL.
- A) **Een optioneel `label` per sociale link in de content** (bijvoorbeeld "@andreaslopfotografie"). Zonder label toont de kaart de naam van het platform ("Instagram"). Andrea kan het straks in het CMS aanpassen. (aanbevolen)
- B) **Afleiden uit de URL**: "@" plus het laatste stuk van het pad (`instagram.com/andreaslopfotografie/` → "@andreaslopfotografie"). Geen extra veld, maar dat werkt niet voor elke link (bijvoorbeeld een Facebook-pagina met een id-URL).
- C) **Altijd de naam van het platform** ("Instagram", "Facebook"), zoals in de footer
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 4: Het blok "foto met kaart erover"
De rechterkolom (foto 4:5 met de kaart over de onderrand) is nu alleen voor deze pagina. Het lijkt op `FramedImage` (foto met een zandkleurig vlak erachter), maar dan met inhoud over de foto heen.
- A) **Een paginacomponent in `components/contact/`** (werktitel `ContactAside`), die `ContactDetails` en de foto samenstelt. Wordt het later ook elders nodig, dan maken we hem dan algemeen. (aanbevolen)
- B) **Nu al een algemene component** (werktitel `MediaCard`: foto met een willekeurige kaart erover), voor eventueel later gebruik op andere pagina's
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
@@ -0,0 +1,170 @@
# Execution Plan — Contact Page
## Detailed Analysis Summary
### Transformation Scope (Brownfield)
- **Transformation Type**: Single component (`web/`), application-level only
- **Primary Changes**: replace the `/contact` placeholder with the real page (layout proposal 1a); extract the homepage contact form wiring into a shared `ContactPanel`; a new shared `ContactDetails` card; a privacy line and one reply-time value shared by both forms; a generic `webPage()` structured-data helper (consumed by two parallel features); page SEO (indexing, title/description, `ContactPage` JSON-LD, own preview image); Over mij links to `/contact`
- **Related Components**: `web/src/routes/contact.tsx`, `web/src/components/{ContactForm,home/ContactSection}`, new `ContactPanel` and `ContactDetails`, `web/src/content/` (`siteContent`, new contact content, `aboutContent`), `web/src/seo.ts`, `web/src/sitePages.ts`, `web/lighthouserc*.cjs`, `web/public/`, `web/src/assets/`, [LAYOUT.md](../../../../../LAYOUT.md)
### Change Impact Assessment
- **User-facing changes**: Yes — a new page; the homepage contact section gains the privacy line and must otherwise look and behave exactly as before; two Over mij links change target
- **Structural changes**: Minor — two shared components extracted/added; no architectural change
- **Data model changes**: Yes (small) — new contact page content interface; a reply-time value in `SiteContent`
- **API changes**: No external API. Internal: `webPage()` + `WebPageType` become a shared contract for portfolio-page and soorten-fotoshoots-page; `/contact?pakket=<packageId>` becomes a URL contract for soorten-fotoshoots-page
- **NFR impact**: Yes — SEO (indexed, structured data), accessibility (heading outline with a visually hidden h2, icon list), performance (form loads with the page; the large photo is the LCP on wide screens and must not load on phones)
### Component Relationships
```mermaid
graph TD
Route["routes/contact.tsx (new page)"] --> PageIntro["PageIntro (existing)"]
Route --> PageSection["PageSection (existing)"]
Route --> Panel["ContactPanel (new, extracted)"]
Route --> Details["ContactDetails (new)"]
Route --> Content["content: contact page content (new)"]
Route --> Seo["seo.ts: webPage + ContactPage (new)"]
HomeContact["home/ContactSection"] --> Panel
Panel --> Gate["ContactFormGate (existing)"]
Panel --> Form["ContactForm (privacy line, reply time)"]
Details --> SiteContent["siteContent (reply time added)"]
Form --> SiteContent
Seo --> AboutPage["aboutPage (rebuilt on webPage)"]
Seo --> Peers["portfolio-page and soorten-fotoshoots-page"]
AboutContent["aboutContent: links to /contact"] --> Route
classDef newpart fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000;
classDef changed fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef existing fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
classDef peer fill:#CE93D8,stroke:#6A1B9A,stroke-width:1px,color:#000;
class Route,Panel,Details,Content,Seo newpart;
class HomeContact,Form,SiteContent,AboutPage,AboutContent changed;
class PageIntro,PageSection,Gate existing;
class Peers peer;
```
Text alternative: the new contact route composes the existing PageIntro and PageSection with the new ContactPanel and ContactDetails, new content and the new webPage-based structured data; the homepage contact section switches to ContactPanel; the form gains the privacy line and the shared reply time; aboutPage is rebuilt on webPage, which the two parallel features also use; Over mij content links to the new page.
- **Primary Component**: `web` (front-end SPA)
- **Shared Components**: `seo.ts` (Minor, new `webPage()`; `aboutPage()` output unchanged), `ContactPanel` (new, used by the homepage), `ContactForm` (Minor: privacy line, reply time from content), `ContactDetails` (new)
- **Dependent Components**: homepage `ContactSection`; Over mij content; portfolio-page and soorten-fotoshoots-page (consume `webPage()` and the `?pakket=` contract)
- **Supporting Components**: Lighthouse CI config (Configuration-only), LAYOUT.md (documentation)
### Coordination with Parallel Features
- **Critical path for others**: unit 1 (`webPage()`) — portfolio-page and soorten-fotoshoots-page cherry-pick its commit; hash sent to both sessions right after it is committed.
- **Incoming**: soorten-fotoshoots-page commits `siteContent.serviceArea` + `professionalService()` changes in `seo.ts`; whoever commits second rebases. No functional dependency for this page (the description text is static in `sitePages.ts`).
- **Hot files**: own entries only in `sitePages.ts`, `lighthouserc*.cjs`, `active-features.md`.
### Risk Assessment
- **Risk Level**: Low to medium — the `ContactPanel` extraction touches the most intricate homepage section (lazy loading, `?pakket=` clean-up, focus, scroll); everything else is additive
- **Rollback Complexity**: Easy (one branch, commits per unit; unit 1 independent)
- **Testing Complexity**: Moderate — existing `ContactSection`, `ContactForm` and route tests guard the homepage behaviour; new tests for the page, the card, the URL parameter and the responsive photo; Lighthouse for `/contact`
## Workflow Visualization
```mermaid
flowchart TD
Start(["User Request"])
subgraph INCEPTION["🔵 INCEPTION PHASE"]
WD["Workspace Detection<br/><b>COMPLETED</b>"]
RE["Reverse Engineering<br/><b>COMPLETED</b>"]
RA["Requirements Analysis<br/><b>COMPLETED</b>"]
US["User Stories<br/><b>SKIP</b>"]
WP["Workflow Planning<br/><b>IN PROGRESS</b>"]
AD["Application Design<br/><b>EXECUTE</b>"]
UG["Units Generation<br/><b>SKIP</b>"]
end
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"]
FD["Functional Design<br/><b>EXECUTE (units 2 and 3)</b>"]
NFRA["NFR Requirements<br/><b>SKIP</b>"]
NFRD["NFR Design<br/><b>SKIP</b>"]
ID["Infrastructure Design<br/><b>SKIP</b>"]
CG["Code Generation<br/>(Planning + Generation)<br/><b>EXECUTE</b>"]
BT["Build and Test<br/><b>EXECUTE</b>"]
end
Start --> WD
WD --> RE
RE --> RA
RA --> WP
WP --> AD
AD --> FD
FD --> CG
CG --> BT
BT --> End(["Complete"])
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style RE fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style RA fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style WP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
style AD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
style FD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
style US fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
style UG fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
style NFRA fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
style NFRD fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
style ID fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
style INCEPTION fill:#BBDEFB,stroke:#1565C0,stroke-width:3px,color:#000
style CONSTRUCTION fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px,color:#000
style Start fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
style End fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
linkStyle default stroke:#333,stroke-width:2px
```
Text alternative: completed Workspace Detection, Reverse Engineering and Requirements Analysis lead to Workflow Planning, then Application Design, Functional Design (units 2 and 3), Code Generation per unit and Build and Test; User Stories, Units Generation, NFR Requirements, NFR Design, Infrastructure Design and the Operations phase are skipped.
## Phases to Execute
### 🔵 INCEPTION PHASE
- [x] Workspace Detection (COMPLETED)
- [x] Reverse Engineering (COMPLETED — delta)
- [x] Requirements Analysis (COMPLETED)
- [x] User Stories (SKIPPED)
- **Rationale**: one persona (the visitor), concrete FRs with texts, targets and an approved mockup
- [x] Execution Plan (IN PROGRESS)
- [ ] Application Design - EXECUTE (minimal depth)
- **Rationale**: new shared components and a shared contract need agreed boundaries before code: `webPage()` signature and its properties (already announced to two sessions), `ContactPanel` (what moves out of `ContactSection`, lazy vs eager), `ContactDetails` (props, data source, label per channel), where the privacy line and the reply time live, and the content interface for the page
- [ ] Units Generation - SKIP
- **Rationale**: the split is fixed below (three units); no separate unit-of-work artifacts needed
### 🟢 CONSTRUCTION PHASE
- [ ] Functional Design - EXECUTE for units 2 and 3 (minimal depth)
- **Rationale**: unit 2 has rules worth pinning down before code (which homepage behaviour `ContactPanel` must keep, which channels the card shows and with what label, PBT properties per PBT-01); unit 3 has the `?pakket=` handling on this page (clean-up without focus move), the responsive photo rule (LCP on wide screens, not downloaded on phones) and the content model. Unit 1 is a small pure helper whose properties are set in Application Design
- [ ] NFR Requirements - SKIP
- **Rationale**: NFRs are set at requirements level (NFR-CP-01..06) and the stack is fixed
- [ ] NFR Design - SKIP
- **Rationale**: no new NFR patterns; the responsive-photo approach is decided in Functional Design of unit 3; existing patterns (DeferredImage, Reveal, jsonLdScript, focus ring) are reused
- [ ] Infrastructure Design - SKIP
- **Rationale**: static assets only; no server config, CSP or deployment changes
- [ ] Code Generation - EXECUTE (ALWAYS, per unit)
- **Rationale**: implementation and tests
- [ ] Build and Test - EXECUTE (ALWAYS)
- **Rationale**: full `pnpm check` incl. Lighthouse for `/`, `/over-mij` and `/contact`
### 🟡 OPERATIONS PHASE
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP
- **Rationale**: Operations Configuration = No; the existing pipeline deploys to test on merge
## Units of Work (in order)
| # | Unit | Scope | Requirements |
|---|---|---|---|
| 1 | **webPage helper** | `webPage()` + `WebPageType` in `seo.ts`; `aboutPage()` rebuilt on it with identical output; example and property tests. Only `seo.ts` and `seo.test.ts`. One commit; hash sent to portfolio-page and soorten-fotoshoots-page. | SEO-CP-03 (helper part) |
| 2 | **Shared contact blocks** | Extract `ContactPanel` from `ContactSection` (homepage unchanged apart from the privacy line); privacy line under the form; reply time as one `siteContent` value used by the thank-you message; new `ContactDetails` card (icons, valid channels only). | FR-CP-02 (shared parts), FR-CP-04, FR-CP-06, FR-CP-07, FR-CP-08, NFR-CP-02 |
| 3 | **Contact page** | Photos (original resized, small portrait crop, 1200×630 preview) with alt texts; page content + types; the route with layout 1a and the narrow-screen card; `?pakket=` preselect; SEO (indexed, title/description, `ogImage`, `ContactPage` JSON-LD, Lighthouse indexed paths); Over mij links to `/contact`; LAYOUT.md. | FR-CP-01..05, FR-CP-09..11, SEO-CP-01..05, NFR-CP-01, 03..06 |
Unit 1 goes first because two other features wait for it and it is independent of the rest. Unit 2 before unit 3 because the page builds on its components. Each unit: one or more commits on `feature/contact-page`, full `pnpm check` (incl. Lighthouse) before its completion message; one PR to master at the end.
## Estimated Timeline
- **Total Stages to execute from here**: 6 (Application Design, Functional Design ×2 units, Code Generation ×3 units, Build and Test)
- **Estimated Duration**: two working sessions
## Success Criteria
- **Primary Goal**: a finished, indexed Contact page in the approved layout, reusing the homepage form
- **Key Deliverables**: `/contact` page; `webPage()` (shared with two features); `ContactPanel`, `ContactDetails`, privacy line, shared reply time; contact content; resized photos, portrait crop and preview image; updated Over mij links, LAYOUT.md and Lighthouse config
- **Quality Gates**: `pnpm check` passes (lint, format, tests with coverage thresholds, build, audits, Lighthouse: accessibility 1.0, best practices 1.0, performance ≥ 0.9 for `/contact`, homepage and Over mij budgets unchanged); axe clean; homepage contact section unchanged in behaviour after unit 2; `aboutPage()` output unchanged after unit 1
- **Integration Testing**: route tests render `/`, `/over-mij` and `/contact` in the shell; `/contact?pakket=newborn` preselects Newborn and cleans the URL; Over mij links reach `/contact`
Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@@ -0,0 +1,131 @@
# Verduidelijkingsvragen — Contactpagina
Je antwoorden op vraag 1–6, 9–13 en 15–19 zijn duidelijk. Bij drie vragen vroeg je om een voorstel:
- **Vraag 7**: iconen in plaats van koppen bij de contactgegevens. Die "hangen" nu onder de foto.
- **Vraag 8**: op mobiel is de foto erg groot, terwijl het formulier en de contactgegevens belangrijker zijn.
- **Vraag 14**: je koos B (de titel houden), maar met een uitgebreidere beschrijving en een breder werkgebied dan alleen Huizen, en je vroeg om suggesties.
## Wat er nu misgaat in het ontwerp
- **Desktop**: links een hoge foto (4:5). Daaronder, na een lijn, drie koppen met elk een link. Dat stuk valt ver onder het formulier, waardoor de kolommen ongelijk eindigen.
- **Mobiel**: de kolommen komen onder elkaar. Eerst een foto over de volle breedte (op een telefoon ruim 450px hoog), dan de gegevens, en pas daarna het formulier.
## Wat in alle voorstellen hetzelfde is (uit vraag 7)
- Elke contactregel krijgt een **icoon** (envelop, Instagram, Facebook) uit de icoonset die de site al gebruikt (`@iconify-icons/ant-design`), met de link als zichtbare tekst ("info@andreaslop.nl", "@andreaslopfotografie"). Het icoon is decoratie en wordt niet voorgelezen. De hele regel is klikbaar en minstens 44px hoog.
- De gegevens staan als **lijst** (`ul`) met één kleine, zichtbare kop in de labelstijl, bijvoorbeeld "Direct contact" (een h2). Geen losse h3's per kanaal.
- Het formulier krijgt een **h2 die alleen screenreaders zien**, "Stuur me een bericht". De volgorde van koppen blijft dan logisch: h1 → h2.
---
## Vraag A: Opbouw van de pagina
### Voorstel 1: formulier voorop, gegevens als kaart bij de foto (aanbevolen)
Desktop (variant 1a): het formulier links (de bredere kolom). Rechts de foto, met de contactgegevens als kaart die over de onderrand van de foto valt. Foto en kaart vormen één geheel, zodat de gegevens niet meer "los" hangen. De rechterkolom is ongeveer even hoog als het formulier.
```mermaid
block-beta
columns 5
A["Intro"]:5
B["Contactformulier"]:3
C["Foto met kaart Direct contact (iconen)"]:2
style A fill:#e76f51,stroke:#ad533d,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
```
Text alternative: desktop, intro over de volle breedte; daaronder het formulier links (drie vijfde) en de foto met contactkaart rechts (twee vijfde).
Mobiel: intro → compacte kaart met de drie contactregels (ongeveer 150px) → formulier. Op mobiel valt de foto weg (zie vraag B).
```mermaid
block-beta
columns 1
A["Intro"]
C["Kaart Direct contact (iconen)"]
B["Contactformulier"]
style A fill:#e76f51,stroke:#ad533d,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
```
Text alternative: mobiel, onder elkaar: intro, contactkaart, formulier.
Waarom: het formulier is waarvoor de meeste bezoekers komen en staat op desktop op de plek waar je begint te lezen. Wie liever mailt of een DM stuurt, ziet op mobiel meteen de snelle route zonder langs het formulier te hoeven scrollen. De foto geeft op desktop sfeer, maar duwt op mobiel niets naar beneden.
### Voorstel 2: snelle contactstrip onder de intro
Direct onder de intro een strip met de drie contactregels naast elkaar, gecentreerd. Daaronder foto en formulier, zoals in het ontwerp.
```mermaid
block-beta
columns 2
A["Intro"]:2
D["Strip: e-mail · Instagram · Facebook (iconen)"]:2
C["Foto"]
B["Contactformulier"]
style A fill:#e76f51,stroke:#ad533d,color:#000
style D fill:#264653,stroke:#1d353e,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
```
Text alternative: desktop, intro, daaronder een strip met de drie contactregels, daaronder foto links en formulier rechts.
Mobiel: intro → strip (drie regels onder elkaar) → formulier → foto (zie vraag B).
Nadeel: de foto en het formulier staan weer naast elkaar met verschillende hoogtes. De strip voelt ook meer als een menu dan als contactgegevens.
### Voorbeeldafbeeldingen
Mockups gemaakt met de stijl en de foto uit het ontwerp en de velden van het echte formulier. Iconen en maten zijn een indicatie; de uitwerking volgt de theme-tokens. Op mobiel is de foto weggelaten (zie vraag B).
| | Desktop | Mobiel |
| ------------------------ | ------------------------------------------------------ | ---------------------------------------------------- |
| Voorstel 1a: foto rechts | [desktop](mockups/voorstel-1a-foto-rechts-desktop.png) | [mobiel](mockups/voorstel-1a-foto-rechts-mobiel.png) |
| Voorstel 1b: foto links | [desktop](mockups/voorstel-1b-foto-links-desktop.png) | gelijk aan 1a |
| Voorstel 2: contactstrip | [desktop](mockups/voorstel-2-strip-desktop.png) | [mobiel](mockups/voorstel-2-strip-mobiel.png) |
Bij **1b** staat de foto links en het formulier rechts, net als in het ontwerp. Het formulier heeft dan wel de bredere kolom. Je leest eerst de foto met de contactkaart en daarna het formulier.
Welk voorstel?
- A) Voorstel 1a: formulier links, foto met contactkaart rechts (aanbevolen: het formulier staat waar je begint te lezen)
- B) Voorstel 1b: foto met contactkaart links, formulier rechts
- C) Voorstel 2: snelle contactstrip onder de intro, foto en formulier daaronder
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag B: De foto op mobiel
- A) Op mobiel weglaten. Op een telefoon voegt de foto weinig toe, en zo laadt hij daar ook niet (scheelt data en houdt de pagina snel). Op tablet en desktop blijft hij staan. (aanbevolen)
- B) Op mobiel als lage, brede foto (3:2, ongeveer 220px hoog) helemaal onderaan de pagina
- C) Op mobiel als kleine ronde portretfoto in de contactkaart, naast "Direct contact" en haar naam ([mockup mobiel](mockups/vraag-b-c-portret-mobiel.png)). Een aparte, kleine uitsnede van het gezicht (enkele kB), zodat de grote foto op mobiel niet geladen hoeft te worden.
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: C
## Vraag C: Titel (SEO)
Je koos B (de titel houden), maar je noemde ook "Fotoshoot boeken in Huizen en omgeving". Google kort een titel af na ongeveer 60 tekens; " | Andrea Slop Fotografie" telt daar al 25 van.
- A) "Contact – fotoshoot boeken in Huizen" → "Contact – fotoshoot boeken in Huizen | Andrea Slop Fotografie" (61 tekens). Het woord "Contact" blijft vooraan, zodat de pagina herkenbaar is in de zoekresultaten en in browsertabbladen. (aanbevolen)
- B) "Fotoshoot boeken in Huizen en omgeving" → 63 tekens; kan op telefoons net worden afgekort, en het woord "Contact" ontbreekt
- C) "Contact" laten staan → "Contact | Andrea Slop Fotografie" (32 tekens)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag D: Beschrijving (SEO)
Over het werkgebied heb ik de sessie van Soorten fotoshoots gevraagd wat je daar hebt aangegeven: "Huizen en omgeving of Huizen en Gooi en Vechtstreek, maar hoeft daar niet beperkt te blijven". Inmiddels heb je daar de formulering **"Huizen, het Gooi en omgeving"** goedgekeurd (in de gestructureerde data: Huizen en Gooi en Vechtstreek, niet heel Nederland), met één bron in `siteContent`. Die sessie past ook de gestructureerde data van het bedrijf aan. Ik sluit daarop aan. Alle opties hieronder blijven onder de 155 tekens.
- A) "Neem contact op voor een newborn-, zwangerschaps- of gezinsshoot in Huizen, het Gooi en omgeving. Ik denk graag met je mee en reageer binnen 1-2 werkdagen." (155) (aanbevolen: noemt de shoots, het gebied en de termijn, en de toon past bij de huidige tekst)
- B) "Fotoshoot boeken in Huizen, het Gooi of daarbuiten? Stuur me een bericht over je newborn-, zwangerschaps- of gezinsshoot. Ik reageer binnen 1-2 werkdagen." (154; zegt expliciet dat je ook buiten de regio komt)
- C) "Een fotoshoot in Huizen, het Gooi en omgeving? Vertel me over je newborn-, zwangerschaps-, gezins- of loveshoot. Ik reageer binnen 1-2 werkdagen." (145; noemt ook de loveshoot)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
@@ -0,0 +1,212 @@
# Verificatievragen — Contactpagina
Al vastgelegd (geen vraag nodig):
- **Route** `/contact` bestaat al als placeholder ([contact.tsx](../../../../../web/src/routes/contact.tsx)) en wordt de echte pagina. Het hoofdmenu en de footer verwijzen er al naar.
- **Layout en stijl** komen uit het ontwerp ([contact.html](../../../../../design/andreaslop-static/contact.html)): page head (eyebrow "Neem contact op", h1 "Contact", intro), daaronder een sectie met twee kolommen: foto met contactgegevens, en het formulier.
- **Hergebruik eerst**: `PageIntro`, `PageSection` (`spacing="flushTop"`), `FramedImage`/`DeferredImage`, `Reveal`, `Eyebrow`, `ContactForm`, `ContactFormGate`, de pure logica (`contactFormReducer`, `validateContact`, `isLikelySpam`, `emailAddress`, `visibleSocials`, `mailtoLink`) en de theme-tokens. Geen hardgecodeerde kleuren, geen CSS-bestanden, geen nieuwe dependencies.
- **Formulier direct laden**: op deze pagina staat het formulier boven de vouw, dus het wordt niet lazy geladen zoals op de homepage.
- **E-mailadres** wordt, net als nu, pas in de browser samengesteld en komt nergens leesbaar in de bundle of de JSON-LD.
- **Toegankelijkheid**: dezelfde lat als Over mij: één h1, secties met een toegankelijke naam, contrast ≥ 4.5:1, `prefers-reduced-motion`, axe in de tests en Lighthouse accessibility 1.0.
- **Afspraken met de parallelle features**: generieke `webPage()`-helper voor JSON-LD als aparte eerste commit (Portfolio en Soorten fotoshoots bouwen erop), en alleen eigen regels in `sitePages.ts`, `lighthouserc.cjs` en `active-features.md`.
Wat ik zag op het ontwerp, in de code en op de live site (andreaslop.nl/contact):
| Onderdeel | Ontwerp | Huidige code (formulier homepage) | Live site |
| --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| Velden | naam, e-mail, **onderwerp** (vrije tekst), bericht | naam, e-mail, **"In welke shoot heb je interesse?"** (Zwangerschap / Newborn / Gezin / Overig), bericht | zelfde als de code (Familie i.p.v. Gezin) |
| Reactietermijn | "binnen **2-3** werkdagen" (intro) | "binnen **1-2** werkdagen" (bedankbericht) | "binnen **1** werkdag" (intro) |
| Verzendknop | "Verzenden" | "(Aan)vraag versturen" | "(Aan)vraag versturen" |
| Contactgegevens | E-mail, Instagram, Facebook (h3 + link) onder de foto | bestaat nog niet als blok | Email en Instagram, plus social-iconen |
| Foto | `contact.jpg`, alt "Andrea Slop met haar camera" | — | zelfde foto, **zonder alt-tekst** |
| LAYOUT.md | — | Intro / Photo + Contact form / Contact details over de volle breedte | — |
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
---
## Vraag 1: Velden van het formulier
- A) Hetzelfde formulier als op de homepage en de live site: naam, e-mail, de shoot-keuzelijst en bericht. Eén formulier, één payload (`{ naam, email, shoot, bericht }`) voor de API, en de keuzelijst blijft gekoppeld aan de pakketten. (aanbevolen)
- B) Zoals in het ontwerp: een vrij onderwerpveld in plaats van de keuzelijst. Dan krijgt `ContactForm` een variant, en de API twee soorten berichten.
- C) Allebei: de keuzelijst én een vrij onderwerpveld
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 2: Reactietermijn
Ontwerp, code en live site beloven alle drie iets anders. Ik zet de termijn op één plek in de content (`siteContent`), zodat de intro van deze pagina en het bedankbericht van het formulier (ook op de homepage) altijd hetzelfde zeggen. Welke termijn?
- A) 1-2 werkdagen (wat het formulier nu al zegt) (aanbevolen: haalbaar en al eerder goedgekeurd)
- B) 1 werkdag (live site)
- C) 2-3 werkdagen (ontwerp)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 3: Shoot voorselecteren via de link
Soorten fotoshoots wil vanaf elke shoot linken naar het formulier met die shoot alvast gekozen. Op de homepage werkt dat al met `/?pakket=newborn#contact` (een onbekende waarde wordt genegeerd en nooit op de pagina getoond).
- A) Dezelfde parameter op deze pagina: `/contact?pakket=<id>`, met dezelfde logica als de homepage (`packageFromSearch`). Bekende waarden: `zwangerschap`, `newborn`, `gezin`. Een shoot zonder pakket (bijvoorbeeld een loveshoot) linkt gewoon naar `/contact`. (aanbevolen)
- B) Een nieuwe parameter `/contact?onderwerp=<slug>` met de slugs van de shoot-types van Soorten fotoshoots, die ook naar "Overig" kan
- C) Geen voorselectie: altijd gewoon `/contact`
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 4: Formulier zolang er geen back-end is
Het formulier kan nog niets versturen. Op de homepage staat het daarom gedimd en onbedienbaar onder een "Binnenkort"-melding met een mailknop (`siteContent.contactForm.enabled = false`).
- A) Hier precies hetzelfde gedrag, via dezelfde schakelaar. Zodra de API er is, gaan beide formulieren tegelijk aan. (aanbevolen)
- B) Op deze pagina het formulier verbergen tot de API er is, en alleen de contactgegevens en een mailknop tonen
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 5: Hergebruik van de formulier-opbouw
Op de homepage regelt `ContactSection` de koppeling tussen de gate, het formulier, de shoot-opties en de voorselectie. Deze pagina heeft precies hetzelfde nodig, alleen zonder lazy loading.
- A) Die koppeling uit `ContactSection` halen in een gedeeld blok (werktitel `ContactPanel`) dat zowel de homepage als deze pagina gebruikt. Het gedrag op de homepage blijft gelijk. (aanbevolen)
- B) Op deze pagina zelf `ContactFormGate` en `ContactForm` samenstellen en `ContactSection` laten zoals hij is
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 6: Welke contactgegevens
- A) E-mail, Instagram en Facebook, zoals in het ontwerp. Ze komen uit `siteContent`, dezelfde bron als de footer, en worden alleen getoond als ze geldig zijn. Gemaakt als herbruikbaar blok (werktitel `ContactDetails`). (aanbevolen)
- B) Alleen e-mail en Instagram, zoals op de live site
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 7: Koppen en structuur
In het ontwerp staan onder de h1 meteen h3's ("E-mail", "Instagram", "Facebook"). Het formulier heeft geen kop. Een sprong van h1 naar h3 maakt de pagina lastiger te scannen met een screenreader.
- A) Twee benoemde secties: het formulier krijgt een h2 die alleen voor screenreaders zichtbaar is (bijvoorbeeld "Stuur me een bericht"), de contactgegevens een zichtbare of verborgen h2 "Contactgegevens" met h3's per kanaal in de stijl van het ontwerp. Visueel verandert er niets. (aanbevolen)
- B) De kanalen worden h2's in de kleine labelstijl, zonder extra kop voor het formulier
- C) Letterlijk het ontwerp: alleen h3's
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: X, Ik denk dat de contactgegevens mooier kunnen. Gebruik een icon bij de verschillende gegevens in plaats van een header. Kijk ook ove onder elkaar dan nog steeds de meest logische keuze is, maar de contactgegevens hanger er nu een beetje onder. Dat moet beter kunnen.
## Vraag 8: Plaats van de contactgegevens
In het ontwerp staan de contactgegevens onder de foto, in dezelfde kolom. In [LAYOUT.md](../../../../../LAYOUT.md) staan ze als apart blok over de volle breedte onder foto en formulier.
- A) Zoals in het ontwerp (onder de foto), en LAYOUT.md daarop aanpassen volgens [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md). Op telefoon komen foto en gegevens boven het formulier. (aanbevolen)
- B) Zoals in het ontwerp, maar op telefoon het formulier eerst, dan foto en gegevens (het formulier is waarvoor de bezoeker komt)
- C) Zoals in LAYOUT.md: een apart blok over de volle breedte onder foto en formulier
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: Doe een suggestie. Op mobiel is de foto ook erg groot terwijl het formulier en de contactgegevens de belangrijkere elementen zijn. Kan je een suggestie doen voor een verbetering. Ook rekening houdend met mijn antwoor din vraag 7.
## Vraag 9: Foto en alt-tekst
- A) De originele foto van andreaslop.nl downloaden, eenmalig verkleinen en comprimeren (zoals bij Over mij) en een beschrijvende Nederlandse alt-tekst schrijven die Andrea later kan nalezen (aanbevolen)
- B) De foto uit het ontwerp gebruiken (`assets/img/contact.jpg`) met de alt-tekst uit het ontwerp
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 10: Tekst van de verzendknop
- A) "(Aan)vraag versturen" houden, zoals op de homepage en de live site. Eén formulier, één tekst. (aanbevolen)
- B) "Verzenden" uit het ontwerp, voor beide formulieren
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 11: Privacy bij het formulier
Het formulier vraagt om een naam en e-mailadres. Volgens de AVG hoort de bezoeker te kunnen lezen wat er met die gegevens gebeurt. `/privacyverklaring` is nog een placeholder.
- A) Onder het formulier één korte regel met een link: "Lees in de privacyverklaring wat ik met je gegevens doe." Op beide formulieren, want ze zijn gedeeld. (aanbevolen)
- B) Nu nog geen privacyregel, wel als de privacyverklaring af is
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 12: Links die nu naar `/#contact` gaan
Op Over mij gaan "neem contact op" en "Boek je shoot" voorlopig naar het contactblok op de homepage (`/#contact`), tot deze pagina af is (besluit uit Over mij, vraag 3).
- A) Die twee links omzetten naar `/contact`. De "Boek"-knoppen op de prijskaarten van de homepage blijven naar het formulier op de homepage zelf gaan, want daar hoef je de pagina niet voor te verlaten. (aanbevolen)
- B) Alle links laten zoals ze zijn
- C) Ook de "Boek"-knoppen op de homepage naar `/contact?pakket=…` laten gaan
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 13: Indexeren door zoekmachines
`/contact` staat nu op `noindex` en ontbreekt in `sitemap.xml`.
- A) Bij het mergen op **geïndexeerd** zetten: geen `noindex` meer, in de sitemap, in Lighthouse CI als geïndexeerde pagina controleren. Ook met het formulier nog achter de "Binnenkort"-melding is de pagina bruikbaar dankzij de mailknop en de contactgegevens. (aanbevolen)
- B) Op `noindex` laten tot het formulier echt werkt
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 14: Titel en beschrijving (SEO)
Nu: titel "Contact | Andrea Slop Fotografie", beschrijving "Neem contact op met Andrea Slop Fotografie voor een fotoshoot in Huizen en omgeving. Ik denk graag met je mee over jullie wensen."
- A) Titel met zoekwoorden, bijvoorbeeld "Contact – fotoshoot boeken in Huizen", en een beschrijving die de shoots en de reactietermijn noemt. Ik stel ze voor in requirements.md en jij keurt ze goed. (aanbevolen)
- B) Titel en beschrijving laten zoals ze zijn
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: B, in beschrijving kanje wat uitgebreider zijn. Bij Soorten Fotoshoots had ik ook al wat aangegeven over de locatie dat dat breder is dan huizen. Misschien dat je daar kan navragen. Misschien "Fotoshoot boeken in Huizen en omgeving"? Geef mij suggesties
## Vraag 15: Gestructureerde data (JSON-LD)
- A) Een `ContactPage` via de nieuwe `webPage()`-helper, met als onderwerp de bestaande `ProfessionalService` (verwijzing naar `businessId`). Zonder e-mailadres, zoals nu overal. `aboutPage()` gaat op dezelfde helper draaien, met dezelfde uitvoer. (aanbevolen)
- B) Alleen de bestaande `ProfessionalService`, niets extra (de helper komt er dan toch, voor Portfolio en Soorten fotoshoots)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 16: Preview-afbeelding bij delen (Open Graph)
- A) Een eigen preview voor deze pagina: de contactfoto, bijgesneden tot 1200×630 in `web/public/` (aanbevolen)
- B) De standaardafbeelding van de site houden
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 17: Beveiligingsextensies
Moeten de beveiligingsregels als harde vereisten worden afgedwongen voor dit project? (Bij homepage en Over mij: ja.)
- A) Ja — dwing alle BEVEILIGINGSREGELS af als blokkerende vereisten (aanbevolen voor productietoepassingen)
- B) Nee — sla alle BEVEILIGINGSREGELS over (geschikt voor PoC's, prototypes en experimentele projecten)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 18: Property-Based Testing Extensie
Moeten de property-based testing (PBT) regels worden afgedwongen voor dit project? (Bij homepage en Over mij: ja, volledig.)
- A) Ja — dwing alle PBT-regels af als blokkerende vereisten (aanbevolen voor projecten met bedrijfslogica, datatransformaties, serialisatie of stateful componenten)
- B) Gedeeltelijk — dwing PBT-regels alleen af voor pure functies en serialisatie round-trips (geschikt voor projecten met beperkte algoritmische complexiteit)
- C) Nee — sla alle PBT-regels over (geschikt voor eenvoudige CRUD-applicaties, UI-only projecten of dunne integratielagen zonder significante bedrijfslogica)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 19: Operations-fase
Moet deze feature na Construction de Operations-fase doorlopen (deployment en monitoring inrichten)? (Bij Over mij: nee, de CI deployt al naar test.)
- A) Ja — na Construction de Operations-fase uitvoeren (deployment + monitoring)
- B) Nee — stoppen na Build and Test (deployment/monitoring vallen buiten deze feature)
- C) Weet ik nog niet — vraag het me opnieuw na de Construction-fase
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: B
@@ -0,0 +1,198 @@
# Requirements — Contact Page
## Intent Analysis
- **User Request**: build the Contact page, again with attention to SEO, accessibility and reuse of code elements, Chakra and theming, like the previous feature (Over mij).
- **Request Type**: New Feature (replaces the `/contact` placeholder with the real page) with supporting refactors (shared contact form panel, shared contact details block, generic structured-data helper)
- **Scope Estimate**: Multiple components within one package (`web/`), plus [LAYOUT.md](../../../../../LAYOUT.md); one shared helper (`webPage()` in `seo.ts`) consumed by two parallel features
- **Complexity Estimate**: Moderate — one page with a layout that deviates from the design on purpose, two extractions from the homepage contact section, a URL parameter, responsive image handling (large photo not loaded on phones), SEO additions
- **Requirements Depth**: Standard
## Source of Truth
- **Layout**: the approved mockup **proposal 1a** ([desktop](mockups/voorstel-1a-foto-rechts-desktop.png), [mobile with portrait](mockups/vraag-b-c-portret-mobiel.png)), which deviates from [design/andreaslop-static/contact.html](../../../../../design/andreaslop-static/contact.html) on purpose. Styling (colours, type, spacing, form fields) follows the design and the existing theme. *Source: clarification A = A, B = C*
- **Form behaviour**: the existing homepage contact form (homepage-sections feature), unchanged except where stated here.
- **Decisions**: [requirement-verification-questions.md](requirement-verification-questions.md), [requirement-clarification-questions.md](requirement-clarification-questions.md)
## Page Structure
Shell header → **Intro** (page head, h1) → **Contact** section: **Contact form** (left) and **Photo with contact card** (right) on wide screens; **Contact card** (with small portrait) above the **Contact form** on narrow screens → shell footer.
## Out of Scope
- The back-end (`POST /api/contact`), the robot check (Friendly Captcha) and switching the form on: the form stays behind the existing "Binnenkort" gate. *Source: Q4 = A*
- The content of `/privacyverklaring` (still a placeholder; only linked). *Source: Q11 = A*
- The service area wording in `siteContent` and `areaServed` in `professionalService()`: owned by the soorten-fotoshoots-page feature; this page only uses the same visible wording.
- A responsive image pipeline (srcset/WebP) beyond what FR-CP-05 needs.
- Operations phase. *Source: Q19 = B*
---
## Functional Requirements
### FR-CP-01 Intro (page head)
- Eyebrow **"Neem contact op"**, the page's only h1 **"Contact"** and an intro sentence, via the existing `PageIntro`.
- Intro (proposal, to confirm at review): **"Wil je een fotoshoot boeken of meer informatie ontvangen? Stuur me een berichtje, ik reageer binnen 1-2 werkdagen."** The design's "via onderstaand formulier" is dropped, because while the form is gated the visitor reaches Andrea via the mail button or the contact card. The reply time comes from the shared value in FR-CP-07.
### FR-CP-02 Contact form
- The same form as on the homepage: **Naam**, **E-mail**, **"In welke shoot heb je interesse?"** (the shown packages, then "Overig") and **"Stel hier je vraag"**; same validation, honeypot, time check, focus handling, sent and failed states, and payload `{ naam, email, shoot, bericht }`. *Source: Q1 = A*
- Submit label stays **"(Aan)vraag versturen"**. *Source: Q10 = A*
- Behind the same "Binnenkort" gate as on the homepage, controlled by the same switch (`siteContent.contactForm.enabled`), so both forms go live together. *Source: Q4 = A*
- On this page the form loads with the page (it is above the fold); on the homepage it keeps loading lazily as today.
- Field ids are unique per page (`idPrefix`), so both forms can coexist in the code without clashes.
- The form section has a heading visible only to assistive technology: **"Stuur me een bericht"** (h2). *Source: clarification on Q7*
### FR-CP-03 Preselect a shoot via the URL
- `/contact?pakket=<packageId>` preselects that shoot in the form, with exactly the homepage rules: case and surrounding spaces ignored, unknown or non-text values ignored, the value is never shown on the page. Known ids today: `zwangerschap`, `newborn`, `gezin`. *Source: Q3 = A*
- The chosen package also goes into the mail subject of the gate's mail button and the failure message ("Aanvraag fotoshoot: Newborn"), as on the homepage.
- After applying it, `?pakket=` is removed from the address bar without a new history entry. The page is a fresh page load, so focus stays at the start of the page (no focus move).
- This URL format is the contract for the soorten-fotoshoots-page feature ("Stuur een berichtje" links per shoot; shoots without a package link to plain `/contact`).
### FR-CP-04 Contact card ("Direct contact")
- A card with a small visible heading **"Direct contact"** (h2, eyebrow style) and a list of contact channels, each an **icon plus link text**, no per-channel headings: *Source: Q6 = A, clarification on Q7*
- **E-mail**: the address as link text, `mailto:` with the default subject "Vraag via andreaslop.nl";
- **Instagram** and **Facebook**: a readable name or handle as link text, opening the profile.
- Data from `siteContent` (same source as the footer): the e-mail address is only assembled in the browser and the item is left out if it is invalid; social items only for valid links (`visibleSocials`). If no channel is valid, the card is not rendered.
- Icons come from the icon set already used (`@iconify-icons/ant-design`, offline) and are decorative (hidden from assistive technology). Each row is fully clickable with a target of at least 44 px high.
- Built as a reusable component (working name `ContactDetails`), not tied to this page.
### FR-CP-05 Layout and photo
- **Wide screens** (from the breakpoint where two columns fit; the design switches at 960 px): the form in the wider left column (about 3/5), on the right the contact photo (portrait crop 4:5) with the contact card overlapping its bottom edge, so photo and card read as one unit. *Source: clarification A = A (proposal 1a)*
- **Narrow screens**: intro → contact card → form. The large photo is not shown **and not downloaded**. Instead the card shows a **small round portrait** (a separate small face crop, a few kB) next to "Direct contact" and the name "Andrea Slop". *Source: clarification B = C*
- The large photo: the original from andreaslop.nl, resized once and compressed (as for Over mij), with a descriptive Dutch alt text for Andrea to review. The small portrait is decorative (the name next to it says who it is). *Source: Q9 = A*
- Scroll reveal as on the other pages (existing `Reveal`), respecting `prefers-reduced-motion`.
### FR-CP-06 Privacy line
- Below the submit button of **both** forms (shared component): **"Lees in de privacyverklaring wat ik met je gegevens doe."**, with "privacyverklaring" linking to `/privacyverklaring` (`underline` link variant). *Source: Q11 = A*
### FR-CP-07 Reply time in one place
- The reply time **"1-2 werkdagen"** is one content value (in `siteContent`), used by the intro of this page and by the form's thank-you message ("Bedankt voor je bericht! Ik reageer binnen 1-2 werkdagen."), so they never disagree. *Source: Q2 = A*
### FR-CP-08 Shared contact form panel
- The wiring that the homepage `ContactSection` does today (gate, form, shoot options from the packages, preselect from `?pakket=`, mail subject) moves into one shared component (working name `ContactPanel`), used by the homepage section and this page. The homepage looks and behaves exactly as before, including lazy loading, the placeholder height, the URL clean-up and moving focus to its heading after a "Boek …" click. *Source: Q5 = A*
### FR-CP-09 Links to the contact page
- On Over mij, "neem contact op" and "Boek je shoot" change from `/#contact` to **`/contact`**. The "Boek …" links on the homepage price cards keep going to the homepage form (`/?pakket=…#contact`). *Source: Q12 = A*
### FR-CP-10 Content
- All page texts and images live as API-shaped static data in `web/src/content/` (a new content object with an interface in `content/types.ts`), passed into the components from the route, as for the other pages.
### FR-CP-11 LAYOUT.md
- Update the "Contact" diagram to the approved structure (Intro; Contact form beside Photo with contact details), following [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md).
---
## SEO Requirements
### SEO-CP-01 Indexing
- `/contact` becomes **indexed** when this feature merges: `indexed: true` in `sitePages.ts` (no `robots noindex`, in `sitemap.xml`), and moved to the indexed paths in `web/lighthouserc.cjs` / `.desktop.cjs` (the sync test must pass). *Source: Q13 = A*
### SEO-CP-02 Title and description
- Title: **"Contact – fotoshoot boeken in Huizen"** → "Contact – fotoshoot boeken in Huizen | Andrea Slop Fotografie" (61 characters; one over the ~60 guideline, accepted to keep "Contact" first). *Source: clarification C = A (supersedes Q14 = B)*
- Description: **"Neem contact op voor een newborn-, zwangerschaps- of gezinsshoot in Huizen, het Gooi en omgeving. Ik denk graag met je mee en reageer binnen 1-2 werkdagen."** (155 characters). The service area wording matches the one approved in soorten-fotoshoots-page. *Source: clarification D = A*
### SEO-CP-03 Structured data
- A `ContactPage` JSON-LD on this page whose subject is the existing business (`about` / `mainEntity` referencing `businessId`). No e-mail address, as everywhere. Escaped through `jsonLdScript`. *Source: Q15 = A*
- Built on a new generic, pure helper **`webPage(type: WebPageType, path, extra)`** in `seo.ts` (`@context`, `@type`, `@id` = `url` = canonical URL, `name` and `description` from `sitePages`, `inLanguage: 'nl-NL'`, then `extra`), with `WebPageType = 'WebPage' | 'AboutPage' | 'ContactPage' | 'ImageGallery' | 'CollectionPage'`.
- `aboutPage()` is rebuilt on `webPage()` with **identical output** and an unchanged signature.
- `webPage()` (with the `aboutPage()` refactor and tests, nothing else) is delivered as a **separate first commit**, because portfolio-page and soorten-fotoshoots-page build on it (agreed with those sessions; hash to be sent to them).
### SEO-CP-04 Preview image (Open Graph)
- A page-specific preview image: the contact photo cropped to **1200×630** in `web/public/`, set as the page's `ogImage` in `sitePages.ts` with its own alt text. *Source: Q16 = A*
### SEO-CP-05 Semantic structure
- One h1; heading outline h1 "Contact" → h2 "Stuur me een bericht" (visually hidden) and h2 "Direct contact"; `section` landmarks with accessible names; descriptive link texts; images with width and height.
---
## Non-Functional Requirements
### NFR-CP-01 Accessibility (WCAG 2.1 AA as guideline)
- Heading outline as in SEO-CP-05, no skipped levels.
- Form: visible labels linked to the fields, errors linked and announced as today, focus to the first invalid field, the gate keeps keyboard and screen reader users out of the inactive form (`inert`) and offers the mail button.
- Contact card: a list with an accessible name; decorative icons hidden; link texts that make sense on their own; focus ring from the theme; targets ≥ 44×44 px.
- Text contrast ≥ 4.5:1 (`accent.deep` for eyebrow-styled text, `ink.soft` for running text); the card's border and shadow are not the only cue for its boundaries.
- Order in the DOM matches the visual order on every screen size (no CSS reordering that changes the reading order).
- `prefers-reduced-motion` respected; works at 200% zoom and 320 px wide without horizontal scrolling.
- Axe checks in component and route tests; Lighthouse accessibility 1.0 for `/contact` (mobile and desktop).
### NFR-CP-02 Styling and reuse
- Reuse before building: `PageIntro`, `PageSection` (`flushTop`), `FramedImage` / `DeferredImage` where they fit, `Reveal`, `Eyebrow`, `ContactForm`, `ContactFormGate`, `Link` (`underline`), the `linkButton` recipe, theme tokens and text styles.
- New shared pieces (`ContactPanel`, `ContactDetails`, the privacy line, `webPage()`) are generic and live in `components/` or `seo.ts`, not inside the route. Styling that another page may need goes into tokens, text styles or recipes, not inline per page.
- No hard-coded colours, CSS files or Tailwind; Chakra primitives where they fit; Prettier style; code comments in English in new code; visitor-facing texts in Dutch.
- Coordination with parallel features: only this feature's own entries in `sitePages.ts`, `lighthouserc*.cjs` and `active-features.md`; `PageIntro` not changed without notifying the other sessions; components claimed by portfolio-page (PortfolioGrid, Lightbox, InstagramGrid) and soorten-fotoshoots-page (shootTypes, CallToAction, MediaText `reverse`) are not touched.
### NFR-CP-03 Testing
- **Example-based**: page structure (heading outline, landmarks, the card's channels and their targets, the privacy link), layout per breakpoint where testable, `?pakket=` preselect and URL clean-up on this page, the homepage contact section unchanged in output and behaviour after the `ContactPanel` extraction, the Over mij link targets, head tags (title, description, no `noindex`, canonical, `og:image`), axe checks.
- **Property-based** (fast-check, existing arbitraries): `webPage()` invariants (`@id` = `url` = canonical URL of the path, `@type` preserved, `extra` merged, never an e-mail address), `aboutPage()` output equal to the previous implementation for generated content, and any new pure helper (e.g. deriving the channel label from a social link). *Source: PBT = A (full)*
- `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse) passes.
### NFR-CP-04 Security (Security Baseline extension enabled)
- No new third parties: no external scripts, fonts, embeds or endpoints; CSP unchanged.
- No e-mail address in markup at build time, bundle, content or structured data (assembled in the browser).
- `?pakket=` is validated against the known package ids and never reflected; form input is validated client-side as today (server-side validation belongs to the API feature).
- Structured data through `jsonLdScript`; no new runtime dependencies; image processing is a one-off local step.
### NFR-CP-05 Performance
- On wide screens the contact photo is likely the largest contentful paint and must not be deferred; on narrow screens it must not be downloaded at all (only the small portrait). How this is done (e.g. `<picture>` with a media query, or rendering by breakpoint) is decided in design.
- Lighthouse performance for `/contact` ≥ 0.9 on mobile and desktop, including the form loading with the page.
- No layout shift from images or the form (intrinsic sizes, reserved space).
### NFR-CP-06 Content for the future API
- The page content is plain data (strings, `ContentImage`, link targets) so the API can deliver it 1-to-1; the reply time is one value.
---
## Extension Compliance — Requirements Level
### Security Baseline
| Rule | Status | Rationale |
|---|---|---|
| SECURITY-01 Encryption | N/A | No data stores; nothing is sent while the form is gated |
| SECURITY-02 Access logging | N/A | No intermediaries added; hosting unchanged |
| SECURITY-03 Application logging | N/A | No server-side component; client errors already go to Sentry |
| SECURITY-04 HTTP security headers | Compliant | Existing header set unchanged; no CSP loosening (NFR-CP-04) |
| SECURITY-05 Input validation | Compliant | Existing client-side form validation and length limits; `?pakket=` checked against an allow-list and never reflected (FR-CP-03); server-side validation is part of the API feature |
| SECURITY-06 Least privilege | N/A | No IAM |
| SECURITY-07 Network configuration | N/A | No network infrastructure |
| SECURITY-08 Access control | N/A | Public content |
| SECURITY-09 Hardening | Compliant | No debug output; no new configuration; submit errors show a generic message only |
| SECURITY-10 Supply chain | Compliant | No new dependencies |
| SECURITY-11 Secure design | Compliant | E-mail kept out of the page source; honeypot and time check kept; structured data escaped |
| SECURITY-12 Authentication | N/A | No authentication |
| SECURITY-13 Integrity | Compliant | No external CDN resources; all assets self-hosted |
| SECURITY-14 Alerting | N/A | No server-side component; existing monitoring unchanged |
| SECURITY-15 Exception handling | Compliant | Failed submit falls back to a generic message with the mail address; global error page unchanged |
### Property-Based Testing
| Rule | Status | Rationale |
|---|---|---|
| PBT-01 Property identification | Planned | Properties of `webPage()`, `aboutPage()` and new helpers identified in design |
| PBT-02 Round-trip | Planned | Structured data through `jsonLdScript` parses back to the same object (extend if not covered) |
| PBT-03 Invariants | Planned | `@id` = `url` = canonical; no e-mail in structured data; card shows only valid channels |
| PBT-04 Idempotency | Planned | Applying the same `?pakket=` twice gives the same form state (if a new pure function is introduced) |
| PBT-05 Oracle | Planned | New `aboutPage()` equals the previous implementation for generated content |
| PBT-06 Stateful | Compliant | `contactFormReducer` is already covered; unchanged |
| PBT-07 Generators | Planned | Reuse/extend `src/test/arbitraries.ts` |
| PBT-08 Shrinking/reproducibility | Compliant | Existing seed logging (`config/testSeed.ts`) |
| PBT-09 Framework | Compliant | fast-check already configured |
| PBT-10 Complementary testing | Planned | Example-based tests for the page and components alongside PBT |
---
## Summary of Key Decisions
| # | Decision |
|---|---|
| Q1 | Same form fields as the homepage (shoot select), one payload |
| Q2 | Reply time "1-2 werkdagen", one content value for intro and thank-you |
| Q3 | Preselect via `/contact?pakket=<packageId>` (contract for soorten-fotoshoots-page) |
| Q4 | Same "Binnenkort" gate and switch as the homepage |
| Q5 | Shared `ContactPanel` for the homepage and this page |
| Q6 | Contact card with e-mail, Instagram and Facebook from `siteContent` |
| Q7 / A | Icons instead of per-channel headings; layout proposal 1a (form left, photo with overlapping card right) |
| Q8 / B | Phones: card above the form, no large photo, small round portrait in the card |
| Q9 | Original live photo, resized once, descriptive alt text |
| Q10 | Submit label "(Aan)vraag versturen" |
| Q11 | Privacy line with link under both forms |
| Q12 | Over mij links → `/contact`; homepage "Boek" links unchanged |
| Q13 | Indexed on merge |
| C / D | Title "Contact – fotoshoot boeken in Huizen"; description with "Huizen, het Gooi en omgeving" |
| Q15 | `ContactPage` JSON-LD via a generic `webPage()` helper, delivered as a separate first commit |
| Q16 | Own 1200×630 preview image |
| Ext. | Security Baseline: Yes · PBT: Yes (full) · Operations: No |
@@ -0,0 +1,46 @@
# Reverse Engineering Delta — contact-page
**Date**: 2026-10-24T19:55:00Z
**Base**: `aidlc-docs/_shared/reverse-engineering/` (content current up to ae769cb on feature/over-mij-page; the timestamp file still names 99d4610, but code-structure, component-inventory, architecture and api-documentation already describe the over-mij shared blocks)
**Why a delta instead of a shared refresh**: three features (portfolio-page, soorten-fotoshoots-page, contact-page) are stacked on the unmerged over-mij-page branch. By agreement each feature only records what concerns its own area, so the shared artifacts do not become a merge hotspot. Shared change made: one factual correction in `api-documentation.md` (contact payload).
## Current state of `/contact`
- `web/src/routes/contact.tsx` — placeholder: `PageIntro` ("Neem contact op" / "Contact" / "Deze pagina is nog in de maak"), `pageHead('/contact')`
- `web/src/sitePages.ts` — `/contact`: title "Contact", description present, `indexed: false`
- `web/lighthouserc.cjs` — `/contact` in `noindexPaths` (guarded by a test against sitePages)
## Design reference (`design/andreaslop-static/contact.html`)
```mermaid
graph TD
Head["page-head: eyebrow 'Neem contact op', h1 'Contact', intro (reply within 2-3 werkdagen)"]
Layout["section--flush-top: contact-layout (two columns)"]
Media["contact-layout__media: photo contact.jpg + contact-details (E-mail, Instagram, Facebook as h3 + link)"]
Form["form: naam, e-mail, onderwerp (text), bericht, status, 'Verzenden'"]
Head --> Layout
Layout --> Media
Layout --> Form
classDef head fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
classDef block fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
classDef part fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
class Head head;
class Layout block;
class Media,Form part;
```
Text alternative: the design page is a page head followed by one flush-top section with two columns: a photo with contact details on one side and the contact form on the other.
## Reusable code that already exists
- **Page structure**: `PageIntro` (eyebrow, h1, intro), `PageSection` (`spacing="flushTop"`, `aria-labelledby`), `MediaText`/`FramedImage` (photo next to a column), `Eyebrow`, `SectionHeading`, `Reveal`, `DeferredImage`
- **Form**: `ContactForm` (`idPrefix` for multiple pages; fields naam, e-mail, shoot select, bericht; honeypot + time check; focus handling; sent/failed states), `ContactFormGate` (inert + "Binnenkort" notice with mailto while `siteContent.contactForm.enabled` is false), lazy-loading and placeholder height in `home/ContactSection`
- **Logic (pure, PBT-tested)**: `contactFormReducer`, `validateContact`/`validateField`, `isLikelySpam`, `toContactPayload`, `shootOptions`, `mailSubject`/`mailtoLink`, `emailAddress` (assembled in the browser, never in the bundle), `visibleSocials`
- **Content**: `siteContent.email`, `siteContent.socials`, `siteContent.contactForm.enabled`; `packages` (for the shoot options)
- **SEO**: `pageHead`, `structuredDataScript`, `jsonLdScript`, `aboutPage`/`person`/`professionalService` with stable `@id`s (`businessId`); no `ContactPage` helper yet
## Differences between design and code to resolve in Requirements
- Design form has a free-text **Onderwerp** field; the code (homepage) uses a **shoot select** (`shoot`) and the payload `{ naam, email, shoot, bericht }`
- Design intro says reply within **2-3 werkdagen**; `ContactForm`'s thank-you says **1-2 werkdagen**
- Design submit label "Verzenden"; code "(Aan)vraag versturen"
- Design shows contact details (e-mail, Instagram, Facebook) under the photo; no such component exists (Footer and Hero render socials in their own way)
- `contact.jpg` from the design is not yet in `web/src/assets`
- Form stays gated (`contactForm.enabled: false`) until the API exists; the page must work with the gate (mailto fallback)