src/routes/contains SvelteKit routes; the primary UI issrc/routes/+page.svelte.src/lib/screens/holds the scrollable “screen” components used by the main page.src/lib/components/,src/lib/utils/, andsrc/lib/state.svelte.tscontain shared UI, helpers, and state.src/lib/libraries/wraps external endpoints and integrations.src/lib/db.ts,src/lib/schema.ts, anddrizzle/define and store database schema + migrations.src/app.css,src/app.html, andsrc/app.d.tsare global app assets/config.
Use bun for all workflows.
bun installinstalls dependencies.bun run devstarts the Vite dev server.bun run buildgenerates a production build.bun run previewserves the production build locally.bun run checkrunssvelte-checkwith the repo’s TS config.bun run lintchecks formatting (Prettier) and lint rules (ESLint).bun run formatauto-formats the repo with Prettier.bun run migrategenerates Drizzle migrations and compiles them.
- Formatting is enforced by Prettier and
prettier-plugin-svelte; runbun run format. - Linting uses ESLint with Svelte support; run
bun run lint. - Prefer descriptive component names in
src/lib/screens/and keep route files minimal. - Use TypeScript where applicable (
.ts,.sveltewithlang="ts").
- There is no dedicated test framework in this repo.
- Use
bun run checkandbun run lintas the baseline quality gate. - If you add tests, keep them near the feature and name them clearly (e.g.
*.test.ts).
- Commit messages are short, imperative, and capitalized (e.g., “Fix websockets”, “Add new chains”).
- PRs should include a concise description, testing performed (commands run), and UI screenshots for visual changes.
- Link relevant issues or context when available.
- Copy
.env.exampleto.envand fill required keys (WalletConnect + Polymer). - Cloudflare Workers are the default deployment target; see
svelte.config.jsandwrangler.jsonc.