Files
SlpSoftware/aidlc-docs/_shared/reverse-engineering/code-structure.md
T
SluijsensandClaude Sonnet 5.5 1047c738b5 AI-DLC: inception en ontwerp voor redesign B/E met contactformulier
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>
2026-11-09 21:06:25 +01:00

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, Sentry
  • src/router.tsx, src/routes/__root.tsx, src/routes/index.tsx - routing
  • src/fonts.ts - @fontsource imports (Instrument Sans, Sora, JetBrains Mono)
  • src/index.css - Tailwind layers, .theme-red/.theme-purple variable sets, caret animation
  • src/theme/ThemeProvider.tsx, src/theme/tokens.ts - theme context, ids, storage key
  • src/components/layout/Nav.tsx, Footer.tsx, RootLayout.tsx - shell
  • src/components/ui/ThemeToggle.tsx - round swatch button
  • src/components/shared/UmamiAnalytics.tsx, ErrorBoundary.tsx, SentryTestButton.tsx - cross-cutting
  • src/features/landing/pages/LandingPage.tsx - section composition (Hero, About, Packages, Process, Contact)
  • src/features/landing/components/* - Hero, AboutSection (photo, WebP variants in public/), PackagesSection, PackageCard, PackageCardSkeleton, ProcessSection, ProcessStep, ContactSection (mailto only)
  • src/features/landing/data/content.ts - nav links, hero, packages seed, process steps, about, contact info
  • src/features/landing/hooks/usePackagesQuery.ts - TanStack Query fetch of offerings
  • src/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: ThemeName union + 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.