Contributing
Branch workflow
Section titled “Branch workflow”- Create a feature branch from
main. - Make focused changes with passing local checks.
- Open a merge request on GitLab.
- Ensure CI passes (lint, typecheck, test, build).
- Squash or merge per team preference after review.
Conventional commits
Section titled “Conventional commits”Use Conventional Commits:
| Type | When |
|---|---|
chore | Tooling, workspace setup, DX |
feat | New app or package |
feat(scope) | Scoped feature (e.g. feat(api), feat(web)) |
docs | Documentation site or content |
test | Test-only additions |
ci | CI/CD pipeline changes |
Examples:
feat(web): scaffold React frontend shellci: add GitLab typecheck jobs for api and webdocs: document deployment variablesCommits should be signed (SSH or GPG) per repository policy.
Git hooks (Lefthook)
Section titled “Git hooks (Lefthook)”pnpm install runs lefthook install via the root prepare script.
| Hook | Behavior |
|---|---|
pre-commit | oxfmt + oxlint on staged files; pnpm typecheck when .ts files change |
pre-push | format:check, lint:check, typecheck |
Run hooks manually:
pnpm exec lefthook run pre-commitpnpm exec lefthook run pre-pushCode style
Section titled “Code style”- Lint: oxlint (type-aware via
oxlint-tsgolint) - Format: oxfmt (Prettier-compatible)
- Types: tsgo (
@typescript/native-preview) —astro checkfor docs
Match existing patterns in the package you are editing. Prefer extending shared packages over duplicating logic in apps.
Adding shadcn components
Section titled “Adding shadcn components”From the web app, install shared primitives into packages/ui:
pnpm --filter @quiz-builder/web exec shadcn add cardApp-local components stay in apps/web/src/components/.