📄
CLAUDE.md
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Commands
All tasks run via Deno. Use deno task instead of npm run.
deno task dev # start dev server
deno task build # production build
deno task preview # preview production build
deno task check # svelte-kit sync + svelte-check (type checking)
deno task lint # ESLint
deno task test # run all Playwright e2e tests
Run a single e2e test file:
DENO_DIR=/home/developer/.cache/deno deno run -A npm:playwright test src/routes/path/to/page.svelte.e2e.ts
Format source files (Svelte component formatting requires the fmt-component unstable flag, already set in deno.json):
deno fmt
Architecture
This is a SvelteKit app using Svelte 5 with Deno as the runtime and package manager.
Key conventions
- Svelte 5 runes mode is enforced globally via
svelte.config.js. All components must use the runes API ($props(),$state(),$derived(),$effect(), etc.). Therunes: truecompiler option is applied to every file outsidenode_modules. $libmaps tosrc/lib/. Put shared components, utilities, and assets there.- File-based routing under
src/routes/. Each route segment is a directory;+page.svelteis the page,+layout.sveltewraps child routes. - E2e tests are collocated with routes using the
.e2e.{ts,js}extension (e.g.,src/routes/demo/playwright/page.svelte.e2e.ts). Playwright'stestMatchis set to this pattern.
Config files
deno.json— Deno tasks, formatter config (fmt-componentunstable flag for Svelte files), and theDENO_DIRcache.package.json— npm-compatible dependency declarations consumed by Deno's npm compatibility layer.svelte.config.js— SvelteKit adapter (adapter-auto) and runes enforcement.playwright.config.ts— e2e tests run against a production build (not dev server) on port 4173.tsconfig.json— extends the generated.svelte-kit/tsconfig.json; strict mode enabled.
Environment
The Deno npm cache is not at the default location. When running deno commands directly (not via deno task), set:
DENO_DIR=/home/developer/.cache/deno