your personal website on atproto - mirror blento.app
at map 44 lines 2.3 kB view raw view rendered
1# Repository Guidelines 2 3## Project Structure & Module Organization 4 5- `src/routes` contains SvelteKit routes, including dynamic handle pages in `src/routes/[handle]/[[page]]`, edit flows in `src/routes/[handle]/[[page]]/edit` and `src/routes/edit`, and API endpoints under `src/routes/api`. 6- `src/lib` holds reusable modules: card implementations in `src/lib/cards`, shared UI in `src/lib/components`, OAuth helpers in `src/lib/oauth`, and site data/loading in `src/lib/website`. 7- Root app setup lives in `src/app.html` and `src/app.css`. 8- `static` is for public assets served as-is. 9- `docs` includes contributor-facing docs like custom cards and self-hosting. 10 11## Build, Test, and Development Commands 12 13- `pnpm dev` starts the Vite dev server. 14- `pnpm build` creates a production build. 15- `pnpm preview` builds and runs locally with Wrangler. 16- `pnpm check` runs `svelte-check` for type diagnostics. 17- `pnpm lint` runs Prettier check and ESLint. 18- `pnpm format` auto-formats the codebase with Prettier. 19- `pnpm deploy` builds and deploys to Cloudflare Workers. 20 21## Coding Style & Naming Conventions 22 23- Indentation uses tabs, single quotes, and 100-column width (see `.prettierrc`). 24- Svelte components use PascalCase filenames; utilities and helpers use camelCase. 25- Prefer TypeScript in `src` and keep module boundaries aligned with `src/lib` subfolders (cards, components, website, oauth). 26 27## Testing Guidelines 28 29- There is no dedicated test runner yet. 30- **Before submitting changes, you must:** 31 1. Run `pnpm check` - Must complete with **0 errors and 0 warnings** 32 2. Run `pnpm format` - Format all code with Prettier 33 3. Run `pnpm lint` - Ensure no linting errors 34- For UI changes, verify key flows manually (login, card editing, save/load, and route navigation across `[handle]` pages). 35 36## Commit & Pull Request Guidelines 37 38- Keep commits short and direct; recent history favors lowercase, imperative summaries (e.g., `small fixes`). 39- PRs should include a clear description, linked issues when relevant, and screenshots for UI changes. 40 41## Configuration & Deployment Notes 42 43- Copy `.env.example` to `.env` and adjust `PUBLIC_*` values for local or self-hosted setups. 44- Cloudflare configuration lives in `wrangler.jsonc`; deployments use Wrangler via `pnpm deploy`.