Files
atomic-design-poc/docs/project/backlog/WP-51-openzaak-documenten.md
T
ehoandClaude Sonnet 5 e75550d136
CI / frontend (push) Successful in 2m10s
CI / backend (push) Failing after 59s
CI / e2e (push) Failing after 3m22s
CI / storybook-a11y (push) Failing after 7m23s
CI / semgrep (push) Successful in 1m3s
CI / api-client-drift (push) Successful in 1m55s
docs(backlog): mark WP-51 done
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 20:54:52 +02:00

1.8 KiB

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

Status: done (5807937) 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.