Files
AndreaSlopFotografie/aidlc-docs/_shared/reverse-engineering/api-documentation.md
T
SluijsensandClaude Opus 5.5 db2fa89b90 Adds AI-DLC inception docs for the front-end shell feature
Workspace detection, reverse engineering of web/, requirements with
answered verification questions, the execution plan and the open
application design questions for the frontend-shell feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:03:26 +02:00

2.0 KiB

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 }
  • /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

seo.ts

  • Methods: pageHead({ title: string, description: string }) → { meta: [...] }; siteHead constant
  • Return Types: TanStack Router head option object (title, description, og:title, og:description)

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[] })

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 }

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