- Monorepo managed by pnpm + Turborepo.
- Apps:
apps/backend(Cloudflare Worker),apps/extension(browser extension, Vite),apps/website(Next.js). - Packages: shared libs and configs under
packages/(adapters,types,eslint-config,typescript-config,vitest-config,logo,test-utils). - Tests: integration/e2e under
tests/; unit tests live with sources (__tests__/or*.test.ts).
pnpm dev— run all app dev tasks (watch mode via Turborepo).pnpm build— build all packages/apps.pnpm lint/pnpm typecheck— ESLint and TypeScript across workspace.pnpm test— run all tests;pnpm test:unit,pnpm test:integration,pnpm test:e2efor subsets.- Targeted filters:
pnpm extension:dev,pnpm extension:build,pnpm backend:build,pnpm backend:deploy. - Coverage report:
pnpm test:coverage(merges and opens NYC report incoverage/report).
- Language: TypeScript (Node 20.x). Package manager: pnpm 9.x.
- Formatting: Prettier (2‑space indent) via Husky + lint‑staged. Run
pnpm format/pnpm format:check. - Linting: shared config
@repo/eslint-config; fix withpnpm lint. - Naming:
camelCasefor vars/functions,PascalCasefor React 19 components/types,UPPER_SNAKE_CASEfor constants. File names kebab- or lowerCamel; tests as*.test.tsor under__tests__/.
- Unit/integration: Vitest; browser env via JSDOM where needed.
- E2E: Playwright in
tests/(pnpm test:headed/pnpm test:debughelpful locally). - Prefer colocated unit tests; use
tests/for cross-project integration. - Aim for meaningful coverage; verify with
pnpm test:coverage.
- Use Conventional Commits:
feat(scope): ...,fix(scope): ...,chore: ...,refactor(scope): .... - PRs: concise description, linked issues, testing notes; include screenshots/GIFs for UI changes (website/extension). Update docs in
docs/when architecture or behavior changes.
- Do not commit secrets. Backend uses Cloudflare Wrangler (
apps/backend/wrangler.toml); extension uses.env.*inapps/extension/. Website deploys via Vercel. - Run
pnpm installonce with Node 20.x; usemise/Corepack if configured.
- Try to keep things in one function unless composable or reusable
- DO NOT do unnecessary destructuring of variables
- DO NOT use
elsestatements unless necessary - DO NOT use
try/catchif it can be avoided - AVOID
try/catchwhere possible - AVOID
elsestatements - AVOID using
anytype - AVOID
letstatements - PREFER single word variable names where possible