Thank you for your interest in contributing to RV Trax! This document provides guidelines for contributing to the project.
- Fork the repository
- Clone your fork
- Follow the Quick Start guide to set up your development environment
- Create a feature branch from
main
- Node.js >= 22 (see
.nvmrc) - pnpm >= 9 (corepack enabled)
- Docker & Docker Compose
# Install dependencies
pnpm install
# Start infrastructure (PostgreSQL, Redis, MQTT)
cd infrastructure/docker && docker compose up -d postgres redis mosquitto
# Run all apps in development
pnpm run dev
# Run quality checks before submitting
pnpm run lint
pnpm run typecheck
pnpm run test
pnpm run test:coverage # Check coverage thresholdsWe use Conventional Commits enforced by commitlint. Format:
type(scope): description
feat(web): add inventory aging dashboard
fix(api): correct rate limit for webhook endpoints
chore(deps): update fastify to v5.3
docs(db): add migration rollback guide
Types: feat, fix, chore, docs, refactor, test, ci, perf
Scopes: web, api, mobile, iot, db, shared, infra, ci, deps
Husky + lint-staged automatically runs on git commit:
- ESLint — Fixes and checks staged
.ts/.tsxfiles - Prettier — Formats all staged files
- commitlint — Validates your commit message format
If hooks fail, fix the reported issues before committing.
- TypeScript with strict mode enabled across all packages
- ESLint for linting — run
pnpm run lintbefore committing - Prettier for formatting — config in
.prettierrc - All API inputs validated with Zod schemas
- Database queries use Drizzle ORM (no raw SQL unless necessary)
- Multi-tenant isolation: all queries must filter by
dealershipId
This is a pnpm monorepo managed with Turborepo:
apps/api— Fastify REST APIapps/web— Next.js dashboard (33 pages)apps/mobile— React Native appapps/iot-ingest— IoT telemetry pipelinepackages/shared— Shared types, enums, validatorspackages/db— Database schema and migrations
For detailed architecture, see docs/ARCHITECTURE.md.
- Create a descriptive branch name (e.g.,
fix/alert-pagination,feat/batch-tracker-import) - Write clear, conventional commit messages
- Ensure all checks pass (
lint,typecheck,test) - Open a Pull Request using the PR template
- Link any related issues
- Wait for CI to pass and a review from a code owner
The main branch requires:
- All CI checks passing
- At least 1 approving review
- No force pushes
Use GitHub Issues with our templates:
- Bug Report — Include steps to reproduce, expected/actual behavior
- Feature Request — Describe the problem and proposed solution
When adding features, update the relevant docs:
- New API endpoints →
docs/api-endpoint-catalog.md - New database tables →
docs/DATABASE.md - Architecture changes →
docs/ARCHITECTURE.md - Security-relevant changes →
docs/SECURITY_CONTROLS.md - Secret additions/changes →
docs/SECRETS_MANAGEMENT.md - User-facing features →
CHANGELOG.md