Files
AndreaSlopFotografie/aidlc-docs/features/frontend-shell/construction/frontend-shell/code/code-summary.md
T
SluijsensandClaude Opus 5.5 069c7cb7eb Adds AI-DLC construction docs for the front-end shell feature
Functional design, NFR requirements, code generation plan and summary,
and build-and-test instructions with results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:05:03 +02:00

5.7 KiB
Raw Blame History

Code Summary — frontend-shell

All application code is in web/. Plan: frontend-shell-code-generation-plan.md.

Structure

graph TD
    Root["routes/__root.tsx"] --> Shell["AppShell"]
    Root --> Head["siteHead + JSON-LD"]
    Shell --> Skip["SkipNavLink"]
    Shell --> Nav["NavigationBar"]
    Shell --> Main["main#35;main + Outlet"]
    Shell --> Foot["Footer"]
    Shell --> Top["BackToTop"]
    Main --> Pages["Route pages via PageIntro / Hero"]
    Main --> Status["NotFound / ErrorPage via StatusPage"]
    Pages --> Registry["sitePages + pageHead"]
    Registry --> Sitemap["sitemap.xml at build"]

    classDef layout fill:#4CAF50,stroke:#2e7d32,stroke-width:1px,color:#000;
    classDef ui fill:#2196F3,stroke:#0d47a1,stroke-width:1px,color:#000;
    classDef data fill:#fbd38d,stroke:#92400e,stroke-width:1px,color:#000;

    class Root,Shell,Main layout;
    class Skip,Nav,Foot,Top,Pages,Status ui;
    class Head,Registry,Sitemap data;

Text alternative: the root route renders the shell and site-wide head data; the shell holds the skip link, navigation, main content, footer and back-to-top button; pages take their head data from the page registry, which also generates the sitemap.

Files

Created

Area Files Covers
Config vite.config.ts (replaces .js), config/securityHeaders.ts, config/sitemapPlugin.ts, eslint.config.js, lighthouserc.cjs + .d.cts TD-03…07, NFR-SEC-01…03, BR-SEO-06
Theme recipes/container.ts, link.ts, skipNavLink.ts, iconControl.ts BR-THEME-02…07
Content content/siteContent.ts FR-04, BR-EMAIL-01
Logic lib/slidesToLoad.ts, lib/backToTopThreshold.ts, visibleSocials.ts, emailAddress.ts, copyrightLine.ts, navigation.ts, sitePages.ts, sitemap.ts BR-TOP-01, BR-SOC-, BR-EMAIL-, BR-FOOT-02, BR-NAV-, BR-SEO-
Components RouterLink, PageIntro/, StatusPage/ (StatusPage, NotFound, ErrorPage), Footer/ (Footer, FooterColumn, FooterLink), BackToTop/ FR-01, FR-05…FR-10
Hooks hooks/useRouteFocus.ts BR-A11Y-01
Routes portfolio.tsx, soorten-fotoshoots.tsx, contact.tsx, privacyverklaring.tsx FR-01
Static public/robots.txt, public/og-image.jpg (1200×630 crop of hero-1.jpg), public/logo.png BR-SEO-04/05/08
Tests 17 test files, incl. src/test/ (setup, axe matcher, arbitraries, renderWithProviders) and src/app.test.tsx (integration) NFR-M-01, NFR-A-02

Modified

  • theme.ts: removed 250vh; added focus ring, content/pageTop/z-index tokens, pageTitle, recipe registration.
  • seo.ts: pageHead(path) from the registry, canonical, Open Graph image, siteHead, JSON-LD.
  • main.tsx: next-themes removed, scrollRestoration, defaultErrorComponent.
  • routes/__root.tsx, index.tsx, over-mij.tsx.
  • AppShell, NavigationBar (logo link, mainNav, 44px menu button, z-index tokens), MobileNav, NavLink, LinkButton (onto RouterLink).
  • Hero: socials prop; first only the active photo, after it is painted also the next and previous (BR-HERO-01). HeroArrows and HeroSocials use iconControl.
  • index.html: fallback head with og:image, canonical, twitter:card.
  • package.json: scripts, dependencies, postinstall typegen. pnpm-workspace.yaml: source-map-js override.
  • tsconfig.json, .gitignore, .prettierignore.
  • Formatting only: Prettier over all of web/, which also touched existing files such as useHeroSlider.ts and line endings.

Moved / deleted

  • Moved: components/Hero/{heroContent,socialPlatforms,types}.ts → content/.
  • Deleted: components/Footer.tsx, NavigationBar/navItems.ts, assets/hero.png, assets/typescript.svg, assets/vite.svg.

Deviations From the Plan

Planned Done instead Why
vitest-axe Own toHaveNoViolations on axe-core (TD-02 fallback) vitest-axe 0.1.0 types target the old Vitest Vi namespace
ESLint 10 ESLint 9 eslint-plugin-jsx-a11y supports up to ESLint 9
— inert on the hidden to-top button Makes BR-TOP-03 hold without CSS and testable in jsdom
— Hero loads the active slide first, then only its neighbours Stacked slides defeat loading="lazy"; mobile LCP 19.7s → 4.3s, home download 2.6 MB → 1.2 MB
Footer brand column: logo above text, left-aligned Mobile centred and stacked; tablet/desktop logo 110px beside the text; tagline split into two lines in the content User choice after reviewing renders at 390/820/1440px
Home mobile Performance ≥ 0.9 ≥ 0.8 for now (lighthouserc.cjs); desktop stays 0.9 (lighthouserc.desktop.cjs) User choice; responsive images come with the API/CMS
audit:deps on all packages audit:deps on production packages; audit:dev reports dev tools without blocking User choice; dev tools never ship
— .ts extensions in the config import chain Vite 8 warns these become required for its native config loader
— postinstall: chakra typegen Typegen output lives in node_modules and was lost on reinstall

Scripts

Command Does
pnpm test / pnpm test:watch Vitest with coverage (100% threshold on pure functions)
pnpm lint, pnpm format:check ESLint, Prettier
pnpm build Type check + Vite build, including sitemap.xml
pnpm audit:deps pnpm audit --prod --audit-level high (blocks)
pnpm audit:dev pnpm audit, report only
pnpm lighthouse Lighthouse CI, mobile (lighthouserc.cjs) then desktop (lighthouserc.desktop.cjs); needs local Chrome
pnpm check All of the above in order

LAYOUT.md

No change. The shell blocks (Header / Content / Footer) are unchanged. Skip link and back-to-top are not page sections.