Commit Graph
20 Commits
Author SHA1 Message Date
ehoandClaude Haiku 4.5 ddec15ccb2 docs(architecture): add diagrams and implementation playbook
Added three new documents with nine Mermaid diagrams to make the strangler
fig strategy visible:

- README: container topology diagram at the start, with the proxy entry point
  and three seams labelled
- docs/architecture.md: five diagrams tracing the exact implementation:
  - The four seams and who holds authority at each boundary
  - How by-id read goes through the resolver, but list-read bypasses it
  - Case lifecycle state machine (the strategy in one picture)
  - Take-ownership sequence with failure windows annotated
  - Write-through error round-trip showing zero validation logic crossed
- docs/playbook.md: how to apply this to a production system:
  - Write-path decision tree (five read/write patterns)
  - Cutover ordering diagram (side-effects-free first, least recoverable last)
  - Seven transferable rules with pointers to the files that demonstrate them
  - Scope diagram of what's proven vs. left as your decisions

Resolved all 13 dangling § citations (to an absent spec doc) by linking to
the actual files or dropping them. Replaced portal-frontend/README.md
boilerplate with accurate content. All diagrams parse and link-check clean.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-01 09:15:39 +02:00
ehoandClaude Haiku 4.5 5f22156e6d feat(ownership): add take-ownership preflight endpoint
Enables dry-run checking before committing to case adoption. The preflight
shares the same side-effect-free checks (steps 1–3) as the real take-ownership
handler, so it cannot drift from what will actually succeed. Returns the same
status codes and error shapes as the real endpoint (200 with wouldSucceed:true,
or 409/404/422 if it would fail).

Portal renders a "Vooraf controleren" button for legacy cases, surfaced through
the existing actions block pattern. Confirmed in smoke.sh with two cases: one
where preflight predicts success (and writes nothing), one where it predicts
a named invariant failure (matching what the real call reproduces).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-01 09:15:18 +02:00
eho 19c010653a test: guard against the /portal redirect dropping the client-facing port
Would have caught the previous commit's bug: checks that GET /portal
(no trailing slash) 301s and that following the redirect actually
lands on a 200 on the same host:port, rather than only checking
/portal/ directly.
2026-07-31 09:35:02 +02:00
eho 46926215af fix(proxy): preserve the client-facing port in the /portal redirect
`return 301 /portal/` let nginx build the Location header from its
own internal `listen 80`, dropping the host's published port (e.g.
:8080) entirely - a browser hitting bare "http://host:8080/portal"
got redirected to "http://host/portal/" (port 80) and failed to
connect. Using $http_host keeps the port the client actually used.
2026-07-31 09:33:49 +02:00
eho ec965976b0 docs: document the Angular portal in README
Notes the /portal path, that it's kept alongside new-frontend rather
than replacing it, and updates the container count and click-through
intro accordingly.
2026-07-31 09:19:04 +02:00
eho a3ba1573e1 test: extend smoke.sh with portal-frontend checks
Container count is now 10; adds checks that /portal/ and a direct
deep link both serve the Angular app (200) through the proxy,
proving both the routing wiring and the container's SPA fallback.
Full smoke run verified green on a fresh stack.
2026-07-31 09:18:12 +02:00
eho 15b6397317 build: wire portal-frontend into proxy and docker-compose
Adds portal-frontend as a new service (no published port, only
reachable via the proxy, same as new-frontend) and two nginx location
blocks for /portal - a bare-path redirect plus the prefix-stripping
proxy_pass. The existing /, /legacy, and /api/ blocks are unchanged.

