Adds the inception docs and design for the homepage sections

Refreshes the shared reverse engineering docs, adds the requirements,
application design and units for the homepage-sections feature, and
updates the static design: live prices and form fields, the new
Lieve woorden block and the coming-soon gate over the contact form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 23:46:30 +02:00
co-authored by Claude Opus 5.5
parent 38c5c3e262
commit c81dcd3979
33 changed files with 2354 additions and 275 deletions
@@ -1,42 +1,67 @@
# API Documentation
## REST APIs
None. The project has no back-end yet. The static design README anticipates these future endpoints on a .NET API:
- `POST /api/contact` — contact form, payload `{ naam, email, onderwerp, bericht }`
None. There is no back-end yet (`api/` is empty). The static design README anticipates these endpoints on a .NET API:
- `POST /api/contact` — contact form, payload `{ naam, email, onderwerp, bericht }` (maps to a C# `ContactRequest` record)
- `/api/pages`, `/api/portfolio`, `/api/packages` — CMS content
## Internal APIs
### Routes (TanStack Router, file-based)
| Path | File | Head | Component |
|------|------|------|-----------|
| (root) | `routes/__root.tsx` | `siteHead` | `AppShell` via `RootLayout` |
| `/` | `routes/index.tsx` | `pageHead(...)` | `Hero` |
| `/over-mij` | `routes/over-mij.tsx` | `pageHead(...)` | placeholder |
| Path | File | Head | Component | Indexed |
|------|------|------|-----------|---------|
| (root) | `routes/__root.tsx` | `siteHead(siteContent)` | `AppShell` | — |
| `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` | 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 |
| `/contact` | `routes/contact.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
| `/privacyverklaring` | `routes/privacyverklaring.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
| (not found) | — | — | `NotFound` | — |
### seo.ts
- **Methods**: `pageHead({ title: string, description: string })` → `{ meta: [...] }`; `siteHead` constant
- **Return Types**: TanStack Router `head` option object (title, description, og:title, og:description)
### seo.ts / sitePages.ts / sitemap.ts
- `pageHead(path: RoutePath)` → `{ meta, links }` (title, description, robots noindex if not indexed, OG tags, canonical)
- `siteHead(content: SiteContent)` → `{ meta, scripts }` (OG basics, JSON-LD ProfessionalService)
- `canonicalUrl(path, base?)`, `jsonLdScript(data)`, `professionalService(content)`
- `sitePages: Record<RoutePath, PageMeta>`, `pageList(pages)`
- `sitemapXml(...)` — used by `config/sitemapPlugin.ts`
### Components (props)
- `AppShell()` — no props
- `NavigationBar()` — no props; reads route via `useRouterState`, scroll via `useScrolledPast`
- `NavLink(props: ComponentProps<ChakraLink>)`
- `MobileNav({ id: string, open: boolean, onClose: () => void })`
- `Footer()` — no props
- `LinkButton(props: ChakraLink props & { variant?: 'outline' | 'accent' | 'light' })`
- `Hero({ content: HeroContent })`, `HeroArrows({ onPrev, onNext })`, `HeroSocials({ socials: HeroSocial[] })`
- `AppShell()`, `NavigationBar()`, `BackToTop()`, `NotFound()` — no props
- `MobileNav({ id, open, onClose })`, `NavLink(RouterLink props)`
- `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
- `StatusPage({ title, children, actions? })`, `ErrorPage({ error, reset })`
- `LinkButton(RouterLink props & { variant?: 'outline' | 'accent' | 'light' })`
- `UmamiAnalytics({ hostname? })`
### Hooks
- `useScrolledPast(getThreshold: () => number): boolean` — `getThreshold` must be referentially stable (it is an effect dependency)
- `useHeroSlider(count: number)` → `{ active, reducedMotion, autoplay, paused, next, prev, handlers }`
- `useHeroSlider(count)` → slider state, controls, handlers, `HeroAnnouncement`
- `useScrolledPast(getThreshold)` → boolean (stable `getThreshold` required)
- `useRouteFocus()` — focuses `<main>` after navigation
### Pure helpers (`lib/`)
- `emailAddress({ user, domain }): string | null`
- `visibleSocials(socials): SocialLink[]` — only valid https links
- `copyrightLine(year): string`
- `slidesToLoad(active, count): number[]`
- `backToTopThreshold(viewportHeight): number`
### Monitoring
- `monitoringFor(hostname): Monitoring | null`, `startSentry(hostname?)`, `reportError(error)`
## Data Models
### NavItem (`navItems.ts`)
- **Fields**: `to` (route path), `label` (Dutch menu label)
- **Validation**: `as const` — `to` must be a registered route for type-safe `Link`
### HeroContent (`Hero/types.ts`)
- **Fields**: `title`, `tagline`, `cta: { label, to }`, `slides: { id, src, alt }[]`, `socials: { platform, href }[]`
- **Relationships**: `HeroSocial.platform` is a `SocialPlatform` key from `socialPlatforms.ts`
- **Validation**: empty `href` → social not shown
### SiteContent (`content/types.ts`)
- **Fields**: `footerIntro: string`, `socials: SocialLink[]`, `email: EmailAddress`
### SocialLink
- **Fields**: `platform: SocialPlatform` (`facebook` | `instagram`), `href: string`
- **Validation**: shown only if `href` is a valid https URL
### EmailAddress
- **Fields**: `user`, `domain` — assembled only in the browser; invalid parts → hidden
### HeroContent
- **Fields**: `title`, `tagline`, `cta: { label, to }`, `slides: { id, src, alt }[]`
### NavItem (`navigation.ts`)
- **Fields**: `to: RoutePath`, `label: string`
### PageMeta (`sitePages.ts`)
- **Fields**: `title`, `description`, `indexed`, `ogImage?`