Branches

All three repositories use the same model.
In the backend and the web app, a push to dev triggers the Build & deploy (DO) workflow, which builds a Docker image and rolls it out. The web image is built with the production web URL and the production API URL as build arguments. Treat a push to dev as a deployment. See Deploying the backend and Deploying the web app.

Working across repositories

  • Pull dev in the repository you are about to change before you start.
  • A feature that spans repositories needs one branch per repository. There is no shared commit.
  • Deploy order matters when a change spans the API and a client. Ship the backend first when the client depends on a new field or endpoint. Keep the API backward compatible for at least one mobile release, because trainees do not update their app on your schedule. See Release checklist.
  • Dependabot opens weekly pull requests against dev in the web repository. Major version updates are ignored by its config.

Commit messages

All three repositories enforce Conventional Commits with commitlint in the commit-msg hook. The config file is commitlint.config.cjs in each repository and extends @commitlint/config-conventional.

Rules

The backend and the mobile app only warn on subject case so that proper nouns such as NavBar or API are allowed at the start of a subject. The web app rejects them.

Examples

Other rules

  • Never add an AI attribution trailer such as Co-Authored-By for an assistant. This rule is written into the coding standards of all three repositories.
  • The backend bans the em dash character (U+2014) in source, JSON, Markdown and YAML. A commit that adds one fails ESLint. Write the subject with plain punctuation.
  • Do not bypass hooks with --no-verify. If a hook is wrong, fix the hook in a chore(ci) commit.

Pull requests

  • Target dev.
  • CI must be green. See CI and Git hooks for what runs.
  • Mention any database migration in the description, with its folder name, and say whether it has been applied to the shared database. See Database migrations.
  • Mention any new native module in a mobile pull request. It changes how over-the-air updates must be handled. See OTA updates.