Coding Convention

Owner: Engineering
Reviewers: Tech Leads
Status: Draft
Version: 0.1
Last Updated: 2026-09-16
Review Cycle: Per framework/version change

Backend

  • Use NestJS module/controller/service/use-case patterns already present in backend/.
  • Keep DTO validation and Swagger metadata updated.
  • Use Prisma as the database access layer.
  • Add focused Jest specs for business logic and permission behavior.

Web

  • Follow ../current/conventions/web-coding-conventions.md.
  • Use feature-oriented pages, shared services/hooks and existing app-shell patterns.
  • Use Ant Design/Tailwind/Sass patterns already in the codebase.

Mobile

  • Follow ../current/conventions/mobile-coding-conventions.md.
  • Use role navigation patterns already present in the Expo app.
  • Keep API services separate from screen rendering logic.

Formatting

Use package scripts:

  • Backend: npm run format, npm run lint.
  • Web: npm run format, npm run lint.
  • Mobile: npm run format, npm run lint, npm run typecheck.