diff --git a/aidlc-docs/_shared/reverse-engineering/api-documentation.md b/aidlc-docs/_shared/reverse-engineering/api-documentation.md index 092fb41..df71a8a 100644 --- a/aidlc-docs/_shared/reverse-engineering/api-documentation.md +++ b/aidlc-docs/_shared/reverse-engineering/api-documentation.md @@ -11,7 +11,7 @@ None. There is no back-end yet (`api/` is empty). The static design README antic | Path | File | Head | Component | Indexed | |------|------|------|-----------|---------| | (root) | `routes/__root.tsx` | `siteHead(siteContent)` | `AppShell` | — | -| `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` | yes | +| `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` + six home sections; search `?pakket=` | yes | | `/over-mij` | `routes/over-mij.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | | `/portfolio` | `routes/portfolio.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | | `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead(...)` | `PageIntro` placeholder | no | @@ -32,6 +32,13 @@ None. There is no back-end yet (`api/` is empty). The static design README antic - `Footer({ content: SiteContent })`, `FooterColumn({ title, children })`, `FooterLink(LinkProps)` - `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 +- `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, ... })` - `StatusPage({ title, children, actions? })`, `ErrorPage({ error, reset })` - `LinkButton(RouterLink props & { variant?: 'outline' | 'accent' | 'light' })` - `UmamiAnalytics({ hostname? })` @@ -40,6 +47,7 @@ None. There is no back-end yet (`api/` is empty). The static design README antic - `useHeroSlider(count)` → slider state, controls, handlers, `HeroAnnouncement` - `useScrolledPast(getThreshold)` → boolean (stable `getThreshold` required) - `useRouteFocus()` — focuses `
` after navigation +- `useInView({ rootMargin, skip })` → `{ ref, inView }`; `usePageLoaded()` → boolean; `useReveal()` → `{ ref, visible }` ### Pure helpers (`lib/`) - `emailAddress({ user, domain }): string | null` @@ -47,13 +55,20 @@ None. There is no back-end yet (`api/` is empty). The static design README antic - `copyrightLine(year): string` - `slidesToLoad(active, count): number[]` - `backToTopThreshold(viewportHeight): number` +- `slideLabel`, `formatPrice`, `bookLabel`, `visiblePackages`, `visibleTestimonials`, `packageFromSearch`, `shootOptions`, `mailSubject`/`mailtoLink`, `validateField`/`validateContact`, `isLikelySpam`, `toContactPayload`, `contactFormReducer` ### Monitoring - `monitoringFor(hostname): Monitoring | null`, `startSentry(hostname?)`, `reportError(error)` ## Data Models ### SiteContent (`content/types.ts`) -- **Fields**: `footerIntro: string`, `socials: SocialLink[]`, `email: EmailAddress` +- **Fields**: `footerIntro: string`, `socials: SocialLink[]`, `email: EmailAddress`, `contactForm: { enabled: boolean }` +### ContentImage +- **Fields**: `src`, `alt`, `width`, `height` (intrinsic size, reserves space) +### HomeContent +- **Fields**: `intro`, `about` (`eyebrow`, `title`, `paragraphs[]`, `image`, `link: { label, to: RoutePath }`), `pricing`, `testimonials`, `contact`, `instagram` +### PricingPackage / Testimonial +- **Fields**: `id`, `name`, `price`, `features[]` / `id`, `shoot`, `quote`, `author`, `image` ### SocialLink - **Fields**: `platform: SocialPlatform` (`facebook` | `instagram`), `href: string` - **Validation**: shown only if `href` is a valid https URL diff --git a/aidlc-docs/_shared/reverse-engineering/architecture.md b/aidlc-docs/_shared/reverse-engineering/architecture.md index 1cadd60..83f51fd 100644 --- a/aidlc-docs/_shared/reverse-engineering/architecture.md +++ b/aidlc-docs/_shared/reverse-engineering/architecture.md @@ -15,10 +15,13 @@ graph TD Shell --> Footer["Footer (FooterColumn, FooterLink)"] Shell --> ToTop["BackToTop"] Shell --> Umami["UmamiAnalytics"] - Outlet --> Home["routes/index.tsx: Hero"] + Outlet --> Home["routes/index.tsx: Hero + six sections"] Outlet --> Placeholders["over-mij, portfolio, soorten-fotoshoots, contact, privacyverklaring: PageIntro"] Home --> Hero["Hero (HeroArrows, HeroPauseButton, HeroSocials, useHeroSlider)"] - Content["content/: siteContent, heroContent, types"] -.-> Shell + Home --> Sections["components/home/: IntroGallery, AboutBlock, Pricing, Testimonials, ContactSection, InstagramGrid"] + Sections --> Blocks["Shared blocks: PageSection, MediaText, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal"] + Sections --> Form["ContactForm + ContactFormGate (lazy), contact/"] + Content["content/: siteContent, heroContent, homeContent, packages, testimonials, types"] -.-> Shell Content -.-> Home Nav --> NavData["navigation.ts: mainNav, footerNav"] Footer --> NavData @@ -31,11 +34,11 @@ graph TD classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000; class Main,Root entry; class Shell,Skip,Nav,Footer,ToTop,Umami,Outlet shell; - class Home,Placeholders,Hero page; - class Content,NavData,Seo,Theme support; + class Home,Placeholders,Hero,Sections,Form page; + class Content,NavData,Seo,Theme,Blocks support; ``` -Text alternative: main.tsx starts Sentry and mounts the router; the root route renders AppShell (skip link, NavigationBar, the page via Outlet, Footer, BackToTop, Umami); the home route renders the Hero, the other routes render placeholder PageIntros; content, navigation, SEO and theme modules support all of it. +Text alternative: main.tsx starts Sentry and mounts the router; the root route renders AppShell (skip link, NavigationBar, the page via Outlet, Footer, BackToTop, Umami); the home route renders the Hero and six sections built from shared blocks (one of them lazily loads the contact form); the other routes render placeholder PageIntros; content, navigation, SEO and theme modules support all of it. ## Component Descriptions ### main.tsx @@ -68,21 +71,41 @@ Text alternative: main.tsx starts Sentry and mounts the router; the root route r - **Responsibilities**: Crossfade slides, progress-driven autoplay, arrows, swipe, pause button, pause on hover/focus/hidden tab, reduced motion, live-region announcements, lazy loading of nearby slides, social icons - **Type**: Application +### components/home/ (homepage sections) +- **Purpose**: The six homepage blocks below the hero, in LAYOUT.md order +- **Responsibilities**: `IntroGallery` (four photos, swipeable row on phones), `AboutBlock` (framed photo of Andrea + intro + link to `/over-mij`), `Pricing` + `PriceCard` (packages with "Boek" links → `/?pakket=…#contact`), `Testimonials` (+ `TestimonialCarousel`, `TestimonialSlide`), `ContactSection` (lazy `ContactForm` behind `ContactFormGate`, mailto fallback), `InstagramGrid` (fixed tiles linking to the profile) +- **Type**: Application + +### 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) +- **Type**: Application (shared UI) + ### components/PageIntro/, StatusPage/ - **Purpose**: Shared page building blocks -- **Responsibilities**: `PageIntro` — eyebrow, the page's h1 and an intro (used by placeholders); `StatusPage` — layout for 404 and error pages +- **Responsibilities**: `PageIntro` — eyebrow, the page's h1 and an intro (used by placeholders; design `.page-head`); `StatusPage` — layout for 404 and error pages +- **Type**: Application + +### components/ContactForm/ + contact/ +- **Purpose**: Contact form, built ahead of the API +- **Responsibilities**: `ContactForm` (fields, validation, honeypot + minimum fill time, reducer-driven status), `ContactFormGate` (dims the form under a "coming soon" notice while `siteContent.contactForm.enabled` is false); `contact/submitContactForm.ts` (placeholder submit), `contact/types.ts` (fields, limits, payload) - **Type**: Application ### content/ - **Purpose**: Static content until the CMS API exists -- **Responsibilities**: `types.ts` (API-shaped interfaces), `siteContent.ts` (footer intro, socials, e-mail parts), `heroContent.ts` (title, tagline, CTA, slides), `socialPlatforms.ts` (platform → name + offline icon) +- **Responsibilities**: `types.ts` (API-shaped interfaces incl. `ContentImage`, `HomeContent`, `PricingPackage`, `Testimonial`), `siteContent.ts` (footer intro, socials, e-mail parts, contact form switch), `heroContent.ts`, `homeContent.ts` (texts and photos of the homepage sections), `packages.ts`, `testimonials.ts`, `socialPlatforms.ts` - **Type**: Application (data) ### lib/ - **Purpose**: Pure, fully tested helpers -- **Responsibilities**: `emailAddress`, `visibleSocials`, `copyrightLine`, `slidesToLoad`, `backToTopThreshold` +- **Responsibilities**: `emailAddress`, `visibleSocials`, `copyrightLine`, `slidesToLoad`, `backToTopThreshold`, `slideLabel`, `formatPrice`, `bookLabel`, `visiblePackages`, `visibleTestimonials`, `packageFromSearch`, `shootOptions`, `mailLink`, `validateContact`, `isLikelySpam`, `toContactPayload`, `contactFormReducer` - **Type**: Application (utility, 100% coverage threshold) +### hooks/ +- **Purpose**: Shared behaviour +- **Responsibilities**: `useRouteFocus`, `useScrolledPast`, `useInView` (IntersectionObserver), `usePageLoaded` (after the load event), `useReveal` (reveal once, immediately with reduced motion) +- **Type**: Application + ### seo.ts, sitePages.ts, sitemap.ts - **Purpose**: SEO - **Responsibilities**: Page registry (title, description, `indexed`), `pageHead(path)`, canonical URLs, JSON-LD, sitemap generation at build time (via `config/sitemapPlugin.ts`) @@ -100,7 +123,7 @@ Text alternative: main.tsx starts Sentry and mounts the router; the root route r ### theme.ts / recipes/ - **Purpose**: Design system -- **Responsibilities**: Colour, font, spacing, easing, duration, z-index tokens; semantic `bg`/`fg`/`focusRing`, `header`/`content`/`pageTop` sizes; `eyebrow`/`display`/`pageTitle` text styles; recipes `container`, `link` (subtle), `linkButton` (outline/accent/light), `iconControl`, `skipNavLink` +- **Responsibilities**: Colour (paper/ink/accent/sand/line/error), font, spacing (`gutter`, `sectionY`, `sectionYTight`, `sectionHeadGap`, `gridGap`), easing, duration (`interaction`, `fade`, `reveal`), z-index, shadow, gradient tokens; semantic `bg`/`fg`/`focusRing`, `header`/`content`/`contentNarrow` sizes, `header`/`pageTop` spacing; text styles `eyebrow`/`display`/`sectionTitle`/`lead`/`pageTitle`; recipes `container`, `link` (subtle/underline), `linkButton` (outline/accent/light, size default/fit), `iconControl`, `carouselControl`, `formControl`, `skipNavLink` - **Type**: Application (shared UI foundation) ## Data Flow @@ -125,7 +148,7 @@ sequenceDiagram Text alternative: a visitor navigates, the router renders the root layout (AppShell), which renders the matched page through the Outlet; the page's head() supplies title/meta from the page registry and focus moves to main. ## Integration Points -- **External APIs**: None yet (planned .NET API for content and the contact form — design README: `POST /api/contact` with `{ naam, email, onderwerp, bericht }`) +- **External APIs**: None yet (planned .NET API for content and the contact form; the form already sends `{ naam, email, shoot, bericht }` to a placeholder `submitContactForm` and stays gated off until the API exists) - **Databases**: None - **Third-party Services**: Sentry (errors, EU ingest), Umami at analytics.slpsoftware.nl (cookieless stats), UptimeRobot (availability, external), outbound links to Facebook/Instagram diff --git a/aidlc-docs/_shared/reverse-engineering/business-overview.md b/aidlc-docs/_shared/reverse-engineering/business-overview.md index c91fb1e..ee98368 100644 --- a/aidlc-docs/_shared/reverse-engineering/business-overview.md +++ b/aidlc-docs/_shared/reverse-engineering/business-overview.md @@ -27,14 +27,16 @@ Text alternative: visitors and crawlers use the website, which links out to soci ## Business Description - **Business Description**: Portfolio and marketing website for Andrea Slop Fotografie, a lifestyle photographer in Huizen (NL). It presents her work (loveshoots, family, pregnancy and newborn shoots), tells who she is, lists shoot types and prices, and gets prospective clients to make contact. It will replace the existing WordPress (Solene theme) site at andreaslop.nl; a test build runs at test.andreaslop.nl. - **Business Transactions** (current state — front-end only, no back-end): - - **Browse the homepage** — hero slider with featured photos (autoplay, arrows, swipe, pause button, screen reader announcements), call-to-action to "Over mij" + - **Browse the homepage** — hero slider with featured photos (autoplay, arrows, swipe, pause button, screen reader announcements), call-to-action to "Over mij"; below it Lifestyle fotografie (photo gallery), Over mij (intro + "Lees mijn verhaal" → `/over-mij`), Prijzen (packages), Lieve woorden (testimonials carousel), Contact and Instagram + - **Choose a package** — "Boek" on a price card scrolls to Contact with that shoot preselected (`?pakket=`) + - **Contact the photographer** — contact form (validation, anti-spam) shown dimmed under a "coming soon" notice until the API exists; mailto fallback with a subject - **Navigate between pages** — header navigation (desktop), full-screen menu (mobile), footer menu, skip link, back-to-top button - **Visit social profiles** — Facebook / Instagram links in the hero and footer - **E-mail the photographer** — mailto link in the footer - **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 - *Placeholder pages (noindex)*: Over mij, Portfolio, Soorten fotoshoots, Contact, Privacyverklaring - - *Planned (static design only)*: homepage sections below the hero (lifestyle gallery, about, prices, contact form, Instagram), portfolio with lightbox, shoot types and pricing page, contact page + - *Planned (static design only)*: Over mij page (intro with portrait, "Hoe het begon", photo duo, "Buiten de camera om", booking button), 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) - **Hero** — full-screen photo slider at the top of the homepage @@ -48,7 +50,7 @@ Text alternative: visitors and crawlers use the website, which links out to soci ## Component Level Business Descriptions ### web (React front-end) - **Purpose**: The public website visitors see -- **Responsibilities**: Page routing, layout shell, homepage hero, SEO, monitoring, design system, server configuration for test (nginx) and production (IIS) +- **Responsibilities**: Page routing, layout shell, homepage (hero + six sections, contact form behind a gate), SEO, monitoring, design system, server configuration for test (nginx) and production (IIS) ### .gitea/workflows (CI/CD) - **Purpose**: Quality gate and delivery diff --git a/aidlc-docs/_shared/reverse-engineering/code-quality-assessment.md b/aidlc-docs/_shared/reverse-engineering/code-quality-assessment.md index 3a446c4..44967a5 100644 --- a/aidlc-docs/_shared/reverse-engineering/code-quality-assessment.md +++ b/aidlc-docs/_shared/reverse-engineering/code-quality-assessment.md @@ -3,7 +3,7 @@ ## Test Coverage - **Overall**: Good. Vitest with v8 coverage; 100% threshold enforced for `src/lib/**`, `src/seo.ts`, `src/sitemap.ts`; other files reported - **Unit Tests**: Pure helpers, SEO, sitemap, monitoring config, security headers, server config (incl. drift check against `deploy/`) -- **Component Tests**: AppShell, NavigationBar, Footer, Hero (+ slider hook), BackToTop, PageIntro, StatusPage, Umami — with axe accessibility checks +- **Component Tests**: AppShell, NavigationBar, Footer, Hero (+ slider hook), BackToTop, PageIntro, StatusPage, Umami, all home sections, PageSection, MediaText, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal, ContactForm(+Gate) — with axe accessibility checks; `app.test.tsx` renders whole routes - **Property-based Tests**: fast-check, shared arbitraries in `src/test/arbitraries.ts`, seed logged in CI - **Integration / E2E**: No browser E2E; Lighthouse CI covers built pages (accessibility, best practices, SEO, performance) @@ -15,8 +15,9 @@ ## Technical Debt - Homepage mobile Lighthouse performance target is lowered to 0.8 (images not responsive, title after JavaScript); back to 0.9 is planned with responsive images from the API and prerendering - Five routes are placeholders (`noindex`); `lighthouserc.cjs` keeps its own list of indexed/noindex paths, guarded by a test against `sitePages.ts` -- Static design images for the homepage sections (intro gallery, about photo, pricing decorations) are not yet in `web/src/assets` -- No responsive image pipeline (srcset/sizes); hero photos are single large JPEGs +- No responsive image pipeline (srcset/sizes); photos are single JPEGs +- Comment language is mixed: older code is commented in Dutch, homepage-sections code in English +- Over mij page images (`andrea-portret.jpg`, `about-1.jpg`, `about-2.jpg`) exist only in the static design, not yet in `web/src/assets` ## Patterns and Anti-patterns - **Good Patterns**: API-shaped content; pure, property-tested helpers; tokens and recipes as single source of truth; configuration as code for headers; strong accessibility baseline (axe in tests, Lighthouse accessibility 1.0) diff --git a/aidlc-docs/_shared/reverse-engineering/code-structure.md b/aidlc-docs/_shared/reverse-engineering/code-structure.md index 8e10821..bec3ccf 100644 --- a/aidlc-docs/_shared/reverse-engineering/code-structure.md +++ b/aidlc-docs/_shared/reverse-engineering/code-structure.md @@ -31,45 +31,61 @@ graph TD Hero --> useHeroSlider["Hero/useHeroSlider.ts"] Hero --> LinkButton["components/LinkButton.tsx"] LinkButton --> RouterLink["components/RouterLink.tsx"] - Placeholder["routes/contact.tsx and other placeholders"] --> PageIntro["PageIntro/PageIntro.tsx"] + Index --> HomeParts["home/*: IntroGallery, AboutBlock, Pricing, Testimonials, ContactSection, InstagramGrid"] + HomeParts --> PageSection["PageSection/PageSection.tsx"] + HomeParts --> SectionHeading["SectionHeading/SectionHeading.tsx"] + HomeParts --> Reveal["Reveal/Reveal.tsx"] + HomeParts --> FramedImage["FramedImage/FramedImage.tsx"] + FramedImage --> DeferredImage["DeferredImage/DeferredImage.tsx"] + HomeParts --> DeferredImage + Placeholder["routes/over-mij.tsx and other placeholders"] --> PageIntro["PageIntro/PageIntro.tsx"] classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000; classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; classDef util fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000; class Root,AppShell,NavigationBar,Footer,BackToTop,Umami,NavLink,MobileNav shell; - class Index,Hero,HeroArrows,HeroPause,HeroSocials,Placeholder,PageIntro page; - class navigation,useHeroSlider,LinkButton,RouterLink util; + class Index,Hero,HeroArrows,HeroPause,HeroSocials,Placeholder,PageIntro,HomeParts page; + class navigation,useHeroSlider,LinkButton,RouterLink,PageSection,SectionHeading,Reveal,FramedImage,DeferredImage util; ``` -Text alternative: the root route renders AppShell (NavigationBar, Footer, BackToTop, Umami); NavigationBar and Footer read navigation.ts; the index route renders the Hero with its sub-components and LinkButton; placeholder routes render PageIntro. +Text alternative: the root route renders AppShell (NavigationBar, Footer, BackToTop, Umami); NavigationBar and Footer read navigation.ts; the index route renders the Hero and the six home sections, which are built from the shared PageSection, SectionHeading, Reveal, FramedImage and DeferredImage blocks; placeholder routes render PageIntro. ### Existing Files Inventory -Candidates for modification are marked with ★ for the homepage-sections feature. +Candidates for modification are marked with ★ for the over-mij-page feature. - `web/index.html` — HTML entry; static fallback head for non-JS crawlers - `web/src/main.tsx` — bootstrap - `web/src/routeTree.gen.ts` — generated (do not edit) - `web/src/routes/__root.tsx` — root layout, site head, 404/error -- ★ `web/src/routes/index.tsx` — home (`/`), currently only the Hero -- `web/src/routes/{over-mij,portfolio,soorten-fotoshoots,contact,privacyverklaring}.tsx` — placeholders with `PageIntro` +- `web/src/routes/index.tsx` — home (`/`): Hero + six sections, `?pakket=` search param +- ★ `web/src/routes/over-mij.tsx` — placeholder with `PageIntro` (to become the real page) +- `web/src/routes/{portfolio,soorten-fotoshoots,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 - `web/src/components/Hero/*` — hero slider, arrows, pause button, socials, slider hook +- `web/src/components/home/*` — the six homepage sections (AboutBlock is the closest relative of the Over mij page's first block) +- ★ `web/src/components/PageSection/PageSection.tsx` — section frame for any page (was `HomeSection`) +- ★ `web/src/components/MediaText/MediaText.tsx`, `Eyebrow/Eyebrow.tsx` — framed photo next to text; accent label +- ★ `web/src/components/SectionHeading/SectionHeading.tsx` — eyebrow + h2 + lead +- ★ `web/src/components/FramedImage/FramedImage.tsx`, `DeferredImage/DeferredImage.tsx`, `Reveal/Reveal.tsx` — photo blocks and fade-in +- `web/src/components/ContactForm/*` — contact form and gate - `web/src/components/BackToTop/BackToTop.tsx` — back-to-top button - `web/src/components/Analytics/UmamiAnalytics.tsx` — Umami script injection -- `web/src/components/PageIntro/PageIntro.tsx` — page head block (eyebrow, h1, intro) +- ★ `web/src/components/PageIntro/PageIntro.tsx` — page head block (eyebrow, h1, intro) - `web/src/components/StatusPage/*` — StatusPage layout, NotFound, ErrorPage -- `web/src/components/LinkButton.tsx`, `RouterLink.tsx` — router links (button style / Chakra-wrapped) +- ★ `web/src/components/LinkButton.tsx`, `RouterLink.tsx` — router links (button style / Chakra-wrapped) - ★ `web/src/content/types.ts` — content interfaces (API shape) -- ★ `web/src/content/siteContent.ts`, `heroContent.ts`, `socialPlatforms.ts` — static content -- `web/src/hooks/useRouteFocus.ts`, `useScrolledPast.tsx` +- ★ `web/src/content/*.ts` — static content (`siteContent`, `heroContent`, `homeContent`, `packages`, `testimonials`, `socialPlatforms`) +- `web/src/contact/*` — contact form types and placeholder submit +- `web/src/hooks/*` — `useRouteFocus`, `useScrolledPast`, `useInView`, `usePageLoaded`, `useReveal` - `web/src/lib/*.ts` — pure helpers with tests - `web/src/monitoring/*` — Sentry/Umami config and loader - `web/src/navigation.ts` — `RoutePath`, `mainNav`, `footerNav` -- ★ `web/src/seo.ts`, `sitePages.ts`, `sitemap.ts` — SEO (home description may change) +- ★ `web/src/seo.ts`, `sitePages.ts`, `sitemap.ts` — SEO (`/over-mij` is `indexed: false` today) +- ★ `web/lighthouserc.cjs` / `.desktop.cjs` — own list of indexed/noindex paths, guarded by a test - `web/src/theme.ts`, `web/src/recipes/*.ts` — design system -- `web/src/test/*` — `renderWithProviders`, axe matcher, fast-check arbitraries, setup -- `web/src/assets/*` — hero photos (8), light/dark logos -- ★ `web/config/securityHeaders.ts` — CSP (only if the contact form posts to a third party) +- `web/src/test/*` — `renderWithProviders`, axe matcher, fast-check arbitraries, `fakeIntersectionObserver`, setup +- `web/src/assets/*` — hero photos (8), `home/` (intro 1–4, andrea, deco 1–2, two review photos), light/dark logos +- `web/config/securityHeaders.ts` — CSP - `web/config/serverConfig.ts`, `writeServerConfig.ts`, `sitemapPlugin.ts`, `testSeed.ts` - `web/deploy/iis/web.config`, `web/deploy/nginx/*.conf` — generated server configs - `web/public/*` — favicon, logo, og-image, robots.txt, icons.svg @@ -90,6 +106,15 @@ Candidates for modification are marked with ★ for the homepage-sections featur - **Purpose**: Single source for colours, fonts, spacing, motion; reusable component variants - **Implementation**: `defineConfig` tokens/semanticTokens/textStyles, `defineRecipe` + `useRecipe` +### Section composition +- **Location**: `components/home/*` on top of `PageSection`, `MediaText`, `SectionHeading`, `Reveal`, `FramedImage`, `DeferredImage` +- **Purpose**: Each section is a thin component that gets its content as a prop and composes the shared blocks; the h2 id links the section landmark (`aria-labelledby`) +- **Implementation**: One `TITLE_ID` constant per section; `data-testid` on the section root; validity filters in `lib/` (e.g. `visiblePackages`) decide what is rendered + +### Deferred below-the-fold images +- **Location**: `DeferredImage`, `usePageLoaded`, `useInView` +- **Purpose**: Protect the largest contentful paint; photos load only after the load event and near the viewport, with intrinsic width/height reserving space + ### Page registry - **Location**: `sitePages.ts`, typed by `RoutePath` - **Purpose**: One source for head tags and the sitemap; `indexed: false` for placeholders diff --git a/aidlc-docs/_shared/reverse-engineering/component-inventory.md b/aidlc-docs/_shared/reverse-engineering/component-inventory.md index 4b2e9a3..1c76faf 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/` +- 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` ## 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/_shared/reverse-engineering/dependencies.md b/aidlc-docs/_shared/reverse-engineering/dependencies.md index 0934c67..e195fcb 100644 --- a/aidlc-docs/_shared/reverse-engineering/dependencies.md +++ b/aidlc-docs/_shared/reverse-engineering/dependencies.md @@ -14,17 +14,18 @@ graph LR components --> hooks["hooks/*"] components --> navigation["navigation.ts"] components --> assets["assets/*"] + components --> contact["contact/*"] config["config/* (Node, build time)"] --> monitoring config --> seo classDef app fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000; classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000; classDef build fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000; class main,routes,components app; - class theme,monitoring,content,seo,lib,hooks,navigation,assets support; + class theme,monitoring,content,seo,lib,hooks,navigation,assets,contact support; class config build; ``` -Text alternative: main depends on theme, routes and monitoring; routes depend on components, content and SEO; components depend on lib, hooks, navigation and assets; build-time config reads monitoring (CSP origins) and SEO (sitemap). +Text alternative: main depends on theme, routes and monitoring; routes depend on components, content and SEO; components depend on lib, hooks, navigation, assets and the contact form module; build-time config reads monitoring (CSP origins) and SEO (sitemap). ### routes depend on content and components - **Type**: Compile diff --git a/aidlc-docs/_shared/reverse-engineering/reverse-engineering-timestamp.md b/aidlc-docs/_shared/reverse-engineering/reverse-engineering-timestamp.md index 10d73a9..5d57076 100644 --- a/aidlc-docs/_shared/reverse-engineering/reverse-engineering-timestamp.md +++ b/aidlc-docs/_shared/reverse-engineering/reverse-engineering-timestamp.md @@ -1,11 +1,11 @@ # Reverse Engineering Metadata -**Analysis Date**: 2026-10-19T19:19:38Z (refresh; previous analysis 2026-10-14T09:58:04Z at 8f5841c) +**Analysis Date**: 2026-10-22T16:58:52Z (refresh; previous analysis 2026-10-19T19:19:38Z at 38c5c3e) **Analyzer**: AI-DLC **Workspace**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie -**Codebase Commit**: 38c5c3e (branch master) -**Total Files Analyzed**: ~95 (web/src, web/config, web/deploy, web config files, CI workflow, design/andreaslop-static pages and README) -**Refreshed for**: feature homepage-sections +**Codebase Commit**: 99d4610 (branch master) +**Total Files Analyzed**: ~95 changed files since the previous analysis (homepage sections, shared section blocks, contact form, lib helpers, hooks, recipes, theme) plus design/andreaslop-static/over-mij.html +**Refreshed for**: feature over-mij-page ## Artifacts Generated - [x] business-overview.md @@ -13,6 +13,6 @@ - [x] code-structure.md - [x] api-documentation.md - [x] component-inventory.md -- [x] technology-stack.md +- [x] technology-stack.md (unchanged: no dependency changes since 38c5c3e) - [x] dependencies.md - [x] code-quality-assessment.md diff --git a/aidlc-docs/active-features.md b/aidlc-docs/active-features.md index bae5d6e..3c3a6a6 100644 --- a/aidlc-docs/active-features.md +++ b/aidlc-docs/active-features.md @@ -5,3 +5,4 @@ | Bug | [hero-carousel-announce-and-pause](bugs/hero-carousel-announce-and-pause/bug-fix.md) | ✅ Complete | fix/hero-carousel-announce-and-pause | web/src/components/Hero (Hero, HeroArrows, useHeroSlider) | 2026-10-19 | | 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 | 🔵 Inception | 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 | diff --git a/aidlc-docs/features/over-mij-page/aidlc-state.md b/aidlc-docs/features/over-mij-page/aidlc-state.md new file mode 100644 index 0000000..ca283cf --- /dev/null +++ b/aidlc-docs/features/over-mij-page/aidlc-state.md @@ -0,0 +1,75 @@ +# AI-DLC State Tracking + +## Project Information +- **Feature Name**: Over mij page (`/over-mij`) +- **Feature Slug**: over-mij-page +- **Project Type**: Brownfield +- **Start Date**: 2026-10-22T16:58:52Z +- **Current Stage**: CONSTRUCTION - Code Generation (Unit 1 Shared blocks, planning) +- **Branch**: feature/over-mij-page + +## Workspace State +- **Existing Code**: Yes +- **Programming Languages**: TypeScript (React/TSX) +- **Build System**: pnpm + Vite (`tsc && vite build`), Gitea Actions CI +- **Project Structure**: Single front-end SPA in `web/`; static HTML design reference in `design/andreaslop-static/`; `api/` folder present but empty (.NET back-end planned) +- **Reverse Engineering Needed**: Yes (refresh — artifacts stale since commit 38c5c3e) +- **Workspace Root**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie + +## Code Location Rules +- **Application Code**: Workspace root (NEVER in aidlc-docs/) — front-end lives in `web/` +- **Feature Documentation**: aidlc-docs/features/over-mij-page/ only +- **Shared Artifacts**: aidlc-docs/_shared/ +- **Structure patterns**: See code-generation.md Critical Rules + +## Language Configuration +- **Documentation Language**: English +- **Conversation Language**: User Language (Dutch) +- **Source**: inherited from aidlc-docs/language-preference.md (answer A); user may override + +## Extension Configuration +| Extension | Enabled | Decided At | +|---|---|---| +| Security Baseline | Yes | Requirements Analysis | +| Property-Based Testing | Yes (full enforcement) | Requirements Analysis | + +## Operations Configuration +- **Include Operations Phase**: No +- **Decided At**: Requirements Analysis + +## Execution Plan Summary +- **Stages to Execute**: Application Design (minimal), Functional Design (unit 2 only), Code Generation (2 units), Build and Test +- **Stages to Skip**: User Stories (single persona, concrete FRs), Units Generation (split fixed in the execution plan), Functional Design for unit 1 (behaviour-preserving refactor), NFR Requirements and NFR Design (NFRs set at requirements level, no new patterns), Infrastructure Design (static assets only), Operations (decided No) +- **Units**: 1 Shared blocks (PageSection rename, shared media+text block) → 2 Over mij page +- **Delivery**: branch feature/over-mij-page, commits per unit, full `pnpm check` (incl. Lighthouse) per unit, one PR at the end + +## Stage Progress + +### 🔵 INCEPTION PHASE +- [x] Workspace Detection +- [x] Reverse Engineering (refresh, approved) +- [x] Requirements Analysis (approved) +- [x] User Stories - SKIP +- [x] Workflow Planning (approved) +- [x] Application Design - EXECUTE (approved) +- [x] Units Generation - SKIP + +### 🟢 CONSTRUCTION PHASE +- [ ] Functional Design - EXECUTE (unit 2) / SKIP (unit 1) +- [ ] NFR Requirements - SKIP +- [ ] NFR Design - SKIP +- [ ] Infrastructure Design - SKIP +- [~] Code Generation - EXECUTE (per unit) — Unit 1 Shared blocks: plan awaiting approval +- [ ] Build and Test - EXECUTE + +### 🟡 OPERATIONS PHASE +- [x] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP (Operations = No) + +## Current Status +- **Lifecycle Phase**: CONSTRUCTION +- **Current Stage**: Code Generation — Unit 1 Shared blocks (plan) +- **Next Stage**: Functional Design — Unit 2 Over mij page + +## Reverse Engineering Status +- [x] Reverse Engineering - Artifacts refreshed on 2026-10-22T17:10:00Z at commit 99d4610 (approved 2026-10-22T17:19:39Z) +- **Artifacts Location**: aidlc-docs/_shared/reverse-engineering/ diff --git a/aidlc-docs/features/over-mij-page/audit.md b/aidlc-docs/features/over-mij-page/audit.md new file mode 100644 index 0000000..1a1f962 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/audit.md @@ -0,0 +1,196 @@ +# AI-DLC Audit Log — over-mij-page + +## Initial User Request + +**Timestamp**: 2026-10-22T16:58:52Z + +**User Input**: "Ik wil met aidlc de volgende pagina gaan toevoegen aan de front end. De over mij pagina. Denk ook hier weer aan de seo, accessibility en hergebruik van code en styling met bijvoorbeeld chakra en de theme" + +**AI Response**: "Started AI-DLC workflow (existing multi-feature workspace, no welcome message). Began Workspace Detection." + +**Context**: INCEPTION - Workspace Detection (start) + +--- + +## Workspace Detection + +**Timestamp**: 2026-10-22T16:58:52Z + +**User Input**: (none — automatic stage) + +**AI Response**: "Feature resolution: all existing items (frontend-shell, homepage-sections, hero-carousel-announce-and-pause) are ✅ Complete and the request is clearly new work, so a new feature was started without a feature-selection prompt. Classification: Feature (new page, no defect). Slug: over-mij-page. Branch feature/over-mij-page created from master (99d4610). Brownfield (React SPA in web/, placeholder route web/src/routes/over-mij.tsx and design reference design/andreaslop-static/over-mij.html exist). Language configuration inherited from aidlc-docs/language-preference.md (answer A: English docs, Dutch conversation), stated to the user for correction instead of re-asking, as in the previous feature. Reverse engineering artifacts in _shared/ are stale: generated at commit 38c5c3e, before homepage-sections landed (95 files changed under web/ and design/ up to 99d4610). Next: refresh Reverse Engineering." + +**Context**: INCEPTION - Workspace Detection (complete). Parallel features: none active. Conflicts: none. + +--- + +## Reverse Engineering (refresh) + +**Timestamp**: 2026-10-22T17:10:00Z + +**User Input**: (none — automatic stage) + +**AI Response**: "Refreshed the shared reverse engineering artifacts for commit 99d4610: architecture (home sections, shared section blocks, contact form, hooks, theme tokens/recipes), code structure (new diagram, inventory with ★ candidates for this feature, section composition and deferred image patterns), API documentation (new component props, hooks, helpers, content models), business overview (homepage transactions; Over mij page still planned), dependencies (contact/), code quality (new debt items: HomeSection name, mixed comment language, Over mij images not yet in web/src/assets), timestamp. technology-stack.md unchanged (no dependency changes). Presented completion message and asked for approval." + +**Context**: INCEPTION - Reverse Engineering (awaiting approval) + +--- + +## Reverse Engineering — Approval + +**Timestamp**: 2026-10-22T17:19:39Z + +**User Input**: "Ga verder" + +**AI Response**: "Reverse Engineering refresh approved. Started Requirements Analysis." + +**Context**: INCEPTION - Reverse Engineering (approved) + +--- + +## Requirements Analysis — Clarifying Questions + +**Timestamp**: 2026-10-22T17:30:00Z + +**User Input**: (none) + +**AI Response**: "Intent: new feature, clear request, single component (web/) plus design/LAYOUT.md, simple-to-moderate complexity; standard depth. Compared the live page andreaslop.nl/over-mij with design/andreaslop-static/over-mij.html (differences in headings, two extra live sentences, the cat remark, the booking button, missing alt texts). Created inception/requirements/requirement-verification-questions.md with 12 content questions (text source, sub-headings, links to placeholder pages, booking button target, indexing, title/description, JSON-LD, OG image, HomeSection rename, shared media+text block, photos/alt texts, LAYOUT.md) plus the Security Baseline, PBT and Operations questions." + +**Context**: INCEPTION - Requirements Analysis (awaiting answers) + +--- + +## Requirements Analysis — Answers Received + +**Timestamp**: 2026-10-22T18:05:00Z + +**User Input**: "Ik heb de vragen beantwoord" — answers in requirement-verification-questions.md: Q1 B, Q2 "X, Net als A, maar dan met h3. Het valt uiteindelijk allemaal onder het \"Over mij\" deel wat een H2 is. Dus ik denk dat h3 dan logischer is. in de stijl van het design. Als jij wat anders denkt laat me dat dan weten. Misschien mis ik iets.", Q3 B, Q4 A, Q5 A, Q6 A, Q7 A, Q8 A, Q9 A, Q10 A, Q11 A, Q12 A, Security Baseline A, PBT A, Operations B + +**AI Response**: "All answers consistent except Q2: the rationale assumes 'Over mij' is an h2, but on this page it is the h1 (PageIntro); with h3 the two sections would nest under 'Hoi! Ik ben Andrea' instead of being siblings. The user invited a counter-view, so created requirement-clarification-questions.md with one question (h2 vs h3, both styled as the design's eyebrow)." + +**Context**: INCEPTION - Requirements Analysis (awaiting clarification) + +--- + +## Requirements Analysis — Clarification Answer + +**Timestamp**: 2026-10-22T20:57:23Z + +**User Input**: "ik heb de vraag beantwoord" — answer in requirement-clarification-questions.md: "ah ja dat bedoelde ik ook. ze staan onder hoi ik ben andrea en zijn een vervolg op haar verhaal daar. dus daarom zou ik zeggen h3 wat ook het verschil in styling zou kunnen verklaren. als we h2 doen denk ik dat de styling hetzelfde als de andere h2's moet worden" + +**AI Response**: "Accepted h3 (option B): the two sections continue the story under 'Hoi! Ik ben Andrea', and the smaller eyebrow styling matches the lower heading level — a consistent visual hierarchy. No remaining contradictions. Wrote inception/requirements/requirements.md (FR-OM-01..10, SEO-OM-01..05, NFR-OM-01..06, extension compliance). Recorded Security Baseline = Yes, PBT = Yes (full), Operations = No in aidlc-state.md. Proposed title 'Over mij – fotograaf in Huizen' and a 143-character description. Added 'Intro' to the LAYOUT.md diagram for consistency with the other page diagrams. User Stories proposed to be skipped (single visitor persona, concrete FRs). Presented completion message and asked for approval." + +**Context**: INCEPTION - Requirements Analysis (awaiting approval) + +--- + +## Requirements Analysis — Change Request + +**Timestamp**: 2026-10-22T21:05:00Z + +**User Input**: "SEO-OM-02 Title and description: De beschrijving mag worden: \"Hoi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Ik maak warme, spontane foto's die een verhaal vertellen: newborn-, zwangerschaps- en gezinsshoots.\" +De tweede zin di ejij had bedacht lijkt namelijk midden in een zin te beginnen." + +**AI Response**: "Updated SEO-OM-02 with the user's description (151 characters, within the ~155 guideline). Presented the completion message again." + +**Context**: INCEPTION - Requirements Analysis (change applied, awaiting approval) + +--- + +## Requirements Analysis — Approval + +**Timestamp**: 2026-10-22T21:07:49Z + +**User Input**: "ga verder" + +**AI Response**: "Requirements approved, User Stories skipped. Started Workflow Planning." + +**Context**: INCEPTION - Requirements Analysis (approved) + +--- + +## Workflow Planning + +**Timestamp**: 2026-10-22T21:15:00Z + +**User Input**: (none) + +**AI Response**: "Created inception/plans/execution-plan.md: low risk, single package. Execute Application Design (minimal), Functional Design for unit 2 only, Code Generation for two units (1 Shared blocks: PageSection rename + shared media+text block; 2 Over mij page incl. SEO, photos, LAYOUT.md), Build and Test. Skip User Stories, Units Generation, NFR Requirements, NFR Design, Infrastructure Design, Operations. Asked for approval." + +**Context**: INCEPTION - Workflow Planning (awaiting approval) + +--- + +## Workflow Planning — Approval + +**Timestamp**: 2026-10-22T21:09:36Z + +**AI Prompt**: "Ready to proceed with this plan?" + +**User Input**: "goedgekeurd, ga verder" + +**Status**: Approved + +**Context**: Workflow plan with Application Design, Functional Design (unit 2), Code Generation (2 units) and Build and Test + +--- + +## Application Design — Plan and Questions + +**Timestamp**: 2026-10-22T21:20:00Z + +**User Input**: (none) + +**AI Response**: "Created inception/plans/application-design-plan.md with recorded decisions (PageSection = renamed HomeSection plus a flush-top spacing option; SEO builders in seo.ts combined in the route head; aboutContent.ts; LinkButton accent and Link underline) and 4 questions: MediaText interface, eyebrow-style h3 headings (shared Eyebrow component), photo duo component, folder layout for page-specific components." + +**Context**: INCEPTION - Application Design (awaiting answers) + +--- + +## Application Design — Answers and Artifacts + +**Timestamp**: 2026-10-22T21:13:49Z + +**User Input**: "ik heb de vragen beantwoord" — answers in application-design-plan.md: Q1 A, Q2 A, Q3 A, Q4 A + +**AI Response**: "No ambiguities. Generated inception/application-design/ components.md, component-methods.md, services.md, component-dependency.md and application-design.md: layout-only MediaText (children), shared Eyebrow with an `as` prop replacing four identical inline labels, new PhotoDuo, page components in components/about/ (AboutIntro, StorySection, RichParagraph), PageSection rename with spacing flushTop, SEO builders in seo.ts with a business @id. RichText and structured data rules left to Functional Design (unit 2). Presented completion message." + +**Context**: INCEPTION - Application Design (awaiting approval) + +--- + +## Application Design — Approval + +**Timestamp**: 2026-10-22T21:16:03Z + +**User Input**: "continue to next stage" + +**AI Response**: "Application Design approved; Units Generation stays skipped. Started CONSTRUCTION with Code Generation for unit 1 (Shared blocks); Functional Design is skipped for this unit per the execution plan." + +**Context**: INCEPTION - Application Design (approved) → CONSTRUCTION + +--- + +## Code Generation — Unit 1 Shared blocks — Plan + +**Timestamp**: 2026-10-22T21:25:00Z + +**User Input**: (none) + +**AI Response**: "Created construction/plans/shared-blocks-code-generation-plan.md (16 steps: Eyebrow + switch of four identical labels, HomeSection → PageSection rename with flushTop, MediaText + AboutBlock switch, leftover search, pnpm check, visual check, RE doc names, code summary, local commit). Asked for plan approval." + +**Context**: CONSTRUCTION - Code Generation Unit 1 (awaiting plan approval) + +--- + +## Code Generation — Unit 1 Shared blocks — Plan Approval + +**Timestamp**: 2026-10-22T21:20:00Z + +**User Input**: "approve plan" + +**AI Response**: "Plan approved. Started Part 2 (generation)." + +**Context**: CONSTRUCTION - Code Generation Unit 1 (generation) + +--- diff --git a/aidlc-docs/features/over-mij-page/inception/application-design/application-design.md b/aidlc-docs/features/over-mij-page/inception/application-design/application-design.md new file mode 100644 index 0000000..189d839 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/application-design/application-design.md @@ -0,0 +1,68 @@ +# Application Design — Over mij Page + +Consolidated view of [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) (Q1–Q4 = A). + +## Design Decisions +| # | Decision | +|---|---| +| Q1 | `MediaText` is layout only: photo as data, text column as `children` | +| Q2 | One `Eyebrow` component (`as` prop) for every accent label; with `as="h3"` it is the story headings; `SectionHeading`, `PageIntro`, `ContactFormGate` and `TestimonialSlide` switch to it | +| Q3 | New small `PhotoDuo`; `IntroGallery` stays as it is | +| Q4 | Page-specific components in `components/about/` (`AboutIntro`, `StorySection`, `RichParagraph`); shared blocks each in their own folder under `components/` | +| — | `HomeSection` → `PageSection`, plus spacing `flushTop` | +| — | Structured data builders in `seo.ts`; route head = `pageHead` + `AboutPage` script; business gets a stable `@id` | +| — | Content in `content/aboutContent.ts` typed by `AboutPageContent`; images in `assets/about/`, preview image in `public/` | + +## Page Composition + +```mermaid +graph TD + Page["/over-mij"] --> Intro["PageIntro: eyebrow + h1 Over mij"] + Page --> A["AboutIntro: PageSection flushTop + MediaText"] + A --> AH["SectionHeading: Lifestyle fotograaf + h2 Hoi! Ik ben Andrea"] + A --> AP["RichParagraph x3 with links /portfolio and /#contact"] + Page --> B["StorySection tone alt: Eyebrow h3 Hoe het begon + text"] + Page --> D["PhotoDuo: two 3:2 photos"] + Page --> E["StorySection: Eyebrow h3 Buiten de camera om + text"] + E --> Btn["LinkButton accent: Boek je shoot to /#contact"] + classDef page fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000; + classDef block fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + classDef part fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000; + class Page page; + class Intro,A,B,D,E block; + class AH,AP,Btn part; +``` + +Text alternative: the page renders the page head with the h1, the intro block (photo next to an h2 and three paragraphs with links), the "Hoe het begon" story block on the alternate background, the photo duo, and the "Buiten de camera om" story block ending in the booking button. + +Heading outline: h1 Over mij → h2 Hoi! Ik ben Andrea → h3 Hoe het begon, h3 Buiten de camera om. + +## Components +- **New shared**: `MediaText`, `Eyebrow` (unit 1), `PhotoDuo` (unit 2) +- **Changed shared**: `PageSection` (renamed + `flushTop`), `SectionHeading`, `PageIntro`, `ContactFormGate`, `TestimonialSlide` (use `Eyebrow`), `home/AboutBlock` (uses `MediaText`) — all output-preserving +- **New page-specific**: `about/AboutIntro`, `about/StorySection`, `about/RichParagraph` +- **Changed modules**: `routes/over-mij.tsx`, `content/types.ts`, `seo.ts`, `sitePages.ts`, `lighthouserc*.cjs` +- **New modules/assets**: `content/aboutContent.ts`, `assets/about/*`, `public/og-over-mij.jpg` + +Interfaces: see [component-methods.md](component-methods.md). + +## Composition and Data Flow +Props down only, from the route; no service layer, context or fetching. The route builds the head from `seo.ts` and passes static content to presentational components (see [services.md](services.md)). + +## Dependencies and Order +See [component-dependency.md](component-dependency.md). Unit 1 builds `Eyebrow`, `PageSection` and `MediaText` and switches the existing users with unchanged output; unit 2 builds the page on top. + +## Left to Functional Design (unit 2) +- `RichText` (paragraph with inline links) and the type of link targets that may include a hash (`/#contact`) +- Fields and rules of the `Person` / `AboutPage` structured data, and the properties to test (PBT-01) + +## Extension Compliance — Application Design +| Rule | Status | Rationale | +|---|---|---| +| SECURITY-04 | Compliant | No CSP change; only self-hosted assets | +| SECURITY-10 | Compliant | No new dependencies | +| SECURITY-11 | Compliant | Structured data via the escaping `jsonLdScript`; e-mail kept out | +| SECURITY-13 | Compliant | No external resources | +| Other SECURITY rules | N/A | No data stores, endpoints, auth, infrastructure or server code | +| PBT-01 | Planned | Properties of the SEO builders identified in Functional Design (unit 2) | +| PBT-02..10 | N/A at this stage | Applied in Functional Design and Code Generation | diff --git a/aidlc-docs/features/over-mij-page/inception/application-design/component-dependency.md b/aidlc-docs/features/over-mij-page/inception/application-design/component-dependency.md new file mode 100644 index 0000000..8e34b35 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/application-design/component-dependency.md @@ -0,0 +1,67 @@ +# Component Dependencies — Over mij Page + +## Dependency Matrix + +| Component (uses →) | PageSection | MediaText | Eyebrow | SectionHeading | PhotoDuo | FramedImage | DeferredImage | Reveal | LinkButton | Link + RouterLink | +|---|---|---|---|---|---|---|---|---|---|---| +| routes/over-mij.tsx | | | | | ✓ | | | | ✓ | | +| AboutIntro | ✓ | ✓ | | ✓ | | | | | | ✓ (via RichParagraph) | +| StorySection | ✓ | | ✓ | | | | | ✓ | | | +| RichParagraph | | | | | | | | | | ✓ | +| home/AboutBlock | ✓ | ✓ | | ✓ | | | | | | ✓ | +| MediaText | | | | | | ✓ | | ✓ | | | +| PhotoDuo | | | | | | | ✓ | ✓ | | | +| SectionHeading | | | ✓ | | | | | | | | +| PageIntro | | | ✓ | | | | | | | | +| ContactFormGate, TestimonialSlide | | | ✓ | | | | | | | | +| other home sections | ✓ | | | ✓ | | | ✓ | ✓ | | | + +The route also uses `PageIntro`, the components in `components/about/`, `content/aboutContent.ts`, `content/siteContent.ts` and `seo.ts`. + +## Diagram + +```mermaid +graph TD + Route["routes/over-mij.tsx"] --> PageIntro + Route --> AboutIntro["about/AboutIntro"] + Route --> Story["about/StorySection (x2)"] + Route --> PhotoDuo + Route --> LinkButton + Route --> Content["content/aboutContent.ts"] + Route --> Seo["seo.ts + sitePages.ts"] + AboutIntro --> MediaText + AboutIntro --> SectionHeading + AboutIntro --> Rich["about/RichParagraph"] + Story --> Eyebrow + Story --> PageSection + AboutIntro --> PageSection + HomeAbout["home/AboutBlock"] --> MediaText + HomeAbout --> PageSection + MediaText --> FramedImage + FramedImage --> DeferredImage + PhotoDuo --> DeferredImage + SectionHeading --> Eyebrow + PageIntro --> Eyebrow + classDef route fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000; + 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 Route route; + class AboutIntro,Story,Rich,PhotoDuo,MediaText,Eyebrow,Content newpart; + class PageSection,HomeAbout,SectionHeading,PageIntro,Seo changed; + class FramedImage,DeferredImage,LinkButton existing; +``` + +Text alternative: the route composes PageIntro, AboutIntro, two StorySections, PhotoDuo and LinkButton from aboutContent and the SEO module; AboutIntro and the homepage AboutBlock both use MediaText and PageSection; StorySection, SectionHeading and PageIntro use the new Eyebrow; MediaText and PhotoDuo rely on FramedImage/DeferredImage (new in orange, changed in blue, existing in grey). + +## Communication Patterns +- **Props down only**: content flows from the route into components; no context, store or fetching. Components stay presentational and testable in isolation. +- **Heading ids**: each section component owns a constant title id (as on the homepage) or receives one (`StorySection` is used twice, so the route passes `titleId`), and passes it to `PageSection labelledBy`. +- **Theme coupling**: components reference tokens by name (`paper.alt`, `gridGap`, `accent.deep`, text styles); no literal colours. + +## Data Flow +`aboutContent.ts` (static data, image imports) → route → page components → shared blocks → Chakra primitives. Head data: `sitePages.ts` + `siteContent.ts` → `seo.ts` builders → route `head()` → `HeadContent` in the root route. + +## Change Order (from the dependencies) +1. Unit 1: `Eyebrow` → switch `SectionHeading`/`PageIntro`/`ContactFormGate`/`TestimonialSlide` → rename `HomeSection` → `PageSection` (+ `flushTop`) → `MediaText` → switch `AboutBlock`. Homepage output unchanged after each step. +2. Unit 2: assets → content types and data → `seo.ts`/`sitePages.ts` → `PhotoDuo`, `components/about/*` → route → Lighthouse config → LAYOUT.md. diff --git a/aidlc-docs/features/over-mij-page/inception/application-design/component-methods.md b/aidlc-docs/features/over-mij-page/inception/application-design/component-methods.md new file mode 100644 index 0000000..0e7efd0 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/application-design/component-methods.md @@ -0,0 +1,107 @@ +# Component Methods — Over mij Page + +Props are TypeScript types; components are default-exported function components, as elsewhere in `web/src/components/`. Business rules (structured data contents, inline link model) are detailed in Functional Design for unit 2. + +## Shared building blocks + +### PageSection (renamed from HomeSection) +```ts +type PageSectionProps = { + labelledBy: string; // id of the heading that names the section + id?: string; // anchor target, gets the header offset + tone?: 'paper' | 'alt'; + width?: 'default' | 'narrow' | 'full'; + spacing?: 'default' | 'tight' | 'flushTop'; // flushTop: new + 'data-testid'?: string; + children: ReactNode; +}; +``` + +### MediaText +```ts +type MediaTextProps = { + image: ContentImage; + aspectRatio: string; // crop of the photo, e.g. '4 / 3' + 'data-testid'?: string; + children: ReactNode; // the text column +}; +``` +- Renders the grid; the photo column is `FramedImage`, each column wrapped in `Reveal`. +- A `reverse` (photo on the right) option is **not** added: no page needs it yet (design `.about--reverse` is unused). + +### Eyebrow +```ts +type EyebrowProps = Omit & { + as?: 'p' | 'span' | 'h2' | 'h3' | 'h4'; // default 'p' + children: ReactNode; +}; +``` +- Applies `textStyle="eyebrow"`, `color="accent.deep"`, `mb={4}`; other `TextProps` (e.g. `id`, `mb`) pass through, so a heading can be referenced by `aria-labelledby`. +- Heading levels do not get the heading recipe's font family/size: the label style wins on purpose (FR-OM-03). + +### PhotoDuo +```ts +type PhotoDuoProps = { + photos: [ContentImage, ContentImage]; + label: string; // accessible name of the list, e.g. "Foto's" + 'data-testid'?: string; +}; +``` + +### SectionHeading, PageIntro, ContactFormGate, TestimonialSlide +- Props unchanged; internally `Eyebrow` replaces the inline `Text` label. + +## Page-specific components (`components/about/`) + +### AboutIntro +```ts +type AboutIntroProps = { content: AboutPageContent['intro'] }; +``` + +### StorySection +```ts +type StorySectionProps = { + content: AboutPageContent['story']; // one story block: title + paragraphs + titleId: string; // id of the h3, for aria-labelledby + tone?: 'paper' | 'alt'; + children?: ReactNode; // below the text, e.g. the booking button + 'data-testid'?: string; +}; +``` + +### RichParagraph +```ts +type RichParagraphProps = { paragraph: RichText }; // RichText defined in Functional Design +``` + +## Route +```ts +export const Route = createFileRoute('/over-mij')({ + head: () => aboutHead(aboutContent, siteContent), // or inline: pageHead + script + component: About, +}); +``` + +## SEO functions (`seo.ts`, pure, 100% coverage) +```ts +export const businessId: string; // e.g. `${siteUrl}/#business` +export function professionalService(content: SiteContent); // now includes '@id': businessId +export function person(content: SiteContent, image: OgImage): PersonJsonLd; +export function aboutPage(path: RoutePath, content: SiteContent): AboutPageJsonLd; +export function structuredDataScript(data: unknown): { type: 'application/ld+json'; children: string }; +``` +- `structuredDataScript` wraps the existing `jsonLdScript` so `siteHead` and the about page build the script tag the same way. +- Exact fields and the rules behind them (`sameAs`, image, no e-mail, `@id` links) are specified in Functional Design (unit 2). + +## Content types (`content/types.ts`) +```ts +export interface AboutPageContent { + head: { eyebrow: string; title: string }; + intro: { eyebrow: string; title: string; paragraphs: RichText[]; image: ContentImage }; + background: { title: string; paragraphs: string[] }; + photos: [ContentImage, ContentImage]; + personal: { title: string; paragraphs: string[] }; + booking: { label: string; to: /* route + optional hash, see Functional Design */ }; +} +``` +- `RichText` and the link target type are defined in Functional Design. diff --git a/aidlc-docs/features/over-mij-page/inception/application-design/components.md b/aidlc-docs/features/over-mij-page/inception/application-design/components.md new file mode 100644 index 0000000..8be90be --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/application-design/components.md @@ -0,0 +1,64 @@ +# Components — Over mij Page + +All paths are under `web/src/`. "Unit" refers to the execution plan (1 = Shared blocks, 2 = Over mij page). + +## Shared building blocks (`components//`) + +### PageSection — changed (unit 1) +- **Was**: `HomeSection` (renamed: folder, file, component, test, all imports). *Source: Q9 = A* +- **Purpose**: frame of a content section on any page (design `.section`): `section` element named by its heading, vertical rhythm, background tone, content column, anchor offset under the fixed header. +- **Change besides the rename**: spacing option `flushTop` — no top padding, for the first block directly under a page head (design `.section--flush-top`). Existing options and output stay identical. + +### MediaText — new (unit 1) +- **Purpose**: a photo in the sand-coloured frame next to a text column (design `.about`); stacked on phones and tablets, two equal columns from `lg`, vertically centred. Both columns fade in (`Reveal`). +- **Interface**: layout only — the photo comes in as data, the text column as `children`. *Source: Q1 = A* +- **Used by**: homepage `AboutBlock` (unit 1, no visible change) and `AboutIntro` (unit 2). +- **Reuses**: `FramedImage` (→ `DeferredImage`), `Reveal`, Chakra `Grid`. + +### Eyebrow — new (unit 1) +- **Purpose**: the small capitals label above a heading (design `.eyebrow`) in one place: text style `eyebrow`, colour `accent.deep` (meets 4.5:1), standard space below. Renders a `p` by default; with `as="h3"` (or another heading level) it is a real heading that looks like the label. *Source: Q2 = A* +- **Replaces** the four identical inline label blocks in `SectionHeading`, `PageIntro`, `ContactFormGate` and `TestimonialSlide` (same output). Labels that look different on purpose (hero on photos, footer column titles, form labels, nav links, testimonial author line) are left alone. + +### PhotoDuo — new (unit 2) +- **Purpose**: two landscape photos side by side at 3:2 (design `.intro-gallery--duo`), one below the other on phones; no stagger, no swipe row. *Source: Q3 = A* +- **Semantics**: a labelled list of figures (`ul`/`li`), each image with its own alt text. +- **Hover**: the design's `.intro-gallery figure:hover img` zoom applies to the duo too, so `PhotoDuo` zooms gently on hover like `IntroGallery`, with `_motionReduce` turning the transition off. +- **Reuses**: `DeferredImage`, `Reveal`, token `gridGap`. + +### Existing, reused unchanged +- `PageIntro` (page head with the h1) — only switches to `Eyebrow` internally. +- `SectionHeading` (eyebrow + h2 + lead) — only switches to `Eyebrow` internally. +- `FramedImage`, `DeferredImage`, `Reveal`, `LinkButton` (`accent`), `RouterLink`, Chakra `Link` (`underline` variant). + +## Page-specific components (`components/about/`, unit 2) — *Source: Q4 = A* + +### AboutIntro +- **Purpose**: the "Hoi! Ik ben Andrea" block: `PageSection` (`flushTop`) → `MediaText` with the portrait → `SectionHeading` (eyebrow "Lifestyle fotograaf", h2, `align="start"`, compact) and the paragraphs, one of which contains the links "mijn portfolio" and "neem contact op". + +### StorySection +- **Purpose**: one text block of Andrea's story, used twice ("Hoe het begon", "Buiten de camera om"): `PageSection` (narrow column, tone per use) → `Eyebrow as="h3"` → paragraphs → optional `children` below the text (the "Boek je shoot" button). + +### RichParagraph (helper inside `components/about/`, or shared if Functional Design shows a second user) +- **Purpose**: renders one paragraph of the content model in which some words are links (shape defined in Functional Design), mapping link segments to `Link variant="underline"` + `RouterLink`. + +## Route +### routes/over-mij.tsx — changed (unit 2) +- `head()`: `pageHead('/over-mij')` plus the `AboutPage` JSON-LD script. +- `component`: `PageIntro` → `AboutIntro` → `StorySection` (Hoe het begon, `paper.alt`) → `PhotoDuo` → `StorySection` (Buiten de camera om, with `LinkButton`). + +## Content and SEO modules +### content/aboutContent.ts + `AboutPageContent` in content/types.ts — new (unit 2) +- Page head texts, intro block (eyebrow, title, paragraphs, portrait), two story blocks (title, paragraphs), duo photos, booking button (label, target). + +### seo.ts — changed (unit 2) +- New pure builders for the `Person` and `AboutPage` structured data; the business (`professionalService`) gets a stable `@id`. + +### sitePages.ts — changed (unit 2) +- `/over-mij`: new title and description, `indexed: true`, `ogImage` → `/og-over-mij.jpg` (1200×630). + +### Lighthouse config — changed (unit 2) +- `lighthouserc.cjs` / `.desktop.cjs`: `/over-mij` moves from the noindex to the indexed paths. + +## Assets (unit 2) +- `assets/about/`: portrait and two duo photos (resized originals). +- `public/og-over-mij.jpg`: 1200×630 crop of the portrait. diff --git a/aidlc-docs/features/over-mij-page/inception/application-design/services.md b/aidlc-docs/features/over-mij-page/inception/application-design/services.md new file mode 100644 index 0000000..b8c14c0 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/application-design/services.md @@ -0,0 +1,38 @@ +# Services — Over mij Page + +This is a static single-page app without a back-end: there is no service layer. "Orchestration" is composition in the route, as on the homepage. + +## Route composition (`routes/over-mij.tsx`) +- **Responsibility**: load the static content, build the head, compose the page. +- **Head**: `pageHead('/over-mij')` (title, description, canonical, Open Graph incl. the page's own `ogImage`, no `noindex`) plus one `application/ld+json` script with the `AboutPage` (built by `seo.ts`). The site-wide `ProfessionalService` script still comes from the root route. +- **Body**: content objects are passed as props to presentational components; components never import content themselves. This keeps the API swap a change in the route only. + +## Content source (`content/aboutContent.ts`) +- **Responsibility**: the page's static data until the CMS API exists; same role as `homeContent.ts`. Images are imported from `assets/about/` so Vite fingerprints them. + +## SEO module (`seo.ts`, `sitePages.ts`) +- **Responsibility**: one registry for titles, descriptions, indexing and preview images (`sitePages.ts`), and pure builders for head tags and structured data (`seo.ts`). The sitemap (`config/sitemapPlugin.ts`) and Lighthouse CI config follow the registry. + +## Interaction + +```mermaid +sequenceDiagram + box rgba(99,179,237,0.4) Router + participant R as Root route + participant P as over-mij route + end + box rgba(154,230,180,0.4) Modules + participant S as seo.ts and sitePages.ts + participant C as aboutContent.ts + end + box rgba(246,224,94,0.4) Components + participant V as Page components + end + R->>S: siteHead (ProfessionalService with id) + P->>S: pageHead and aboutPage + S-->>P: meta, links, JSON-LD script + P->>C: read static content + P->>V: render PageIntro, AboutIntro, StorySection, PhotoDuo with props +``` + +Text alternative: the root route adds the site-wide business data; the Over mij route asks the SEO module for its head tags and AboutPage data, reads its static content and passes it as props to the page components. diff --git a/aidlc-docs/features/over-mij-page/inception/plans/application-design-plan.md b/aidlc-docs/features/over-mij-page/inception/plans/application-design-plan.md new file mode 100644 index 0000000..ce6a842 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/plans/application-design-plan.md @@ -0,0 +1,65 @@ +# Application Design Plan — Over mij Page + +Depth: minimal. Business rules (structured data, content model with inline links) follow in Functional Design for unit 2. + +## 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. the new SEO builders) +- [x] Generate `services.md` — composition in the route (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) + +- **`PageSection`** = `HomeSection` renamed, same props. One addition for this page: a way to drop the top padding, because the first block sits directly under the page head (design `.section--flush-top`), e.g. `spacing="flushTop"`. +- **SEO**: the structured data builders (`aboutPage(...)`, `person(...)`) are pure functions in `seo.ts`, next to `professionalService`. The route's `head()` combines `pageHead('/over-mij')` with one extra `application/ld+json` script; the business gets a stable `@id`. The page registry (`sitePages.ts`) stays limited to title, description, indexed and `ogImage`. +- **Content**: `content/aboutContent.ts` + `AboutPageContent` in `content/types.ts`, passed in from the route (same pattern as the homepage). The exact shape of a paragraph with inline links is defined in Functional Design. +- **Booking button**: the existing `LinkButton` with `variant="accent"`; links in text use `Link variant="underline"` + `RouterLink`. + +--- + +Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. + +## Vraag 1: Interface van het gedeelde blok "foto naast tekst" (`MediaText`) + +Het blok wordt gebruikt door `AboutBlock` op de homepage (eyebrow + h2 + 3 alinea's + link "Lees mijn verhaal") en door "Hoi! Ik ben Andrea" hier (eyebrow + h2 + 3 alinea's, waarvan één met twee links). + +- A) **Alleen layout**: `MediaText` krijgt de foto (`image`, `aspectRatio`) en de tekstkolom als `children`. Elk gebruik vult zelf de kop en de tekst in met `SectionHeading`, `Text` en links. Flexibel, en de inhoud blijft bij de pagina die hem kent. (aanbevolen) +- B) **Inhoud als data**: `MediaText` krijgt `{ eyebrow, title, paragraphs, image, link? }` en rendert alles zelf. Minder code per gebruik, maar inline links in een alinea en verschillen tussen de twee pagina's moeten dan via extra props. +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 2: De h3-koppen in labelstijl ("Hoe het begon", "Buiten de camera om") + +De labelstijl (klein, hoofdletters, ruime letterafstand, `accent.deep`) staat nu twee keer los uitgeschreven: in `SectionHeading` en in `PageIntro`, beide als `Text`. + +- A) **Eén `Eyebrow`-component** met een `as`-prop: standaard een gewone tekst, en met `as="h3"` een kop. `SectionHeading` en `PageIntro` gaan hem ook gebruiken, zodat de labelstijl (tekststijl + kleur + marge) op één plek staat. (aanbevolen) +- B) `SectionHeading` uitbreiden met een optie die alleen een label als kop rendert (bijvoorbeeld `level="h3"` zonder titel) +- C) Per sectie direct `` schrijven, zonder nieuwe component +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 3: De twee foto's naast elkaar + +In het ontwerp is dit een variant van de introgalerij van de homepage (`.intro-gallery--duo`): 2 kolommen, liggend 3:2, geen verspringing en geen swipe-rij op telefoons (daar onder elkaar). `IntroGallery` is nu een complete homepage-sectie, met de kop en de swipe-rij erin. + +- A) **Nieuwe kleine component `PhotoDuo`** (of algemener `PhotoGrid` met een aantal kolommen), die `DeferredImage` en de theme-tokens hergebruikt. `IntroGallery` blijft zoals hij is. Simpel, want het gedrag verschilt duidelijk. (aanbevolen) +- B) **Eén gedeelde galerijcomponent** uit `IntroGallery` halen met de varianten `staggered` (homepage) en `duo` (hier), en `IntroGallery` daarop laten draaien. Meer hergebruik, maar wel een component met varianten die zich anders gedragen (wel of geen swipe-rij, wel of geen verspringing). +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 4: Waar komen de onderdelen van deze pagina? + +De homepage-secties staan in `components/home/`. Deze pagina heeft twee tekstblokken met dezelfde opbouw ("Hoe het begon" en "Buiten de camera om": smalle kolom, h3-label, alinea's, optioneel iets eronder zoals de knop). + +- A) **`components/about/`** met de pagina-specifieke delen (bijvoorbeeld `AboutIntro` en één `StorySection` voor beide tekstblokken). Gedeelde bouwstenen (`MediaText`, `Eyebrow`, `PhotoDuo`, `PageSection`) staan elk in een eigen map direct onder `components/`. Dezelfde indeling als de homepage. (aanbevolen) +- B) Alles direct in de route `routes/over-mij.tsx` opbouwen met de gedeelde bouwstenen, zonder pagina-specifieke componenten +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A diff --git a/aidlc-docs/features/over-mij-page/inception/plans/execution-plan.md b/aidlc-docs/features/over-mij-page/inception/plans/execution-plan.md new file mode 100644 index 0000000..94e3222 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/plans/execution-plan.md @@ -0,0 +1,159 @@ +# Execution Plan — Over mij Page + +## Detailed Analysis Summary + +### Transformation Scope (Brownfield) +- **Transformation Type**: Single component (`web/`), application-level only +- **Primary Changes**: replace the `/over-mij` placeholder with the real page; rename the shared section frame (`HomeSection` → `PageSection`); extract a shared media+text block from the homepage `AboutBlock`; page-specific SEO (indexing, title/description, `AboutPage`/`Person` JSON-LD, own preview image) +- **Related Components**: `web/src/routes/over-mij.tsx`, `web/src/components/{HomeSection,home/AboutBlock,…}`, `web/src/content/`, `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 must look and behave exactly as before +- **Structural changes**: Minor — one component renamed, one shared component extracted; no architectural change +- **Data model changes**: Yes (small) — new `AboutPageContent` interface; `HomeContent['about']` may share a type with the new block +- **API changes**: No external API; internal component props change for the extracted block +- **NFR impact**: Yes — SEO (the page becomes indexed and gets structured data), accessibility (heading outline h1/h2/h3), performance (new photos; Lighthouse budget 0.9 for this page) + +### Component Relationships + +```mermaid +graph TD + Route["routes/over-mij.tsx"] --> PageIntro["PageIntro (existing)"] + Route --> PageSection["PageSection (renamed from HomeSection)"] + Route --> MediaText["MediaText (new, extracted)"] + Route --> Duo["Photo duo (new or composed)"] + Route --> LinkButton["LinkButton accent (existing)"] + Home["routes/index.tsx + components/home/*"] --> PageSection + AboutBlock["home/AboutBlock"] --> MediaText + MediaText --> FramedImage["FramedImage + DeferredImage (existing)"] + Route --> Content["content/aboutContent.ts (new)"] + Route --> Seo["seo.ts + sitePages.ts (extended)"] + Seo --> Lhci["lighthouserc*.cjs (indexed paths)"] + 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 Route,MediaText,Duo,Content newpart; + class PageSection,Home,AboutBlock,Seo,Lhci changed; + class PageIntro,LinkButton,FramedImage existing; +``` + +Text alternative: the new route composes PageIntro, the renamed PageSection, the new shared MediaText block, a photo duo and LinkButton from new content and extended SEO modules; the homepage and AboutBlock switch to PageSection and MediaText; Lighthouse config follows the SEO registry. + +- **Primary Component**: `web` (front-end SPA) +- **Shared Components**: `PageSection` (Major rename, every homepage section imports it), `MediaText` (new, used by `AboutBlock`), `seo.ts` (Minor, new functions) +- **Dependent Components**: the six homepage sections (import path change only) +- **Supporting Components**: Lighthouse CI config (Configuration-only), LAYOUT.md (documentation) + +### Risk Assessment +- **Risk Level**: Low +- **Rollback Complexity**: Easy (one branch, commits per unit) +- **Testing Complexity**: Simple — existing component and route tests guard the homepage during the refactor; new page tests and Lighthouse cover the page + +## Workflow Visualization + +```mermaid +flowchart TD + Start(["User Request"]) + + subgraph INCEPTION["🔵 INCEPTION PHASE"] + WD["Workspace Detection
COMPLETED"] + RE["Reverse Engineering
COMPLETED"] + RA["Requirements Analysis
COMPLETED"] + US["User Stories
SKIP"] + WP["Workflow Planning
IN PROGRESS"] + AD["Application Design
EXECUTE"] + UG["Units Generation
SKIP"] + end + + subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"] + FD["Functional Design
EXECUTE (unit 2)"] + NFRA["NFR Requirements
SKIP"] + NFRD["NFR Design
SKIP"] + ID["Infrastructure Design
SKIP"] + CG["Code Generation
(Planning + Generation)
EXECUTE"] + BT["Build and Test
EXECUTE"] + 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 (unit 2 only), 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 — refresh) +- [x] Requirements Analysis (COMPLETED) +- [x] User Stories (SKIPPED) + - **Rationale**: one persona (the visitor), concrete FRs with exact texts and link targets; stories would restate the requirements +- [x] Execution Plan (IN PROGRESS) +- [ ] Application Design - EXECUTE (minimal depth) + - **Rationale**: new and changed shared components need agreed boundaries and props before code: `PageSection` (rename), `MediaText` (extracted from `AboutBlock`), the h3 eyebrow-style heading (component, text style or `SectionHeading` option), the photo duo, `AboutPageContent`, and where the new SEO functions live +- [ ] Units Generation - SKIP + - **Rationale**: the split is obvious and fixed below (two units); no separate unit-of-work artifacts needed + +### 🟢 CONSTRUCTION PHASE +- [ ] Functional Design - EXECUTE for unit 2 only (minimal depth) + - **Rationale**: the structured data has rules (what goes into `Person`/`AboutPage`, `@id` linking, no e-mail, only valid socials) and PBT-01 requires its properties to be identified in design; the content model with inline links needs a definition. Unit 1 is a behaviour-preserving refactor with nothing to design beyond Application Design +- [ ] NFR Requirements - SKIP + - **Rationale**: NFRs are set at requirements level (NFR-OM-01..06) and the stack is fixed +- [ ] NFR Design - SKIP + - **Rationale**: no new NFR patterns; existing ones (DeferredImage, Reveal, theme focus ring, jsonLdScript) 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 `/` and `/over-mij` + +### 🟡 OPERATIONS PHASE +- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP + - **Rationale**: Operations Configuration = No (decided at Requirements Analysis); the existing pipeline deploys to test on merge + +## Units of Work (in order) + +| # | Unit | Scope | Requirements | +|---|---|---|---| +| 1 | **Shared blocks** | Rename `HomeSection` → `PageSection` (folder, component, test, imports); extract the shared media+text block and switch `AboutBlock` to it. No visible change on the homepage. | FR-OM-09, FR-OM-10, NFR-OM-02 | +| 2 | **Over mij page** | Photos (download, resize, alt texts) and preview image; `aboutContent.ts` + types; the page sections and photo duo; links and button; SEO (indexed, title/description, `ogImage`, `AboutPage`/`Person` JSON-LD, Lighthouse indexed paths); LAYOUT.md | FR-OM-01..08, SEO-OM-01..05, NFR-OM-01, 03..06 | + +Unit 1 goes first because unit 2 builds on its components. Each unit: one or more commits on `feature/over-mij-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**: 5 (Application Design, Functional Design for unit 2, Code Generation ×2 units, Build and Test) +- **Estimated Duration**: one to two working sessions + +## Success Criteria +- **Primary Goal**: a finished, indexed Over mij page that matches the design with the live texts +- **Key Deliverables**: `/over-mij` page; `PageSection` and the shared media+text block; `aboutContent.ts`; new SEO functions with tests; resized photos and a 1200×630 preview image; updated 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 `/over-mij`, homepage budgets unchanged); axe clean; homepage output unchanged after unit 1 +- **Integration Testing**: route tests render `/` and `/over-mij` in the shell; navigation to `/#contact` from the page lands on the contact section diff --git a/aidlc-docs/features/over-mij-page/inception/requirements/requirement-clarification-questions.md b/aidlc-docs/features/over-mij-page/inception/requirements/requirement-clarification-questions.md new file mode 100644 index 0000000..a6ac060 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/requirements/requirement-clarification-questions.md @@ -0,0 +1,24 @@ +# Verduidelijkingsvraag — Over mij-pagina + +Alle antwoorden zijn verwerkt. Bij één antwoord vroeg je me om mee te denken. + +## Kopniveau van "Hoe het begon" en "Buiten de camera om" (vraag 2) + +Je koos voor h3, met als reden dat alles onder het "Over mij"-deel valt, en dat is een h2. Op de **homepage** klopt dat: daar is "Over mij" een h2 onder de h1 van de hero. Op **deze pagina** is "Over mij" zelf de **h1** (de paginatitel in `PageIntro`). De koppenstructuur wordt dan: + +| Kies je h2 (A) | Kies je h3 (B) | +| ------------------------ | -------------------------- | +| h1 Over mij | h1 Over mij | +| · h2 Hoi! Ik ben Andrea | · h2 Hoi! Ik ben Andrea | +| · h2 Hoe het begon | · · h3 Hoe het begon | +| · h2 Buiten de camera om | · · h3 Buiten de camera om | + +Met h3 vallen "Hoe het begon" en "Buiten de camera om" onder **"Hoi! Ik ben Andrea"**, niet onder "Over mij". In het ontwerp zijn het drie losse, gelijkwaardige secties: elk een eigen `section` met een eigen achtergrond. Een screenreader noemt elke sectie bij de naam van zijn kop, en wie met de toetsen van kop naar kop springt, verwacht gelijkwaardige blokken op hetzelfde niveau. Technisch zijn beide toegestaan: axe en Lighthouse geven bij h3 geen fout, omdat er een h2 voor staat. + +Bij beide keuzes ziet de kop eruit als het kleine label uit het ontwerp. Alleen het kopniveau verschilt. + +- A) h2 in de stijl van het ontwerp: drie gelijkwaardige secties onder de h1 "Over mij" (aanbevolen) +- B) h3 in de stijl van het ontwerp: "Hoe het begon" en "Buiten de camera om" vallen onder "Hoi! Ik ben Andrea" +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: ah ja dat bedoelde ik ook. ze staan onder hoi ik ben andrea en zijn een vervolg op haar verhaal daar. dus daarom zou ik zeggen h3 wat ook het verschil in styling zou kunnen verklaren. als we h2 doen denk ik dat de styling hetzelfde als de andere h2's moet worden diff --git a/aidlc-docs/features/over-mij-page/inception/requirements/requirement-verification-questions.md b/aidlc-docs/features/over-mij-page/inception/requirements/requirement-verification-questions.md new file mode 100644 index 0000000..66c56bf --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/requirements/requirement-verification-questions.md @@ -0,0 +1,183 @@ +# Verificatievragen — Over mij-pagina + +Al vastgelegd (geen vraag nodig): + +- **Route** `/over-mij` bestaat al als placeholder ([over-mij.tsx](../../../../../web/src/routes/over-mij.tsx)) en wordt de echte pagina. De navigatie, de footer en de link "Lees mijn verhaal" op de homepage verwijzen er al naar. +- **Layout en stijl** komen uit het ontwerp ([over-mij.html](../../../../../design/andreaslop-static/over-mij.html)). Teksten en foto's komen als vaste data in `web/src/content/`, in de vorm die de API straks levert (zoals bij de homepage). +- **Hergebruik eerst**: `PageIntro` (h1), `HomeSection`, `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal`, `LinkButton` (variant `accent`), de `underline`-variant van `Link`, plus de theme-tokens (`paper.alt`, `contentNarrow`, `sectionY`, `gridGap`, tekststijlen). Geen hardgecodeerde kleuren, geen CSS-bestanden en geen nieuwe dependencies. +- **Toegankelijkheid**: dezelfde lat als bij de homepage (NFR-HP-01): één h1, secties met een toegankelijke naam, contrast ≥ 4.5:1, `prefers-reduced-motion`, axe in de tests en Lighthouse accessibility 1.0. +- **Codecommentaar** in het Engels in nieuwe code; teksten voor bezoekers blijven Nederlands (afspraak uit homepage-sections). + +Wat ik op de live site (andreaslop.nl/over-mij) zag en wat afwijkt van het ontwerp: + +| Onderdeel | Ontwerp | Live site | +| ----------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Kop van het eerste blok | eyebrow "Lifestyle fotograaf" + h2 **"Hoi! Ik ben Andrea"** | alleen "Lifestyle Fotograaf" (h3) | +| Eerste alinea | "…liefde voor het vastleggen van momenten." | zelfde, plus **"Momenten die je voor altijd bewaart."** | +| Achtergrond | eyebrow **"Hoe het begon"** + de tekst over de studie | geen kop; de tekst eindigt met **"Het was even een zoektocht maar uiteindelijk heb ik mijn specialisatie gevonden. Je kunt bij mij terecht voor newbornshoots, zwangerschapsshoots en gezinsshoots."** | +| Persoonlijk | eyebrow **"Buiten de camera om"**; "…tekenen, schilderen of lezen **(vaak met een kat naast me)**." | geen kop; "…tekenen, schilderen of lezen." | +| Afsluiting | knop **"Boek je shoot"** | geen knop | +| Foto's | portret + 2 foto's, alt-teksten "Portret van Andrea Slop" en twee keer "Werk van Andrea Slop" | dezelfde foto's, **zonder alt-teksten** | + +Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. + +--- + +## Vraag 1: Bron voor de teksten + +Welke teksten komen op de pagina als ontwerp en live site verschillen? + +- A) De opbouw van het ontwerp (eyebrows, de kop "Hoi! Ik ben Andrea", de knop) met de **volledige live teksten** erin: de extra zin in de eerste alinea en de zin over de specialisatie erbij. "(vaak met een kat naast me)" uit het ontwerp blijft ook staan. (aanbevolen) +- B) Zelfde als A, maar zonder "(vaak met een kat naast me)" (precies de live tekst) +- C) Alles precies zoals in het ontwerp +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: B + +## Vraag 2: Koppen van "Hoe het begon" en "Buiten de camera om" + +In het ontwerp zijn dit kleine labels (eyebrows) zonder kopelement. Voor screenreaders en zoekmachines is een pagina met echte tussenkoppen beter te scannen. + +- A) Echte h2-koppen die er precies uitzien als het label uit het ontwerp (tekststijl `eyebrow`). Visueel verandert er niets; de structuur wordt beter. (aanbevolen) +- B) Echte h2-koppen in de grote koptekststijl (`sectionTitle`), zoals op de homepage. Dat wijkt visueel af van het ontwerp. +- C) Gewone labels zonder kopelement, letterlijk zoals in het ontwerp +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: X, Net als A, maar dan met h3. Het valt uiteindelijk allemaal onder het "Over mij" deel wat een H2 is. Dus ik denk dat h3 dan logischer is. in de stijl van het design. Als jij wat anders denkt laat me dat dan weten. Misschien mis ik iets. + +## Vraag 3: Links "mijn portfolio" en "neem contact op" + +`/portfolio` en `/contact` zijn nu nog placeholders ("in de maak", noindex). Het werkende contactblok staat op de homepage (`/#contact`). + +- A) Link naar `/portfolio` en `/contact`. Die pagina's worden later echt, en dan klopt de link vanzelf. (aanbevolen) +- B) "neem contact op" linkt voorlopig naar `/#contact` op de homepage, "mijn portfolio" naar `/portfolio`. Later omzetten naar `/contact`. +- C) Voorlopig geen links: platte tekst tot die pagina's bestaan +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: B + +## Vraag 4: Knop "Boek je shoot" + +Waar gaat de knop onderaan de pagina naartoe? + +- A) Naar dezelfde plek als "neem contact op" uit vraag 3, zodat beide contactlinks overeenkomen (aanbevolen) +- B) Altijd naar `/#contact` op de homepage (het contactblok met de "binnenkort"-melding en de mailto-link) +- C) Knop weglaten, net als op de live site +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 5: Indexeren door zoekmachines + +`/over-mij` staat nu op `noindex` en ontbreekt in `sitemap.xml`. + +- A) Bij het mergen van deze feature op **geïndexeerd** zetten: geen `noindex` meer, opnemen in de sitemap, in Lighthouse CI als geïndexeerde pagina controleren. (aanbevolen: de pagina is dan af) +- B) Voorlopig op `noindex` laten tot alle pagina's klaar zijn en de site live gaat +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 6: Titel en beschrijving (SEO) + +De huidige titel is "Over mij | Andrea Slop Fotografie" en de beschrijving: "Hi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Ik leg jullie vast zoals jullie zijn: spontaan en natuurlijk, zonder ongemakkelijke poses." + +- A) Titel met zoekwoorden, bijvoorbeeld "Over mij – lifestyle fotograaf in Huizen", en een beschrijving die aansluit op de tekst van deze pagina (warm en spontaan; newborn-, zwangerschaps- en gezinsshoots). 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]: A + +## Vraag 7: Gestructureerde data (JSON-LD) + +De site geeft nu op elke pagina een `ProfessionalService` (het bedrijf) mee. Zoekmachines kunnen een over-mijpagina beter begrijpen met extra gegevens. + +- A) Op deze pagina een `AboutPage` toevoegen met een `Person` (Andrea Slop, fotograaf, Huizen, met de social-links), gekoppeld aan de bestaande `ProfessionalService`. Zonder e-mailadres, net als nu. (aanbevolen) +- B) Alleen de bestaande `ProfessionalService`, niets extra +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 8: Preview-afbeelding bij delen (Open Graph) + +Bij het delen via WhatsApp of Facebook verschijnt nu de standaardafbeelding van de site (heide op een arm). + +- A) Een eigen preview voor deze pagina: het portret van Andrea, 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 9: Naam van het sectieframe `HomeSection` + +`HomeSection` (achtergrond, verticale ritmiek, contentkolom, `aria-labelledby`) is precies wat deze pagina, en straks ook Portfolio, Soorten fotoshoots en Contact, nodig heeft. Alleen de naam verwijst naar de homepage. + +- A) Hernoemen naar `PageSection` (map, component, test en alle imports op de homepage), zonder gedragswijziging. Daarna gebruiken alle pagina's hetzelfde frame. (aanbevolen) +- B) De naam laten staan en `HomeSection` gewoon ook op deze pagina gebruiken +- C) Een aparte, nieuwe component voor gewone pagina's +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 10: Gedeeld blok "foto naast tekst" + +Het eerste blok van deze pagina (portret met het zandkleurige kader naast eyebrow, kop en tekst) is dezelfde opbouw als het blok Over mij op de homepage (`AboutBlock`). In het ontwerp is het allebei `.about`. + +- A) Eén gedeelde component maken (bijvoorbeeld `MediaText`: foto met kader naast een tekstkolom, stapelt op telefoon en tablet) en die zowel in `AboutBlock` als op deze pagina gebruiken. Zo staat de layout op één plek. (aanbevolen) +- B) Alleen de bestaande kleine bouwstenen hergebruiken (`FramedImage`, `SectionHeading`, `Reveal`) en de grid op deze pagina apart opbouwen +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 11: Foto's en alt-teksten + +De live foto's hebben geen alt-teksten, en die in het ontwerp ("Werk van Andrea Slop") beschrijven niet wat er te zien is. + +- A) De originele foto's van andreaslop.nl downloaden, eenmalig verkleinen en comprimeren (zoals bij de homepage) en per foto een beschrijvende Nederlandse alt-tekst schrijven die Andrea later kan nalezen (aanbevolen) +- B) De foto's uit het ontwerp gebruiken (`assets/img`) met beschrijvende alt-teksten +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 12: LAYOUT.md + +In [LAYOUT.md](../../../../../LAYOUT.md) heeft "About me" nu drie blokken: About Me, Background en Personal. Het ontwerp heeft ook de twee foto's tussen Background en Personal, en de knop onderaan. + +- A) LAYOUT.md bijwerken naar het ontwerp: About Me → Background → Photos → Personal (de knop hoort bij Personal), volgens [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md) (aanbevolen) +- B) LAYOUT.md laten zoals het is +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +--- + +## Vraag: Beveiligingsextensies + +Moeten de beveiligingsregels als harde vereisten worden afgedwongen voor dit project? + +- 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: Property-Based Testing Extensie + +Moeten de property-based testing (PBT) regels worden afgedwongen voor dit project? + +- 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: Operations-fase + +Moet deze feature na Construction door de Operations-fase (deployment en monitoring inrichten)? Deployment naar test en productie en de monitoring (Sentry, Umami, UptimeRobot) bestaan al. + +- A) Ja — na Construction de Operations-fase doorlopen (deployment + monitoring inrichten) +- B) Nee — stoppen na Build and Test (deployment en monitoring vallen buiten deze feature) +- C) Weet ik nog niet — vraag het opnieuw na de Construction-fase +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: B diff --git a/aidlc-docs/features/over-mij-page/inception/requirements/requirements.md b/aidlc-docs/features/over-mij-page/inception/requirements/requirements.md new file mode 100644 index 0000000..c82730e --- /dev/null +++ b/aidlc-docs/features/over-mij-page/inception/requirements/requirements.md @@ -0,0 +1,186 @@ +# Requirements — Over mij Page + +## Intent Analysis +- **User Request**: add the "Over mij" page to the front end with AI-DLC, paying attention to SEO, accessibility and reuse of code and styling (Chakra UI, theme). +- **Request Type**: New Feature (replaces the `/over-mij` placeholder with the real page) with a small supporting refactor (shared section frame and media+text block) +- **Scope Estimate**: Multiple components within one package (`web/`), plus [LAYOUT.md](../../../../../LAYOUT.md) +- **Complexity Estimate**: Simple to moderate — one presentational page, two refactors of existing shared components, SEO additions (indexing, page-specific structured data and preview image), image preparation +- **Requirements Depth**: Standard + +## Source of Truth +- **Layout and styling**: [design/andreaslop-static/over-mij.html](../../../../../design/andreaslop-static/over-mij.html) and `assets/css/style.css` (`.page-head`, `.about`, `.section--alt`, `.container--narrow`, `.intro-gallery--duo`, `.btn--accent`). +- **Texts**: the live page https://andreaslop.nl/over-mij/ as of 2026-10-22, placed in the design's structure (eyebrows, heading, button). *Source: Q1 = B* +- **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) → **About me** → **Background** → **Photos** → **Personal** (with booking button) → shell footer. + +## Out of Scope +- The `/portfolio` and `/contact` pages (stay placeholders; linked from this page). +- A responsive image pipeline (srcset/WebP) — unchanged from homepage-sections. +- Rewriting existing Dutch code comments. +- Operations phase. *Source: Operations = B* + +--- + +## Functional Requirements + +### FR-OM-01 Intro (page head) +- Eyebrow **"Andrea Slop Fotografie"** and the page's only h1 **"Over mij"**, via the existing `PageIntro` without intro text (design `.page-head`). + +### FR-OM-02 About me +- Portrait of Andrea (live photo `WhatsApp-Image-2024-10-27-at-14.31.41.jpeg`, design `andrea-portret.jpg`) in the sand-coloured frame, next to the text column; stacked on phones and tablets (design `.about`, same breakpoint as the homepage block). +- Eyebrow **"Lifestyle fotograaf"**, heading **"Hoi! Ik ben Andrea"** (h2, `sectionTitle` style), and the live paragraphs: + 1. "Hoi! Ik ben Andrea, een fotograaf met liefde voor het vastleggen van momenten. Momenten die je voor altijd bewaart." + 2. "Mijn stijl is te omschrijven als warm en spontaan. Ik houd van natuurlijke, ongedwongen foto's die een verhaal vertellen." + 3. "Nieuwsgierig naar mijn werk? Bekijk **mijn portfolio** of **neem contact op** voor een fotoshoot!" +- "mijn portfolio" links to `/portfolio`; "neem contact op" links to **`/#contact`** (the homepage contact section) for now, to become `/contact` once that page exists. Both use the `underline` link variant. *Source: Q3 = B* +- Background `paper` with the section directly below the page head (design `.section--flush-top`). + +### FR-OM-03 Background ("Hoe het begon") +- **h3 "Hoe het begon"** styled as the design's eyebrow label. *Source: Q2 = X, clarification answer — the two story sections continue Andrea's story under "Hoi! Ik ben Andrea", and the smaller style matches the lower level* +- The live text, in the narrow content column on the `paper.alt` background: "Tijdens de studie Communicatie & Media Design … Ik was helemaal in mijn element. Het was even een zoektocht maar uiteindelijk heb ik mijn specialisatie gevonden. Je kunt bij mij terecht voor newbornshoots, zwangerschapsshoots en gezinsshoots." *Source: Q1 = B* + +### FR-OM-04 Photos +- Two photos side by side at a 3:2 crop (design `.intro-gallery--duo`), one below the other on phones; live photos `slide-1.jpg` and `IMG_1718.jpg`. +- Decorative or informative is decided per photo when the alt texts are written (FR-OM-07); both are expected to be informative. + +### FR-OM-05 Personal ("Buiten de camera om") +- **h3 "Buiten de camera om"** styled as the eyebrow label (same rule as FR-OM-03). +- The live text, without the design's "(vaak met een kat naast me)": "Mijn camera gaat altijd mee op reis. Het liefst ga ik naar een plek met een mooie zee maar ik ga ook graag op pad om de natuur vast te leggen met mijn camera." / "Wanneer ik niet achter de camera sta ben ik bezig met tekenen, schilderen of lezen." *Source: Q1 = B* +- Button **"Boek je shoot"** (`LinkButton`, variant `accent`) to the same target as "neem contact op": `/#contact`. *Source: Q4 = A* +- Navigating to `/#contact` from this page lands on the homepage contact section below the fixed header, as the price card links already do. + +### FR-OM-06 Scroll reveal +- Blocks fade in as on the homepage (existing `Reveal`), respecting `prefers-reduced-motion`; content is always in the DOM. + +### FR-OM-07 Content and images +- All page content lives as API-shaped static data in `web/src/content/` (a new `aboutContent.ts` with an `AboutPageContent` interface in `content/types.ts`), passed into the components from the route. +- Photos are downloaded from andreaslop.nl in their original size, resized once to at most ±1600 px wide, compressed and stored in `web/src/assets/` — same approach as homepage-sections, no new dependency. *Source: Q11 = A* +- Every photo gets a descriptive Dutch alt text, written after looking at the photo, for Andrea to review. + +### FR-OM-08 LAYOUT.md +- Update the "About me" diagram to the page structure above — **Intro → About Me → Background → Photos → Personal** — following [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md). "Intro" is added for consistency with the other page diagrams (Types of shoots, Contact), which start with their page head. *Source: Q12 = A* + +### FR-OM-09 Shared section frame: `HomeSection` → `PageSection` +- Rename `HomeSection` to `PageSection` (folder, component, test, every import on the homepage) without changing its behaviour, and use it on this page. *Source: Q9 = A* + +### FR-OM-10 Shared media+text block +- Extract the photo-in-frame next to a text column (design `.about`) into one shared component (working name `MediaText`), used by both the homepage `AboutBlock` and FR-OM-02. The homepage must look and behave exactly as before. *Source: Q10 = A* + +--- + +## SEO Requirements + +### SEO-OM-01 Indexing +- `/over-mij` becomes **indexed** when this feature merges: `indexed: true` in `sitePages.ts` (no `robots noindex`, included in `sitemap.xml`), and moved to the indexed paths in `web/lighthouserc.cjs` / `.desktop.cjs` (the existing sync test must pass). *Source: Q5 = A* + +### SEO-OM-02 Title and description +- Title: **"Over mij – fotograaf in Huizen"** → rendered as "Over mij – fotograaf in Huizen | Andrea Slop Fotografie" (55 characters, within the ~60 guideline). +- Description: **"Hoi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Ik maak warme, spontane foto's die een verhaal vertellen: newborn-, zwangerschaps- en gezinsshoots."** (151 characters, within the ~155 guideline). +- *Source: Q6 = A; description wording changed by the user at Requirements review (the second sentence now has a subject)* + +### SEO-OM-03 Structured data +- On this page, add an `AboutPage` JSON-LD whose `mainEntity` is a `Person` (Andrea Slop; job title lifestyle fotograaf; locality Huizen, NL; `sameAs` the visible social links; `image` the page preview image), linked to the existing `ProfessionalService` by `@id` (the business gets a stable `@id`, e.g. `https://andreaslop.nl/#business`). +- No e-mail address in the structured data (same rule as today). Escaped through the existing `jsonLdScript`. +- Built by pure functions in `seo.ts` (100% coverage threshold applies). *Source: Q7 = A* + +### SEO-OM-04 Preview image (Open Graph) +- A page-specific preview image: the portrait cropped to **1200×630**, stored in `web/public/` (stable URL, outside the bundle), set as the page's `ogImage` in `sitePages.ts` with its own alt text. *Source: Q8 = A* + +### SEO-OM-05 Semantic structure +- One h1; `section` landmarks named by their heading; a heading outline that matches the content (h1 Over mij → h2 Hoi! Ik ben Andrea → h3 Hoe het begon, h3 Buiten de camera om); descriptive link texts; images with width/height. + +--- + +## Non-Functional Requirements + +### NFR-OM-01 Accessibility (WCAG 2.1 AA as guideline) +- Heading outline as in SEO-OM-05; no skipped levels. +- Each content block is a `section` with an accessible name (`aria-labelledby` its h2/h3). The photos block is not a landmark of its own unless it has a name (it has no heading in the design). +- Text contrast ≥ 4.5:1: `accent.deep` for eyebrow-styled text (incl. the h3 labels), `ink.soft` for running text. +- Descriptive alt texts (FR-OM-07); links distinguishable and keyboard reachable with the theme focus ring; touch targets ≥ 44×44 px for the button. +- `prefers-reduced-motion` respected (reveal). +- Axe checks in the component and route tests; Lighthouse accessibility 1.0 for `/over-mij` (mobile and desktop). + +### NFR-OM-02 Styling and reuse +- Reuse before building: `PageIntro`, `PageSection` (renamed), `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal`, `LinkButton` (`accent`), `Link` (`underline`), `RouterLink`, and theme tokens/text styles (`paper.alt`, `contentNarrow`, `sectionY`, `gridGap`, `eyebrow`, `sectionTitle`, `pageTitle`). +- If the h3 eyebrow heading or the photo duo needs styling that another page will need too, it goes into a shared component, text style or recipe, not inline per page. +- No hard-coded colours, CSS files or Tailwind; Chakra primitives where they fit. +- Components in their own folders under `components/`, Prettier style; code comments in English in new code (including new comments in existing files); visitor-facing texts in Dutch. +- Responsive from 320 px to ultrawide, mobile-first, no horizontal scroll, works at 200% zoom. + +### NFR-OM-03 Testing +- **Example-based**: page content and structure (heading outline, section names, links and their targets, button target), the renamed `PageSection`, the shared media+text block, the homepage `AboutBlock` unchanged in output, head tags (title, description, no `noindex`, canonical, `og:image`), axe checks. +- **Property-based** (fast-check, existing arbitraries) for the new pure SEO functions, e.g. the structured data never contains an e-mail address, `sameAs` only contains valid https social links, the script output always stays escaped. *Source: PBT extension = A (full)* +- `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse) passes. + +### NFR-OM-04 Security (Security Baseline extension enabled) +- No new third parties: no external scripts, fonts, embeds or endpoints; CSP in `web/config/securityHeaders.ts` unchanged. +- No e-mail address in markup, bundle, content or structured data. +- Structured data goes through `jsonLdScript` (escapes `<`, `>`, `&`). +- No new runtime dependencies; image processing is a one-off local step, not a build dependency. + +### NFR-OM-05 Performance +- All page photos except possibly the portrait are below the fold and use `DeferredImage` with intrinsic width/height (no layout shift). Whether the portrait is above the fold at common viewport sizes is decided in design; if it is the largest contentful paint it must not be deferred. +- Lighthouse performance for `/over-mij`: ≥ 0.9 on mobile and desktop (the default budget for pages other than the homepage). +- No new network requests other than the bundled images. + +### NFR-OM-06 Content for the future API +- `AboutPageContent` is plain data (strings, arrays, `ContentImage`, link targets typed as routes or route-plus-hash) so the API can deliver it 1-to-1; rich text with links is modelled without HTML strings. + +--- + +## Extension Compliance — Requirements Level + +### Security Baseline +| Rule | Status | Rationale | +|---|---|---| +| SECURITY-01 Encryption | N/A | No data stores | +| 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-OM-04) | +| SECURITY-05 Input validation | N/A | No input or API endpoint on this page | +| 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 | +| SECURITY-10 Supply chain | Compliant | No new dependencies | +| SECURITY-11 Secure design | Compliant | Structured data escaped; e-mail kept out of the page | +| 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 | Existing global error handling and error page | + +### Property-Based Testing +| Rule | Status | Rationale | +|---|---|---| +| PBT-01 Property identification | Planned | Properties of the new SEO functions identified in design | +| PBT-02 Round-trip | Planned | `jsonLdScript` output parses back to the same data (if not already covered) | +| PBT-03 Invariants | Planned | No e-mail in structured data; `sameAs` ⊆ valid https socials | +| PBT-04 Idempotency | N/A | No idempotent operations added | +| PBT-05 Oracle | N/A | No reference implementation | +| PBT-06 Stateful | N/A | No stateful logic added | +| 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 | Design structure with the exact live texts (no cat remark) | +| Q2 | "Hoe het begon" and "Buiten de camera om" are h3, styled as eyebrow labels, under h2 "Hoi! Ik ben Andrea" | +| Q3 | "mijn portfolio" → `/portfolio`; "neem contact op" → `/#contact` for now | +| Q4 | "Boek je shoot" → same target as "neem contact op" (`/#contact`) | +| Q5 | Indexed on merge (sitemap, no noindex, Lighthouse indexed list) | +| Q6 | New title and description (proposed above) | +| Q7 | `AboutPage` + `Person` JSON-LD linked to the business | +| Q8 | Own 1200×630 preview image from the portrait | +| Q9 | `HomeSection` renamed to `PageSection` | +| Q10 | Shared media+text block for this page and the homepage `AboutBlock` | +| Q11 | Original live photos, resized once, descriptive alt texts | +| Q12 | LAYOUT.md updated (Intro → About Me → Background → Photos → Personal) | +| Ext. | Security Baseline: Yes · PBT: Yes (full) · Operations: No |