backend/hosts the ActivityPub/Mastodon API and Workers code (TypeScript).frontend/contains the Qwik UI, assets, and build adapters.consumer/anddo/include queue/Durable Object handlers.migrations/andschema.sqldefine D1 schema evolution.ui-e2e-tests/holds Playwright end-to-end specs.docs/contains deployment and operational guides.
pnpm installinstalls root dependencies.pnpm run buildinstalls frontend deps via pnpm and builds the UI bundles.pnpm run devbuilds, applies local D1 migrations, and starts Pages dev server.pnpm run database:create-mockinitializes a local D1 database with mock data.pnpm run testruns backend unit tests with Vitest.npx playwright testruns UI end-to-end tests inui-e2e-tests/.pnpm run lintandpnpm run prettyrun ESLint and Prettier checks.
- TypeScript is standard across
backend/,consumer/,do/, andfrontend/. - Indentation follows tabs in existing source files; keep style consistent.
- Test files use
*.test.ts; Playwright specs use*.spec.ts. - Linting: ESLint (root and
frontend/), formatting: Prettier (pnpm run pretty).
- Unit tests live alongside backend routes and utilities (
backend/**.test.ts). - UI E2E tests live in
ui-e2e-tests/and use Playwright. - For UI tests, run
pnpm run database:create-mockbefore starting the dev server.
- Commit subjects are short and imperative; follow patterns like "Update dependency ".
- PRs should explain the change, link relevant issues, and note testing performed.
- Include screenshots or short clips for UI-visible changes.
- Cloudflare bindings live in
wrangler.toml(keep D1 binding nameDATABASE). - Required env vars:
USER_KEY,CF_ACCOUNT_ID,CF_API_TOKEN. - See
docs/for deployment, access policy, and troubleshooting details.