Files
register-referentie/docs/architecture/fds/adr/0001-acl-at-every-register-boundary.md
T
eho 321ee50dcb
CI / build (push) Successful in 1m36s
CI / lint (push) Successful in 1m45s
CI / unit (push) Successful in 2m1s
CI / frontend (push) Successful in 3m30s
CI / mutation (push) Successful in 8m4s
CI / verify-stack (push) Successful in 9m25s
docs(architecture): import the FDS architecture decisions from the lab repo (closes #159) (#160)
## What & why

Brings the engineer-facing FDS documentation next to the code it describes. Imported from `projects/open-register-fd/` in `Respellion/innovation-lab` and translated to Dutch: **six ADRs**, the ADR index and template, the **L3 component view**, and the **slice-1 proposal**.

The architecture blueprint, the FDS gap analysis and the two privacy views stay in the lab repo — the OKRs cite them and they feed tender responses. Each side names the split in a "Wat ligt waar" table, so nothing is documented twice.

Closes #159

### Why `docs/architecture/fds/` and not `docs/architecture/`

This repo's own ADR series now runs `adr-0001-loose-coupling` … `adr-0010-bff-oidc`. The imported set is numbered 0001–0006, so a flat import would collide across the whole imported range. The subfolder preserves the imported numbering, and with it roughly thirty `ADR-000N` cross-references inside the imported text that would otherwise all need rewriting.

In the MkDocs sidebar the imported six appear as **FDS ADR-000N** so they are not confused with this repo's series. `docs/architecture/fds/README.md` explains the two series.

### Mermaid support was missing

`pymdownx.superfences` had no `custom_fences`, so the imported diagrams would have published to Gitea Pages as raw code blocks. This PR adds the mermaid custom fence, the nav group, and one link under *Where to go* in the docs index.

## Definition of Done

- [x] Linked Gitea issue (above).
- [ ] Failing test committed before the implementation. — n/a, documentation only.
- [ ] Implementation makes the test pass. — n/a, documentation only.
- [x] Conventional Commits referencing the issue (`refs #159`).
- [x] Rebased on current `main`; no conflicts.
- [ ] CI green — n/a for content; the docs verification is below.
- [ ] `docker compose up` reaches green health checks. — n/a, no runtime change.
- [x] Docs updated if behaviour, contracts, or operations changed.
- [x] ADR added in `docs/architecture/` if a non-obvious decision was made. — six imported, plus the numbering decision recorded in the folder README.
- [ ] Demo note in `docs/demo-script.md`. — n/a, nothing user-visible.

## Verification run

- `mkdocs build` — clean. No missing-nav warning for any `architecture/fds/` entry. The two remaining warnings are pre-existing on `main` and untouched here: the set of pages absent from `nav`, and a broken link in `runbooks/ci.md` to `services/acl/stryker-config.json`.
- Mermaid renders as a diagram, not a code block: `site/architecture/fds/c4-component-view/index.html` contains `class="mermaid"`.
- All relative markdown links in the repo resolve.

## Notes for reviewers

- **Language.** The imported documents are Dutch; this repo's own documents remain English. Deliberate, not an oversight — the lab repo standardised on Dutch and these pages moved with it. Translating the rest is a separate decision.
- **Ownership.** This repo sits in the `eho/` namespace while it now holds the canonical FDS architecture decisions that tender answers point at. Worth deciding whether it should move to `Respellion/`.
- **Scope drift, not fixed here.** The imported text is faithful to its source, so the slice-1 proposal and the ADRs assume NHR/KVK for slice 1, while the lab-side blueprint still uses BAG as its example register. The lab-side documents carry a banner about this; Blueprint v2 (slice 5) is where the diagrams get corrected.
- **Companion PR:** `Respellion/innovation-lab` #34 holds the lab-side half of this split.Reviewed-on: #160
2026-09-03 12:35:01 +00:00

1.9 KiB

ADR-0001: Anti-Corruption Layer op elke registergrens

  • Status: accepted
  • Datum: 2026-06-13
  • Deciders: Lab Circle (Build, Lead Link)
  • Vervangt / vervangen door:

Context

De applicatie bevraagt meerdere registers: BRP, NHR/KVK, en ZGW via OpenZaak. Hun vocabulaires en schema's verschillen van elkaar en van ons domein. Zij veranderen ook zelf mee met de FDS-standaarden.

Lekt registervocabulaire het domeinmodel in, dan werkt elke wijziging aan de registerzijde door in de bedrijfslogica. Het domein wordt dan een lappendeken van vreemde begrippen in plaats van ubiquitous language.

Besluit

Elk register is bereikbaar via een Anti-Corruption Layer: één adapter per register, die een port vervult die het domein definieert.

Adapters doen alleen vertalen en velden versmallen. Zij bevatten geen bedrijfslogica. Het domein spreekt Persoon en Organisatie, en nooit veldnamen uit BRP of NHR.

Gevolgen

Positief: verloop in registers en FDS-standaarden blijft bij de adapter. Het domein blijft stabiel en testbaar. Adapters zijn onafhankelijk vervangbaar, en dat is precies wat de FSC-wissel uit ADR-0002 goedkoop maakt. Het patroon generaliseert naar een herbruikbare ACL-template per register, een Foundations-kandidaat.

Negatief en kosten: één vertaalmap per register om te schrijven en te onderhouden, plus een extra indirectie die engineers moeten respecteren in plaats van omzeilen.

Vervolgwerk: extraheer de ACL-template zodra de tweede adapter bestaat (slice 3).

Overwogen alternatieven

  • Registers direct aanroepen uit de applicatieservices — afgewezen: dit koppelt bedrijfscode aan registerschema's en aan versies van FDS-standaarden.
  • Eén generieke registeradapter — afgewezen: registers verschillen genoeg dat een generieke abstractie zou gaan lekken of opzwellen. Adapters per register zijn duidelijker.