Skip to content
  • System
  • Light
  • Dark
  • High contrast

Contributing

  1. Branch from main using a conventional prefix: feat/, fix/, chore/, docs/, refactor/, test/
  2. Open a pull request — never push directly to main
  3. Wait for all CI checks to pass (Build, Test, E2E)
  4. Squash merge and delete the branch

Use Conventional Commits:

type(scope): concise title

Common types: feat, fix, chore, docs, refactor, test. Scope is optional.

lefthook runs automatically on git commit:

  • lintoxlint checks for errors
  • formatoxfmt --check verifies formatting

If the format check fails, run:

Terminal window
pnpm format

Then re-stage and commit.

Terminal window
pnpm test # Vitest unit tests
pnpm e2e # Playwright end-to-end tests (requires local stack running)

CI runs both. A PR cannot be merged until all checks are green.

When you change the Drizzle schema in packages/db/src/schema/:

  1. Generate the migration: pnpm --filter @inntrig/db db:generate
  2. Review the generated SQL in packages/db/migrations/
  3. Apply locally: pnpm --filter @inntrig/db db:migrate
  4. Migrations run automatically on API startup in production — no manual step needed

Standards are data-driven. To add a new standard:

  1. Add seed data in packages/db/src/seed.ts — define the standard and its criteria
  2. Set config.criterionFields to define what attributes each criterion has (e.g. level for WCAG 2.x)
  3. Set config.resultFields to define custom result controls (e.g. score for WCAG 3.0). Omit for standard pass/fail/na/todo.
  4. Run the seed: npx tsx packages/db/src/seed.ts

No TypeScript code changes needed — the UI renders controls from config.

The spec is hand-authored in apps/api/src/openapi.ts. When you add or change an API endpoint:

  1. Update the spec in openapi.ts to match
  2. Verify at http://localhost:3001/docs
  3. The spec is served at runtime — there is no generated file to commit

Use pnpm only. Do not use npm or yarn.