<One sentence: what this SvelteKit app does.>
Stack
-
SvelteKit + Svelte 5 (runes) + TypeScript; adapter: <adapter-node adapter-vercel adapter-static> - Styling:
; tests: Vitest + Playwright
Commands
- Dev:
npm run dev - Check types and Svelte:
npm run check(svelte-check) - Lint/format:
npm run lint && npm run format - Unit tests:
npx vitest run; E2E:npx playwright test - Build:
npm run build && npm run preview
Rules
- Use Svelte 5 runes (
$state,$derived,$effect,$props) in new components; do not mix in legacyexport let/$:syntax. - Load data in
+page.server.ts/+layout.server.tswhen it needs secrets or the database;+page.tsonly for public data. - Mutations via form actions with progressive enhancement (
use:enhance); validate on the server. - Server-only modules live in
$lib/server/(SvelteKit prevents importing them in client code); secrets from$env/static/privateor$env/dynamic/privateonly. - Prefer
$derivedover$effectfor computed values; effects are for side effects only.
Definition of done
npm run check, lint and tests pass;npm run buildsucceeds.