Files
atomic-design-poc/docs/project/backlog/WP-51-openzaak-documenten.md
T
ehoandClaude Opus 4.8 1c3c195d32
CI / frontend (push) Successful in 2m59s
CI / backend (push) Successful in 1m27s
CI / semgrep (push) Successful in 58s
CI / e2e (push) Successful in 2m30s
CI / api-client-drift (push) Canceled after 1m14s
CI / storybook-a11y (push) Canceled after 29m8s
feat(backend): expand stamdata + OpenZaak-ready cases seam (WP-49)
Stamdata: add beroepen, opleidingen (temporal), and specialismen tables to the
schema-driven catalog (zero UI code). opleidingen.beroep and specialismen.beroep
both reference beroepen.code — the first stamdata->stamdata references, enforced by
two new StamdataRef entries in the CI gate.

OpenZaak/ZGW (WP-49, slice 1 — read-only zaken): introduce IZaakSource as the cases
read seam. Default LocalZaakSource reads the local SQLite store (offline); an
OpenZaakZaakSource (Zgw/ client: HS256 per-call JWT, ZGW->existing-DTO mapper,
paginating HTTP source) is selected behind Zgw:Enabled (default false). The FE never
changes — same ApplicationSummaryDto, no api-client drift. Unit-tested with fixtures
+ a stub HttpMessageHandler; no live OpenZaak needed.

Docs: ADR-0005, reference/openzaak-integration.md, WP-49..52 roadmap, stamdata.md
update, README index rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 15:01:06 +02:00

1.8 KiB

WP-51 — OpenZaak Documenten (DRC) upload + link

Status: todo Phase: 9 — OpenZaak / ZGW integration

Why

Uploaded documents currently persist as bytes in local SQLite (DocumentStore). To be production-ready they must live in OpenZaak's Documenten API (DRC) as enkelvoudiginformatieobjecten, linked to a Zaak via zaakinformatieobject — behind the same config gate, still without a FE contract change.

Read first

Decisions (pre-made, don't relitigate)

  • Introduce an IDocumentSource sibling of IZaakSource; local impl = DocumentStore, OpenZaak impl = DRC. FE upload DTOs unchanged.
  • A document needs an informatieobjecttype URL from Catalogi (like zaaktype for a zaak).
  • Upload → returns document URL → zaakinformatieobject links it to the zaak URL.

Files

  • Data/IDocumentSource.cs, Data/LocalDocumentSource.cs, Zgw/OpenZaakDocumentSource.cs
  • ZgwOptions: informatieobjecttype URL(s) + DrcBaseUrl.

Steps

  1. Abstract the upload/read/link paths behind IDocumentSource.
  2. OpenZaak impl: POST enkelvoudiginformatieobjecten (content), then POST zaakinformatieobjecten.
  3. Map DRC document metadata back into the existing document DTOs.

Acceptance criteria

  • With Zgw:Enabled=true, an upload lands in DRC and is linked to its zaak.
  • FE upload/list DTOs unchanged; no api-client drift.
  • Tests cover the DRC POST bodies + the zaak-link step (stub handler).

Verification

dotnet test; against a docker OpenZaak if available.

Out of scope

Notificaties (WP-52), content virus-scanning / blob-storage tuning.

Risks

Large file content over base64/multipart — mind memory; stream if needed.