Skip to content

Engineering Standards

Ankit Upadhyay edited this page Aug 25, 2026 · 2 revisions

Engineering Standards

Repository-wide quality standards. docs/engineering-standards.md is canonical; this page mirrors it and adds the cross-references.

Toolchain baseline

  • Node.js 22 - .nvmrc is the authoritative source for the Node version (the canonical doc above still says 20.x; the repo's .nvmrc wins)
  • pnpm workspace package manager (pnpm@8.15.6 — never npm/yarn)
  • Turborepo task orchestration

Pull request standard

  • Small, focused PRs with clear user impact.
  • Conventional commit format is mandatory; PR title follows <type>(<scope>): <subject> — see Contributing and Governance.
  • Every PR includes: a summary of changes, validation steps performed, and screenshots/video for UI changes.

Definition of Done

Before merging, changes should satisfy:

pnpm run lint
pnpm run type-check
pnpm run test
pnpm run build

...plus updated docs for any changed behavior, setup, or workflow, and a clean pre-push Sonar gate.

Testing expectations

  • Add or update tests for all behavioral changes.
  • Prefer fast, deterministic tests; don't merge known-flaky tests without a tracking issue.
  • Keep coverage reports available for Sonar analysis.
  • New code = new tests — any new file must hit ≥ 90% statements/branches/functions on first commit. The frontend carries a stricter ≥ 95% coverage mandate. Full matrix and per-artifact test requirements: Testing Strategy.

Security expectations

  • Never commit secrets or production credentials; use .env.example/template files.
  • Suspected secret leak → rotate immediately, then follow the SECURITY.md process.
  • Prefer secure defaults and explicit validation at boundaries. See Security.

Documentation quality

  • Keep the root README.md, workspace READMEs, and this wiki accurate.
  • Avoid stale command names and outdated paths; keep docs opinionated and executable.
  • Behavior/contract change → update docs in the same PR.

Code quality conventions

  • Prefer strict typing; avoid any unless unavoidable. Keep PRs focused and reversible.
  • Never expose backend enums/acronyms in user-facing text (e.g. PAYMENT_AT_CLINIC, VET) — map to plain language before rendering. Don't use Actor as a UI label (prefer Lead, Support, or Updated by).
  • SonarQube rules are enforced on every PR — see Code Quality Gates.

AI / agent contributions

Follow AGENTS.md: state assumptions and unresolved risks, and never claim checks were run unless they were.

Related

Product & Domain
Architecture
Applications
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Roadmap
Operations
Meta

Canonical code & docs: main repo · Auto-generated companion: DeepWiki

Clone this wiki locally