# Frontend Svelte 5 SPA bundled with esbuild and styled with Tailwind CSS 4. ## Structure - Entry point: `src/index.ts`, main component: `src/App.svelte`. - `src/lib/` — utilities, stores, actions, API layer. - `src/widgets/` — reusable UI components (Button, Input, Form, etc.). - `src/css/` — global styles and Tailwind imports. - Keep route components in a `src/routes/` folder when needed. ## Routing This project uses a **custom SPA router** (NOT SvelteKit, NOT file-based routing). Pages are CMS content entries loaded dynamically by URL path. - `lib/store.ts` proxies `history.pushState`/`replaceState` → updates `$location` store. - `App.svelte` reacts to `$location.path` → calls `getCachedEntries("content", { lang, path })` → renders blocks. - `lib/navigation.ts` provides `spaNavigate(url)` for programmatic navigation and `use:spaLink` action for `` elements. - URL structure: `/{lang}/{path}` (e.g. `/de/ueber-uns`, `/en/about`). - Root `/` auto-redirects to `/{browserLanguage}/`. - **For full details see the `frontend-architecture` skill.** ## Conventions - PascalCase component names; export props at the top of `