Requirements, application design (incl. concept-API-contract voor het contactformulier), units en functional design voor U1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Code Structure
Build System
- Type: pnpm + Vite 5 +
tsc -b - Configuration:
vite.config.ts(react plugin,__APP_VERSION__define, dev proxy/sentry-tunnel, vitest jsdom),tailwind.config.ts,postcss.config.js,tsconfig*.json,eslint.config.js,.prettierrc
Key Modules
Entry: index.html → src/main.tsx (Sentry init, RouterProvider) → src/router.tsx (hash history) → src/routes/__root.tsx (ThemeProvider + RootLayout) → src/routes/index.tsx (LandingPage).
Existing Files Inventory
src/main.tsx- bootstrap, Sentrysrc/router.tsx,src/routes/__root.tsx,src/routes/index.tsx- routingsrc/fonts.ts- @fontsource imports (Instrument Sans, Sora, JetBrains Mono)src/index.css- Tailwind layers,.theme-red/.theme-purplevariable sets, caret animationsrc/theme/ThemeProvider.tsx,src/theme/tokens.ts- theme context, ids, storage keysrc/components/layout/Nav.tsx,Footer.tsx,RootLayout.tsx- shellsrc/components/ui/ThemeToggle.tsx- round swatch buttonsrc/components/shared/UmamiAnalytics.tsx,ErrorBoundary.tsx,SentryTestButton.tsx- cross-cuttingsrc/features/landing/pages/LandingPage.tsx- section composition (Hero, About, Packages, Process, Contact)src/features/landing/components/*- Hero, AboutSection (photo, WebP variants inpublic/), PackagesSection, PackageCard, PackageCardSkeleton, ProcessSection, ProcessStep, ContactSection (mailto only)src/features/landing/data/content.ts- nav links, hero, packages seed, process steps, about, contact infosrc/features/landing/hooks/usePackagesQuery.ts- TanStack Query fetch of offeringssrc/lib/queryClient.ts,src/utils/scrollToHash.ts,src/test/setup.ts- Tests:
Nav.test.tsx,ErrorBoundary.test.tsx,SentryTestButton.test.tsx,UmamiAnalytics.test.tsx,ThemeProvider.test.tsx,PackagesSection.test.tsx References/- original static HTML designs (purple and red)
Design Patterns
CSS-variable theming
- Location:
index.css,tailwind.config.ts - Purpose: switch theme by swapping a class on
<html>; components use semantic Tailwind colors. - Implementation:
ThemeNameunion +themeClassName().
Feature folder
- Location:
src/features/landing - Purpose: group components/data/hooks by feature.
Critical Dependencies
- react 18.3, @tanstack/react-router 1.79 (hash history), @tanstack/react-query 5, tailwindcss 3.4, @sentry/react 10, @fontsource fonts.