# 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. - `src/routes/` — page-level components (e.g. `NotFound.svelte` for the 404 page). Not file-based routing — these are manually imported by `App.svelte`. ## Related skills - `frontend-architecture` for routing, stores, API behavior, and i18n flow. - `content-authoring` when frontend changes are driven by new collections, blocks, lookup paths, or `types/global.d.ts` changes. - `nova-pagebuilder-modeling` when block components, `BlockRenderer.svelte`, and admin preview contracts must stay aligned. - `media-seo-publishing` when rendering medialib or file fields; prefer `src/widgets/MedialibImage.svelte` as the shared image boundary. ## 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 `