src/routes/+layout.svelteandsrc/routes/+page.sveltedefine the app shell and landing page;layout.cssholds global styles.src/libcontains reusable pieces:components/for UI,hooks/for app-specific helpers,utils.tsfor shared helpers,turbomesh.tsfor the wasm bindings, andassets/for local media.staticserves public files; place the requiredturbomesh.wasmhere so it is available at runtime.- Configuration lives in
svelte.config.js,vite.config.ts,tsconfig.json,eslint.config.js, andcomponents.json(UI generator metadata).
npm run dev— start the Vite dev server (use-- --opento launch a browser).npm run build— create a production bundle; ensurestatic/turbomesh.wasmexists first.npm run preview— serve the built bundle locally for smoke-testing.npm run check— run SvelteKit sync plussvelte-checkfor type and markup validation.npm run lint—prettier --checktheneslint .for TS/Svelte linting.npm run format— format the repo with Prettier (Svelte and Tailwind plugins included).
- Codebase is TypeScript + Svelte 5; default to 2-space indentation.
- Components use PascalCase file names (
Button.svelte), hooks start withuse, utilities usecamelCaseexports, and route files follow SvelteKit+page/+layoutpatterns. - UI primitives follow shadcn-svelte conventions; prefer extending existing shadcn components before creating new ones to keep styling consistent.
- Keep styles colocated with components when possible; use
layout.cssfor shared tokens. - Run
npm run formatbefore commits; ESLint shares the same configuration asprettier-configto avoid conflicts.
- No dedicated test harness is present; rely on
npm run checkandnpm run lintfor regression detection. - When adding features, prefer adding component-level tests (e.g., Playwright or Vitest) under
src/following the route or component structure; name files*.spec.tsor*.test.ts. - Include manual repro steps in PRs if automated tests are absent.
- Commit messages in this repo use short, imperative, lowercase phrases (e.g.,
add header and remove test page); keep scope-focused. - PRs should include: a brief summary, linked issue (if any), before/after screenshots for UI changes, notes on wasm or asset updates, and steps to validate locally (
build,check,lint,previewas appropriate).
- Always bundle the matching
turbomesh.wasmintostatic/and updatesrc/lib/turbomesh.tsif the API surface changes. - Avoid committing generated artifacts outside
static/; keep secrets out of Vite/Svelte config and prefer.enventries loaded through Vite’s environment handling if needed.