Thank you for your interest in contributing. We welcome contributions that help improve the service for NHS patients and staff.
We follow the Gitflow workflow. Please ensure your work is branched correctly:
main: Contains production-ready code. No direct commits.develop: The main integration branch for features. All PRs for new features should target this branch.feature/: Used for new features. Branch off fromdevelopand merge back intodevelop.release/: Used for preparing a new production release. Branch off fromdevelopand merge into bothmainanddevelop.hotfix/: Used for urgent production fixes. Branch off frommainand merge into bothmainanddevelop.
feature/HOTE-[JIRA-ID]-short-descriptionhotfix/HOTE-[JIRA-ID]-short-description
Most of the checks are run using pre-commit check ../.pre-commit-config.yaml for more details.
You can enable automatic pre-commit run as pre-commit hook, just execute pre-commit install, if you want to trigger that manually just run pre-commit run --all-files --show-diff-on-failure or mise run pre-commit.
We use several scripts to maintain code quality, which are also run in our CI pipeline. You can run these locally before pushing:
- File Formatting:
./scripts/githooks/check-file-format.sh - Markdown Linting:
./scripts/githooks/check-markdown-format.sh - Secret Scanning:
./scripts/githooks/scan-secrets.sh(Requiresgitleaks) - Inclusive Language:
./scripts/githooks/check-english-usage.sh
- Frontend: Follow Next.js best practices in
/frontend. - Lambdas: Use strict TypeScript typing in
/lambdas. - Infrastructure: All AWS changes must be defined in
infra/using CDK. - API Specs: Updates to
architecture/api_spec.yamlmust maintain FHIR compliance.
- Target Branch: Ensure your PR targets
develop(unless it is a productionhotfix). - Update Documentation: Update
/docsor/architectureif system behavior changes. - Tests: Include tests in
/testsfor all new logic. - CI Status: Your PR must pass all checks before it can be merged.
All contributions must adhere to the NHS Service Manual and Accessibility Standards.