# Code Structure ## Build System - **Type**: pnpm (`packageManager: pnpm@12.11.2`, lockfile `web/pnpm-lock.yaml`) - **Configuration**: - `web/package.json` — scripts `dev`, `build` (`tsc && vite build` and the script step `config/externalizeInlineScripts.ts`; prerendering), `preview` (`config/previewServer.ts`), `e2e` (browser tests), `test` (vitest + coverage), `lint`, `format:check`, `audit:deps`, `audit:dev`, `lighthouse`, `server-config`, and `check` (all of them in sequence, `e2e` added by prerendering) - `web/vite.config.ts` — TanStack Start plugin with prerendering (prerendering; replaces the router plugin, code splitting included) 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; mobile exceptions in a table with a recorded decision per page, 0.85 for `/`, zwangerschap, gezin, loveshoot and portret; the not-found page is audited through `/__audit/404`) - `.gitea/workflows/continuous_integration.yaml` — jobs `check`, `deploy-test`, `lighthouse`, `deploy-production` ## Key Classes/Modules ```mermaid graph TD Root["routes/__root.tsx"] --> AppShell["components/AppShell.tsx"] AppShell --> NavigationBar["NavigationBar/NavigationBar.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 --> navigation["navigation.ts"] Footer --> navigation navigation --> shootNavItems["lib/shootNavItems.ts"] navigation --> shootTypes["content/shootTypes.ts"] 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"] LinkButton --> RouterLink["components/RouterLink.tsx"] Index --> HomeParts["home/*: IntroGallery, AboutBlock, Pricing, Testimonials, ContactSection; shared 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,HomeParts page; class navigation,shootNavItems,shootTypes,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 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 over-mij-page feature. - `web/index.html` and `web/src/main.tsx` — removed by prerendering; replaced by `src/client.tsx` (hydration entry, Sentry start), `src/router.tsx` (`getRouter`) and the document shell in `routes/__root.tsx` - `web/src/routes/$.tsx` — catch-all route, renders `NotFound` (prerendered as `404.html`; prerendering) - `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 (`/`): Hero + six sections, `?pakket=` search param - `web/src/routes/over-mij.tsx` — the about page (indexed; `AboutPage` JSON-LD) - `web/src/components/about/*` — `AboutIntro`, `StorySection` - `web/src/components/shoots/*` — `ShootList`, `ShootBlock` (soorten-fotoshoots page; unit 2: "Lees meer over de …" link first in the row, to the shoot page) - `web/src/components/shoots/ShootPage/ShootPage.tsx` — shoot page, `ShootPageView` in: intro, then the sections in `shootPageBands` order (unit 2: stories, process, photos, FAQ, package, closing; wrapper `data-testid="shoot-page"`) - `web/src/components/shoots/{StoryBlocks,ProcessIcons}/` — shoot page parts (unit 2): one `PageSection` per story (`StoryBlocks`); the six process icons as inline SVG (`ProcessIcons`) - `web/src/components/{Breadcrumb,ProcessTimeline,PhotoMosaic,FaqList,PackageBlock}/` — shoot page parts (unit 2), each with a test - `web/src/components/StructuredData/StructuredData.tsx` — JSON-LD script via `jsonLdScript`; the only `dangerouslySetInnerHTML` of the shoot pages - `web/src/components/{CallToAction,RichParagraph}/` — shared closing block (unit 2 adds `tone`); paragraph with inline links - `web/src/content/{shootTypes,shootTypesPageContent}.ts` — shoot types (also used by the portfolio filters) and page texts; `web/src/assets/shoots/` — 4:5 shoot photos - `web/src/lib/shootLinks.ts` — contact and portfolio link targets per shoot type - `web/src/lib/{shootPages,shootPackage,fillPlaceholders,richTextToPlain,shootPageView}.ts` — shoot page helpers (ids and paths, package, placeholders, plain text, view), each with a test - `web/src/lib/{headingId,readMoreLabel,mosaicLayout,storyLayout,shootPageBands}.ts` — shoot page helpers (unit 2): safe heading ids, "Lees meer" label, photo-mosaic and story layout, section bands; each with a test at 100 % coverage - `web/src/lib/isShootSectionPath.ts` — whether a pathname is under `/soorten-fotoshoots/` (FR-ST-14, used by `StatusPage/NotFound`), with a property-based test - `web/src/lib/{shootNavItems,navCurrent,navMenuState}.ts` — navigation helpers (unit 3), each with a test: submenu items from the shoot types (`shootNavItems`), current-page and section-current matching (`isItemCurrent`, `isSectionCurrent`), menu state reducer (`navMenuReducer`, `NavMenuState`, `NavMenuEvent`; `navMenuState.ts` at 100 % coverage) - `web/src/components/PhotoDuo/PhotoDuo.tsx` — two photos side by side - `web/src/content/aboutContent.ts` — about page content; `web/src/assets/about/*` — portrait and duo photos; `web/public/og-over-mij.jpg` — preview image - `web/src/routes/soorten-fotoshoots/index.tsx` — the shoot types page (moved from `routes/soorten-fotoshoots.tsx`); `newborn.tsx`, `zwangerschap.tsx`, `gezin.tsx`, `loveshoot.tsx`, `portret.tsx` — one route per shoot page (`/soorten-fotoshoots/`); `-shootPageSources.ts` — the sources the shoot routes share - `web/src/content/shootPageShared.ts` — shared shoot page content (breadcrumb, process, deposit, shared FAQ items, offer texts); `web/src/content/shootPages/*.ts` — one content module per shoot page, plus `shootPages.test.ts` (content consistency) - `web/src/test/renderApp.tsx` — `renderApp(path)` and `expectShell()` for the route tests (prerendering: with a test shell instead of the document shell); `web/src/test/hydrate.tsx` — hydration helpers incl. `hydrateAppAsStart` - `web/src/shootPages.test.tsx` — route tests for the five shoot pages (unit 2): outline, sections, breadcrumb, `aria-current` (main and menus), package variants, OG registry, axe; the overview's "Lees meer" links - `web/src/routes/portfolio.tsx` — the portfolio (indexed; `?shoot=` filter; `ImageGallery` JSON-LD); `web/src/components/portfolio/PortfolioGallery/`, `web/src/content/portfolioContent.ts`, `web/src/lib/portfolioFilters.ts`, `web/src/assets/portfolio/*` (10 photos × 2 sizes), `web/public/og-portfolio.jpg` - `web/src/routes/{contact,privacyverklaring}.tsx` — placeholders with `PageIntro` - `web/src/components/AppShell.tsx` — shell - `web/src/components/NavigationBar/*` — header, NavLink (`sectionCurrent` underline for the parent of an open section), MobileNav (scrolls; Escape returns focus to the hamburger), NavSubmenu (desktop disclosure panel), MobileNavGroup (expandable shoot list on mobile), ChevronIcon, NoScriptNav (two `