- Product behavior and route/spec details live in
SPEC.md(Page Spec,Scenario Catalog, andSystem Behavior Specsections). - Local setup, required environment variables, and command usage live in
README.md.
This repo is a Next.js 16 + TypeScript app-router project.
app/: routes, pages, layouts, and API handlers (app/api/**/route.ts).components/: shared UI and feature components (components/ui/*for design-system primitives).lib/: core logic (auth, GitHub client wrappers, database queries/schema).hooks/: reusable React hooks.public/: static assets.drizzle/: generated Drizzle SQL migrations and metadata.tests/: test suites (tests/unit/*for Vitest unit tests,tests/integration/*for Vitest API integration tests,tests/e2e/*for Playwright UI tests).styles/andapp/globals.css: global styling.
- Language: TypeScript with
strictmode enabled (tsconfig.json). - Formatting pattern in this repo: 2-space indentation, no semicolons, double quotes.
- File naming: kebab-case for route/component files (example:
app/auth/signin/page.tsx). - Component naming: PascalCase exports; helpers/functions use camelCase.
- Use path alias
@/*for internal imports when practical.
When adding behavior:
- Add/update unit tests in
tests/unit/where possible. - Add/update API integration scenarios in
tests/integration/api-suite.test.tsand supporting helpers intests/utils/when flow-level behavior changes. - Add/update browser/page checks in
tests/e2e/pages-reference.spec.tswhen UI behavior changes. - Validate with
pnpm testlocally (seeREADME.mdcommand table).
Use Conventional Commit-style prefixes seen in history: feat:, refactor: (example: feat: implement JWT and OAuth auth flow).
- Keep commits focused and atomic.
- PRs should include: concise summary, affected routes/modules, test evidence (
pnpm lint,pnpm test), and screenshots/GIFs for UI changes. - Link related issues/tasks and note any new environment variables or migration steps.
- Database schema changes must be managed through Drizzle migrations in
drizzle/. - Do not introduce manual SQL
ALTER TABLEchanges outside the Drizzle migration flow. - Vercel build applies migrations before build (
vercel.jsonusespnpm db:migrate && pnpm build).