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>
5.1 KiB
5.1 KiB
Code Structure
Build System
- Type: npm-compatible via pnpm (lockfile
web/pnpm-lock.yaml) - Configuration:
web/package.json— scriptsdev(vite),build(tsc && vite build),preview,typegen(Chakra typegen for theme)web/vite.config.js— TanStack Router plugin (autoCodeSplitting) before@vitejs/plugin-react;resolve.tsconfigPathsweb/tsconfig.json— strict-ish bundler mode,@/*→src/*alias,noUnusedLocals/Parameters,erasableSyntaxOnlyweb/.prettierrc— 4 spaces, single quotes, semicolons
Key Classes/Modules
graph TD
Root["routes/__root.tsx"] --> AppShell["components/AppShell.tsx"]
AppShell --> NavigationBar["NavigationBar/NavigationBar.tsx"]
AppShell --> Footer["components/Footer.tsx"]
NavigationBar --> NavLink["NavigationBar/NavLink.tsx"]
NavigationBar --> MobileNav["NavigationBar/MobileNav.tsx"]
NavigationBar --> navItems["NavigationBar/navItems.ts"]
MobileNav --> navItems
NavigationBar --> useScrolledPast["hooks/useScrolledPast.tsx"]
Index["routes/index.tsx"] --> Hero["Hero/Hero.tsx"]
Hero --> HeroArrows["Hero/HeroArrows.tsx"]
Hero --> HeroSocials["Hero/HeroSocials.tsx"]
Hero --> useHeroSlider["Hero/useHeroSlider.ts"]
Hero --> LinkButton["components/LinkButton.tsx"]
HeroSocials --> socialPlatforms["Hero/socialPlatforms.ts"]
classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
classDef util fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
class Root,AppShell,NavigationBar,Footer,NavLink,MobileNav shell;
class Index,Hero,HeroArrows,HeroSocials page;
class navItems,useScrolledPast,useHeroSlider,LinkButton,socialPlatforms util;
Text alternative: the root route renders AppShell (NavigationBar with NavLink/MobileNav/navItems, plus Footer); the index route renders Hero with its arrows, socials, slider hook and the shared LinkButton.
Existing Files Inventory
web/index.html— HTML entry; static fallback title/meta for non-JS crawlers (data-fallback)web/src/main.tsx— bootstrap: providers, router, fonts, removes fallback head tagsweb/src/routeTree.gen.ts— generated by TanStack Router plugin (do not edit)web/src/routes/__root.tsx— root layout route, site-wide headweb/src/routes/index.tsx— home page (/), renders Heroweb/src/routes/over-mij.tsx— about page (/over-mij), placeholder contentweb/src/components/AppShell.tsx— shell: NavigationBar + Outlet + Footerweb/src/components/Footer.tsx— placeholder footerweb/src/components/LinkButton.tsx— routerLinkstyled withlinkButtonrecipeweb/src/components/NavigationBar/NavigationBar.tsx— header, logo, desktop nav, hamburgerweb/src/components/NavigationBar/NavLink.tsx— desktop nav link with underline animationweb/src/components/NavigationBar/MobileNav.tsx— full-screen mobile menuweb/src/components/NavigationBar/navItems.ts— menu items (Home, Over mij)web/src/components/Hero/*— hero slider (component, arrows, socials, hook, content, types, platforms)web/src/hooks/useScrolledPast.tsx— boolean "scrolled past threshold" hookweb/src/recipes/linkButton.ts— Chakra recipe for the square design buttonweb/src/theme.ts— Chakra system config (tokens, semantic tokens, text styles, recipes)web/src/seo.ts—pageHead/siteHeadhelpersweb/src/assets/*— hero photos, light/dark logos, unused Vite starter assets (hero.png,typescript.svg,vite.svg)web/public/favicon.png,web/public/icons.svg— static public assets
Design Patterns
Chakra chakra() factory around router Link
- Location: NavLink, MobileNav, LinkButton
- Purpose: Router-aware links with Chakra style props and
_currentPage/aria-currentstyling - Implementation:
const ChakraLink = chakra(Link)
Design tokens + recipes
- Location: theme.ts, recipes/
- Purpose: Single source for colours, fonts, spacing, motion; reusable component variants
- Implementation:
defineConfigtokens/semanticTokens/textStyles,defineRecipe+useRecipe
API-shaped static content
- Location: Hero/heroContent.ts + types.ts, navItems.ts
- Purpose: Hard-coded content today, swappable for CMS API responses later
- Implementation: Plain data objects typed with interfaces; components receive them as props
Route-level head management
- Location: seo.ts, each route's
headoption,HeadContentin root - Purpose: Per-page SEO without SSR
Critical Dependencies
@chakra-ui/react
- Version: ^3.37.0
- Usage: All layout and styling
- Purpose: Component library and styling system
@tanstack/react-router (+ router-plugin)
- Version: ^1.170.39 / ^1.168.40
- Usage: File-based routes,
Link,Outlet,HeadContent,useRouterState - Purpose: Routing and head management
@iconify/react + @iconify-icons/ant-design
- Version: ^6.0.2 / 2.0.1
- Usage: Offline icons in Hero
- Purpose: Icons bundled at build time (no API calls)