# Repository Guidelines ## Project Structure & Module Organization - `src/routes/` holds SvelteKit pages; nested folders map to routes, with shared data wired through `+layout.*`. - `src/lib/components/` contains reusable UI, while `src/lib/server/` hosts server-only helpers and database adapters. - Unit specs live beside code as `*.spec.ts`; Playwright flows sit in `e2e/`; static assets land in `static/`. - Drizzle migrations are versioned in `drizzle/`, with tooling in `drizzle.config.ts` and bindings described by `wrangler.jsonc`. ## Build, Test, and Development Commands - `npm run dev` launches the Vite dev server; append `-- --open` to auto-open a browser tab. - `npm run check` performs `svelte-kit sync` plus `svelte-check` against `tsconfig.json` for type safety. - `npm run build` compiles the production bundle; `npm run preview` serves it via `wrangler pages dev`. - `npm run lint` runs Prettier (check) and ESLint; use `npm run format` to fix style issues. - `npm run test` runs Vitest headlessly and then Playwright; `npm run test:unit -- --watch` keeps Vitest hot during development. - Database helpers: `npm run db:generate` creates snapshots, `npm run db:push` syncs schema, and `npm run db:migrate:local` applies migrations. ## Coding Style & Naming Conventions - TypeScript is mandatory; organize Svelte files as `