Verified end to end: /portal/, a deep link, and / all return 200
through the single published proxy port, and /api/worklist still
returns the full 17-item worklist.
2026-07-31 09:15:49 +02:00
eho 8a192578fa build(portal-frontend): add Dockerfile and SPA nginx config
Multi-stage: node build with --base-href=/portal/, then nginx:alpine
serving the compiled dist with try_files SPA fallback for client-side
routes (e.g. a direct hit on /legacy/1001). Verified standalone: root
and a deep link both 200, base href correct.
2026-07-31 09:13:08 +02:00
eho c2d0ba9a3d feat(portal-frontend): implement take-ownership and release-ownership actions
Take-ownership keeps the placeholder's confirm() dialog before this
one-way per-case migration step, then navigates straight to the new
owned detail on success (201). Release-ownership navigates back to
the worklist on success (204), no confirm dialog. Both surface 422
InvariantViolationResponse / 409 MessageResponse verbatim in a banner
rather than a curated client-side message.
2026-07-31 09:10:37 +02:00
eho 3b04c9fae3 feat(portal-frontend): implement record-assessment form and closurePending display
Owned-mode form embedded in case-actions where the redirect link
isn't used. verifiedItems is comma-split client-side for convenience
only; the server re-validates everything regardless. closurePending
renders as a neutral success note (ADR-001), never as an error. 422
InvariantViolationResponse surfaces invariant+message verbatim in a
banner, matching the edit-details form's approach.
2026-07-31 09:08:22 +02:00
eho 9e031da724 feat(portal-frontend): implement edit-applicant-details form with write-through disclaimer
Shared form for writeThrough and owned modes. Shows the ADR-002
disclaimer only in writeThrough mode (no client-side validation
stricter than legacy provides). Maps 400 ErrorsResponse to per-field
inline errors, 422/409 to a banner with the server's own text -
never a client-side switch over invariant names. Embedded in
case-detail with reload() on save so the actions block refreshes.
2026-07-31 08:59:55 +02:00
eho cebbf9f57a feat(portal-frontend): implement case-detail read view
Resolves legacy/:id vs owned/:id off the matched route's static path
segment and fetches accordingly. Renders applicant, diploma, and
assessment fields, a seams panel (which backend serves each section),
and embeds app-case-actions. Read-only - write forms land next.
2026-07-31 08:53:17 +02:00
eho 08e08a0070 feat(portal-frontend): implement worklist-list component
Table of WorklistService results with bucket/origin/search filters
(FormsModule ngModel); row click navigates to legacy/:id or owned/:id
based on origin, matching the placeholder's key scheme.
2026-07-31 08:50:56 +02:00
eho 97c0bea238 feat(portal-frontend): implement case-actions component
Renders record-assessment as a link only in redirect mode (otherwise
a form-trigger slot, filled in once record-assessment-form exists),
and take-ownership/release-ownership buttons purely off presence of
their optional action key. Emits requests upward rather than calling
the API itself - the actual take/release-ownership handling lands in
a later commit.
2026-07-31 08:49:29 +02:00
eho 754086226b test(portal-frontend): add failing spec for case-actions mode-driven rendering
Red: case-actions has no template yet. Encodes the legacy-vs-owned
actions contract from CaseDetailResponseFactory - record-assessment
renders as a link only in redirect mode, take/release-ownership
buttons follow presence of their optional action key.
2026-07-31 08:48:41 +02:00
eho 3ed130de25 feat(portal-frontend): add router with worklist and case-detail routes
Empty placeholder components for worklist-list and case-detail,
wired into app.routes.ts (legacy/:id and owned/:id share one page
component since the rendered shape is identical). Replaces the CLI
welcome template with a minimal shell rendering <router-outlet>.
2026-07-31 08:47:13 +02:00
eho b8a8d28e7b feat(portal-frontend): add worklist and case-detail typed interfaces and API services
Types mirror New.Api.Contracts verbatim; all write calls use the href
given in a case's actions block rather than a client-built URL.
2026-07-31 08:45:27 +02:00
eho 229ca9b7d9 chore(portal-frontend): scaffold Angular workspace
Raw `ng new` output for the Session-2 Angular portal, reachable at
/portal alongside the existing new-frontend placeholder.
2026-07-31 08:44:03 +02:00
ehoandClaude Sonnet 5 a6a1abbe9c feat: implement strangler-fig-demo Session 1 (backend + smoke script)
Builds the four-seam, three-write-path reference demo backend: case-framework
(seam D stand-in), legacy-backend/frontend (SQL Server, seams A/B/C targets),
and new-backend (Domain/Application/Infrastructure.*/Api implementing the
source resolver, take/release-ownership, write-through translator, and owned
assessment flow), wired together via docker-compose with a plain placeholder
frontend standing in for the Angular portal until Session 2.

All 11 Architecture.Tests pass and scripts/smoke.sh passes end-to-end against
a fresh `docker compose up`, covering acceptance criteria 1-3 and 7-22.

Fixes two real domain bugs found only once the stack ran for real: the BSN
eleven-proof checksum trivially passes all-zero digits, and the adoption
mapper silently treated a partial legacy address as absent instead of failing
loudly. Also fixes several environment-specific integration issues (rootless
Podman/SELinux bind-mount permissions, a buildah NuGet layer-caching bug,
SqlClient's invariant-globalization incompatibility, and an nginx path-prefix
mismatch for the legacy frontend).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 07:57:26 +02:00
eho 09b27173a7 chore: add development conventions and model-routing config
Documents TDD/BDD/DDD methodology and Conventional Commits in CLAUDE.md,
and adds Claude Code model-switching setup (haiku/opus subagents, sonnet default).
2026-07-30 17:49:14 +02:00