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,12 +1,15 @@
# Code Structure
## Build System
- **Type**: npm-compatible via **pnpm** (lockfile `web/pnpm-lock.yaml`)
- **Type**: pnpm (`packageManager: pnpm@12.11.2`, lockfile `web/pnpm-lock.yaml`)
- **Configuration**:
- `web/package.json` — scripts `dev` (vite), `build` (`tsc && vite build`), `preview`, `typegen` (Chakra typegen for theme)
- `web/vite.config.js` — TanStack Router plugin (`autoCodeSplitting`) before `@vitejs/plugin-react`; `resolve.tsconfigPaths`
- `web/tsconfig.json` — strict-ish bundler mode, `@/*` → `src/*` alias, `noUnusedLocals/Parameters`, `erasableSyntaxOnly`
- `web/package.json` — scripts `dev`, `build` (`tsc && vite build`), `preview`, `test` (vitest + coverage), `lint`, `format:check`, `audit:deps`, `audit:dev`, `lighthouse`, `server-config`, and `check` (all of them in sequence)
- `web/vite.config.ts` — TanStack Router plugin (`autoCodeSplitting`) before React plugin, sitemap plugin, security headers on dev/preview, Vitest config (jsdom, 20 s timeout, 100% coverage threshold for `src/lib/**`, `seo.ts`, `sitemap.ts`)
- `web/tsconfig.json` — bundler mode, `@/*` → `src/*`
- `web/eslint.config.js` — JS + typescript-eslint + react-hooks + jsx-a11y recommended
- `web/.prettierrc` — 4 spaces, single quotes, semicolons
- `web/lighthouserc.cjs` / `.desktop.cjs` — Lighthouse CI against `pnpm preview` (accessibility and best practices 1.0, performance 0.9; home mobile 0.8)
- `.gitea/workflows/continuous_integration.yaml` — jobs `check`, `deploy-test`, `lighthouse`, `deploy-production`
## Key Classes/Modules
@@ -14,80 +17,97 @@
graph TD
Root["routes/__root.tsx"] --> AppShell["components/AppShell.tsx"]
AppShell --> NavigationBar["NavigationBar/NavigationBar.tsx"]
AppShell --> Footer["components/Footer.tsx"]
AppShell --> Footer["Footer/Footer.tsx"]
AppShell --> BackToTop["BackToTop/BackToTop.tsx"]
AppShell --> Umami["Analytics/UmamiAnalytics.tsx"]
NavigationBar --> NavLink["NavigationBar/NavLink.tsx"]
NavigationBar --> MobileNav["NavigationBar/MobileNav.tsx"]
NavigationBar --> navItems["NavigationBar/navItems.ts"]
MobileNav --> navItems
NavigationBar --> useScrolledPast["hooks/useScrolledPast.tsx"]
NavigationBar --> navigation["navigation.ts"]
Footer --> navigation
Index["routes/index.tsx"] --> Hero["Hero/Hero.tsx"]
Hero --> HeroArrows["Hero/HeroArrows.tsx"]
Hero --> HeroPause["Hero/HeroPauseButton.tsx"]
Hero --> HeroSocials["Hero/HeroSocials.tsx"]
Hero --> useHeroSlider["Hero/useHeroSlider.ts"]
Hero --> LinkButton["components/LinkButton.tsx"]
HeroSocials --> socialPlatforms["Hero/socialPlatforms.ts"]
LinkButton --> RouterLink["components/RouterLink.tsx"]
Placeholder["routes/contact.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,NavLink,MobileNav shell;
class Index,Hero,HeroArrows,HeroSocials page;
class navItems,useScrolledPast,useHeroSlider,LinkButton,socialPlatforms util;
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;
```
Text alternative: the root route renders AppShell (NavigationBar with NavLink/MobileNav/navItems, plus Footer); the index route renders Hero with its arrows, socials, slider hook and the shared LinkButton.
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.
### Existing Files Inventory
- `web/index.html` — HTML entry; static fallback title/meta for non-JS crawlers (`data-fallback`)
- `web/src/main.tsx` — bootstrap: providers, router, fonts, removes fallback head tags
- `web/src/routeTree.gen.ts` — generated by TanStack Router plugin (do not edit)
- `web/src/routes/__root.tsx` — root layout route, site-wide head
- `web/src/routes/index.tsx` — home page (`/`), renders Hero
- `web/src/routes/over-mij.tsx` — about page (`/over-mij`), placeholder content
- `web/src/components/AppShell.tsx` — shell: NavigationBar + Outlet + Footer
- `web/src/components/Footer.tsx` — placeholder footer
- `web/src/components/LinkButton.tsx` — router `Link` styled with `linkButton` recipe
- `web/src/components/NavigationBar/NavigationBar.tsx` — header, logo, desktop nav, hamburger
- `web/src/components/NavigationBar/NavLink.tsx` — desktop nav link with underline animation
- `web/src/components/NavigationBar/MobileNav.tsx` — full-screen mobile menu
- `web/src/components/NavigationBar/navItems.ts` — menu items (Home, Over mij)
- `web/src/components/Hero/*` — hero slider (component, arrows, socials, hook, content, types, platforms)
- `web/src/hooks/useScrolledPast.tsx` — boolean "scrolled past threshold" hook
- `web/src/recipes/linkButton.ts` — Chakra recipe for the square design button
- `web/src/theme.ts` — Chakra system config (tokens, semantic tokens, text styles, recipes)
- `web/src/seo.ts` — `pageHead` / `siteHead` helpers
- `web/src/assets/*` — hero photos, light/dark logos, unused Vite starter assets (`hero.png`, `typescript.svg`, `vite.svg`)
- `web/public/favicon.png`, `web/public/icons.svg` — static public assets
Candidates for modification are marked with ★ for the homepage-sections 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/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/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/StatusPage/*` — StatusPage layout, NotFound, ErrorPage
- `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/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/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/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
## Design Patterns
### Chakra `chakra()` factory around router `Link`
- **Location**: NavLink, MobileNav, LinkButton
- **Purpose**: Router-aware links with Chakra style props and `_currentPage` / `aria-current` styling
- **Implementation**: `const ChakraLink = chakra(Link)`
### API-shaped static content
- **Location**: `content/types.ts` + `content/*.ts`
- **Purpose**: Hard-coded today, swappable for API responses later
- **Implementation**: Plain data objects typed with interfaces, passed to components as props from the route (or AppShell)
### Pure helpers with property-based tests
- **Location**: `lib/`, `seo.ts`, `sitemap.ts`
- **Purpose**: Logic that decides what is shown (e.g. invalid social → hidden, invalid e-mail → column omitted) lives outside components and is tested with fast-check
- **Implementation**: Small exported functions, 100% coverage threshold, shared arbitraries in `test/arbitraries.ts`
### Design tokens + recipes
- **Location**: theme.ts, recipes/
- **Location**: `theme.ts`, `recipes/`
- **Purpose**: Single source for colours, fonts, spacing, motion; reusable component variants
- **Implementation**: `defineConfig` tokens/semanticTokens/textStyles, `defineRecipe` + `useRecipe`
### API-shaped static content
- **Location**: Hero/heroContent.ts + types.ts, navItems.ts
- **Purpose**: Hard-coded content today, swappable for CMS API responses later
- **Implementation**: Plain data objects typed with interfaces; components receive them as props
### Page registry
- **Location**: `sitePages.ts`, typed by `RoutePath`
- **Purpose**: One source for head tags and the sitemap; `indexed: false` for placeholders
### Route-level head management
- **Location**: seo.ts, each route's `head` option, `HeadContent` in root
- **Purpose**: Per-page SEO without SSR
### Configuration as code for hosting
- **Location**: `config/securityHeaders.ts` → `config/serverConfig.ts` → `deploy/`
- **Purpose**: Same headers in dev, preview, nginx (test) and IIS (production); a test guards drift
### Accessibility by default
- **Location**: across components; `test/axe.ts` in component tests; Lighthouse in CI
- **Implementation**: landmarks, skip link, focus management, live regions, visible focus ring, 44px targets, reduced motion
## Critical Dependencies
### @chakra-ui/react
- **Version**: ^3.37.0
- **Usage**: All layout and styling
- **Purpose**: Component library and styling system
### @tanstack/react-router (+ router-plugin)
- **Version**: ^1.170.39 / ^1.168.40
- **Usage**: File-based routes, `Link`, `Outlet`, `HeadContent`, `useRouterState`
- **Purpose**: Routing and head management
### @iconify/react + @iconify-icons/ant-design
- **Version**: ^6.0.2 / 2.0.1
- **Usage**: Offline icons in Hero
- **Purpose**: Icons bundled at build time (no API calls)
### @chakra-ui/react ^3.37.0
- **Usage**: All layout and styling; typegen from `theme.ts` on install
### @tanstack/react-router ^1.170.39 (+ router-plugin ^1.168.40)
- **Usage**: File-based routes, `Link`, `Outlet`, `HeadContent`, typed `RoutePath`
### @sentry/react ^11.8.0
- **Usage**: Error reporting, lazy-loaded after the load event
### @iconify/react ^6.0.2 + @iconify-icons/ant-design 2.0.1
- **Usage**: Offline icons (bundled at build time)