# 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)` - `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