Aller au contenu

ADR 0002: One repository per part, in a GitLab sub-group

Ce contenu n’est pas encore disponible dans votre langue.

  • Status: accepted
  • Date: 2026-11-21

Pulse has three parts: a front end (Angular), a back end (Spring Boot) and the documentation (Starlight). How do we organize and name their repositories?

  • Each part can be built, tested and released on its own
  • The same structure works for the next projects (JobRadar, Sinistra)
  • A recruiter or a reviewer finds the code easily
  • The backlog stays in one place
  • Names follow known conventions

Organization:

  • One repository for all parts (monorepo): frontend/, backend/, docs/
  • One repository per part (polyrepo)
  • Hybrid: front end and back end together, documentation apart

Naming of the repositories (for the polyrepo option):

  • Layer first: bff-pulse, ffb-pulse
  • Product first: pulse-bff, pulse-web, pulse-docs
  • GitLab sub-group per product: pulse/bff, pulse/web, pulse/docs

Chosen option: “one repository per part, in a GitLab sub-group”, because each part gets its own pipeline and release, and the sub-group gives a clear structure that repeats for every product.

heimdall-groupe/
└── pulse/ sub-group
├── docs product repository: issues, milestones, board, charter, ADRs, architecture, review
├── bff back end (Spring Boot)
└── web front end (Angular)

The back end is named bff because it follows the Backend For Frontend pattern: it serves only the Pulse web application, and it aggregates and caches the external APIs (GitLab, Bordeaux open data, ISS position) for it.

  • Good: each repository has its own pipeline, version and release.
  • Good: the same structure for every product; paths are easy to read (gitlab.com/heimdall-groupe/pulse/bff).
  • Good: all issues stay in pulse/docs. Merge requests in bff and web reference them, for example Closes heimdall-groupe/pulse/docs#12.
  • Bad: a change of the API touches two repositories. Mitigation: the bff publishes an OpenAPI contract, and web follows it. A breaking change needs coordinated merge requests.
  • Bad: three pipelines to configure. Mitigation: shared jobs in ci-templates.
  • Good: one merge request for a change in both the front end and the back end.
  • Good: one pipeline, one link to share.
  • Bad: needs path-based CI rules (rules: changes:) to avoid building everything.
  • Bad: one version for all parts.
  • Good: independent pipelines and releases.
  • Good: close to the setup of companies with several teams.
  • Bad: API changes need coordination between repositories.
  • Bad: the documentation is separated from part of the code, which breaks the docs-as-code rule.

Naming: layer first (bff-pulse, ffb-pulse)

Section titled “Naming: layer first (bff-pulse, ffb-pulse)”
  • Good: groups repositories by type of component.
  • Bad: the parts of one product are spread across the list.
  • Bad: “FFB” (frontend for backend) is not a known term outside one company.

Naming: product first (pulse-bff, pulse-web)

Section titled “Naming: product first (pulse-bff, pulse-web)”
  • Good: the most common convention; groups repositories by product.
  • Bad: no product-level space for shared settings, boards or milestones.
  • Good: a real hierarchy per product, with product-level settings and boards.
  • Good: short repository names (bff, web, docs).
  • Bad: one more level in the paths.