I'll map how Phase 13 (Change of Address) is implemented across domain, application, infrastructure, API, web, and tests.
[tool: update_current_step — Tool use: update_current_step]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 70 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 52 results in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 0 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-13-change-of-address.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/Features/ChangeOfAddress/ChangeOfAddressEndpoints.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressCase.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressCaseStatus.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/IChangeOfAddressCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Events/AddressChanged.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ChangeOfAddressCaseGuard.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ChangeOfAddressCaseAuthorization.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/DependencyInjection.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/DependencyInjection.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Configurations/ChangeOfAddressCaseConfiguration.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/ChangeOfAddressCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Migrations/20260709193137_Phase13ChangeOfAddress.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Events/AddressChangedNotificationHandler.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-14-passport-id-request.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseList.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Api/ChangeOfAddress/IChangeOfAddressApi.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/ChangeOfAddress/ChangeOfAddressCaseTests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/ChangeOfAddress/ChangeOfAddressTests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/ChangeOfAddressE2ETests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/OpenChangeOfAddressCase/OpenChangeOfAddre]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ConfirmAddressChange/ConfirmAddressChange]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/Features/ChangeOfAddress/OpenChangeOfAddressCase/OpenChangeOfAddressCaseEn]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 0 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressRules.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressCaseChecklist.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/GetChangeOfAddressCase/ChangeOfAddressCas]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressRejectionReason.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressCaseId.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressHouseholdMemberLink.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/RequestPoliceVerification/RequestPoliceVe]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Components/OpenChangeOfAddressDialog.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/MunicipalApiHostExtensions.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/OpenChangeOfAddressCase/OpenChangeOfAddre]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/DeclareNewAddress/DeclareNewAddressValida]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/VisitReason.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ListChangeOfAddressCases/ListChangeOfAddr]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ResolveRegisteredPerson/ResolveRegistered]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/AttachDocument/AttachDocumentHandler.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/AddressChangedEventDetails.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/VisitReasonLabels.cs]
[tool: run_terminal_command_v2 — Tool use: run_terminal_command_v2 • Run command: find /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress -type d -mindepth 1 -ma]
[tool: run_terminal_command_v2 — Tool use: run_terminal_command_v2 • Run command: find /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress -type f | sort]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/RejectChangeOfAddress/RejectChangeOfAddre]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/UpdateHouseholdForMove/UpdateHouseholdFor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/Features/ChangeOfAddress/ConfirmAddressChange/ConfirmAddressChangeEndpoint]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Api/ChangeOfAddress/ChangeOfAddressApiClient.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/ROADMAP.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/ChangeOfAddress/ChangeOfAddressCaseTests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/GetChangeOfAddressChecklist/ChangeOfAddre]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: update_current_step — Tool use: update_current_step]
Phase 13 — Change of Address: Implementation Summary
Phase 13 delivers a separate bounded context (ChangeOfAddress) modeled closely on BirthDeclaration (Phase 12) and Registration case locking (Phase 8.1) . Spec: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-13-change-of-address.md.
Architecture overview
code Copy code
Reception (VisitReason.ChangeOfAddress)
→ NR lookup dialog → OpenChangeOfAddressCase
→ Claim/lock → DeclareNewAddress → (optional) Police → Confirm
→ Person.UpdateDomicile + AddressChanged event → Outbound notifications
Cross-context reuse (not new aggregates):
Person, BelgianAddress, HousingSituation (Registration/Address)
PoliceVerificationRequest extended with nullable ChangeOfAddressCaseId
AdministrativeDocument extended with CreateForChangeOfAddressCase
OutboundNotification extended with CreateForChangeOfAddress
Shared UI: NationalRegisterSearchForm, CaseLockActions, RegistrationRoleGate
1. Domain layer
Namespace: SchaerbeekMunicipality.Domain.ChangeOfAddress
Path: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/
File Role ChangeOfAddressCase.csAggregate root — open, claim/lock, declare address, household, police, confirm/reject ChangeOfAddressCaseId.csStrongly typed ID (readonly record struct, New() / From(Guid)) ChangeOfAddressCaseStatus.csIntake → AwaitingPoliceVerification → UnderReview → Confirmed / RejectedChangeOfAddressRejectionReason.csInvalidAddress, NegativePoliceVerification, MissingDocumentation, OtherChangeOfAddressCaseChecklist.csOwned value object with internal mutators ChangeOfAddressRules.csStatic rules: Schaerbeek postal code (1030), tenant requires housing doc ChangeOfAddressHouseholdMemberLink.csChild entity for household delta AddressChangedEventDetails.csReturn type from ConfirmAddressChange IChangeOfAddressCaseRepository.csListAsync, GetByIdAsync, AddAsync, SaveChangesAsyncInvalidChangeOfAddressTransitionException.csDomain transition errors
Domain event (separate folder):
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Events/AddressChanged.cs — IDomainEvent record
Reused value objects/enums (not in ChangeOfAddress folder):
BelgianAddress, HousingSituation — Domain.Address / Domain.Registration
PersonId, OfficerId, AdministrativeDocumentId, PoliceVerificationRequestId
CaseClaimResult — claim/reclaim pattern from Registration
Key aggregate patterns:
Factory: ChangeOfAddressCase.Open(personId, previousAddress, openedAt) — auto-marks PersonIdentified
Locking: Claim, ReleaseLock, EnsureEditableBy (same as Birth/Registration)
Checklist-driven readiness: IsReadyForConfirmation property
Confirmation returns event details; does not mutate Person in aggregate (handler does that)
Person extension (Phase 13 migration):
Person.DomicileAddress + UpdateDomicile() — persisted on confirm
2. Application layer
Root: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/
Shared cross-slice services:
File Role ChangeOfAddressCaseAuthorization.csRole gates: Reception+Population can create ; Population only for list/view/edit/claim ChangeOfAddressCaseGuard.csLoads case + applies auth; GetForEditAsync / GetForViewAsync
15 vertical slices (folder = slice name):
Slice Handler Request/Response/Validator Notes OpenChangeOfAddressCase✓ OpenChangeOfAddressCaseRequest, Response, ValidatorNR required; snapshots previous address from Person.DomicileAddress or latest registration case ResolveRegisteredPerson✓ Request/Response inline in handler file NR search → registered PersonId ListChangeOfAddressCases✓ ChangeOfAddressCaseListItem in handler fileJoins person display name GetChangeOfAddressCase✓ ChangeOfAddressCaseDetailDto + nested DTOsFull detail incl. checklist flags, police status ClaimChangeOfAddressCase✓ Response in handler file ReleaseCaseLock✓ DeclareNewAddress✓ Request + DeclareNewAddressValidator Uses shared BelgianStreet() etc. validation extensions UpdateHouseholdForMove✓ Request + UpdateHouseholdForMoveValidator UpdateHouseholdForMove/UnlinkHouseholdMemberHandler✓ (separate handler, same folder) RequestPoliceVerification✓ RequestPoliceVerificationResponseCreates PoliceVerificationRequest.CreateForChangeOfAddressCase AttachDocument✓ AttachDocumentResponse in handlerDocumentType.RentalContractRemoveDocument✓ DownloadDocument✓ GetChangeOfAddressChecklist✓ ChangeOfAddressChecklistMapperMaps from detail DTO to checklist questions
Validators present: OpenChangeOfAddressCaseValidator, DeclareNewAddressValidator, UpdateHouseholdForMoveValidator, RejectChangeOfAddressValidator (co-located with Request types).
DI registration: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/DependencyInjection.cs (lines 147–164) — all handlers + auth/guard as scoped services.
Cross-feature integration:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/RecordPoliceResult/RecordPoliceResultHandler.cs — branches on ChangeOfAddressCaseId to call ApplyPoliceVerificationResult
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/ListPendingPoliceVerifications/ListPendingPoliceVerificationsHandler.cs — includes COA cases
3. Infrastructure
EF configuration:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Configurations/ChangeOfAddressCaseConfiguration.cs
Patterns:
Table: change_of_address_cases (snake_case)
Strongly typed ID conversions on all FK columns
Enums stored as strings (status, housing_situation, rejection_reason)
OwnsOne for Checklist, PreviousAddress, NewAddress
OwnsMany for HouseholdMemberLinks → table change_of_address_household_member_links
Field access mode for private collection backing field
Repository:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/ChangeOfAddressCaseRepository.cs
DbContext:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/MunicipalDbContext.cs — DbSet<ChangeOfAddressCase>
Migration:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Migrations/20260709193137_Phase13ChangeOfAddress.cs
Creates:
change_of_address_cases + household links table
persons.domicile_* columns
Nullable change_of_address_case_id on police_verification_requests, administrative_documents, outbound_notifications
Makes police_verification_requests.registration_case_id nullable
Related config updates:
PoliceVerificationRequestConfiguration.cs
AdministrativeDocumentConfiguration.cs
OutboundNotificationConfiguration.cs
Event handler:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Events/AddressChangedNotificationHandler.cs
→ creates Tax + Electoral roll stub notifications via OutboundNotification.CreateForChangeOfAddress
DI:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/DependencyInjection.cs — IChangeOfAddressCaseRepository, IAddressChangedHandler
4. API layer
Endpoint registration:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/Features/ChangeOfAddress/ChangeOfAddressEndpoints.cs
Wired in /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Api/MunicipalApiHostExtensions.cs via MapChangeOfAddressEndpoints().
Route group: /api/change-of-address
OpenAPI tag: "ChangeOfAddress"
Method Route Endpoint class GET /casesListChangeOfAddressCasesEndpointPOST /casesOpenChangeOfAddressCaseEndpoint → 201 CreatedPOST /resolve-personResolveRegisteredPersonEndpointGET /cases/{id:guid}GetChangeOfAddressCaseEndpointPOST /cases/{id}/claimClaimChangeOfAddressCaseEndpointPOST /cases/{id}/auto-claimAutoClaimChangeOfAddressCaseEndpointPOST /cases/{id}/release-lockReleaseCaseLockEndpointPOST /cases/{id}/new-addressDeclareNewAddressEndpointPOST /cases/{id}/householdUpdateHouseholdForMoveEndpointDELETE /cases/{id}/household/{personId}UnlinkHouseholdMemberEndpointPOST /cases/{id}/police-verificationRequestPoliceVerificationEndpointPOST /cases/{id}/documentsAttachDocumentEndpoint (.DisableAntiforgery())GET /cases/{id}/documents/{documentId}DownloadDocumentEndpointDELETE /cases/{id}/documents/{documentId}RemoveDocumentEndpointGET /cases/{id}/checklistGetChangeOfAddressChecklistEndpointPOST /cases/{id}/confirmConfirmAddressChangeEndpointPOST /cases/{id}/rejectRejectChangeOfAddressEndpoint
Endpoint pattern: static class with static Handle(...) method; injects Application handler + optional FluentValidation; maps InvalidChangeOfAddressTransitionException → HTTP 409.
DTOs live in Application , not Api — Api only has thin endpoint wrappers.
5. Web / Blazor
Pages:
Route File /change-of-address/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseList.razor/change-of-address/{CaseId:guid}/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor
Components:
File Role Components/OpenChangeOfAddressDialog.razorNR search → resolve person → open case (data-testid: nr-search-*, open-change-of-address-case) Components/ChangeOfAddressDecisionSection.razorChecklist + confirm/reject actions
BFF API client:
Interface: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Api/ChangeOfAddress/IChangeOfAddressApi.cs
Implementation: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Api/ChangeOfAddress/ChangeOfAddressApiClient.cs (BasePath = "/api/change-of-address")
Registered in /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Api/DependencyInjection.cs
Navigation:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Components/Layout/MainLayout.razor — nav item "Change of address" → /change-of-address
Role gate: RegistrationRoleGate with OfficerRole.PopulationOfficer
Reception routing (VisitReason integration):
Entry point Behavior NewCaseDialog.razorVisitReason.ChangeOfAddress → closes with NewCaseDialogResult(Guid.Empty, false, true)NewCaseDialogResult.csbool IsChangeOfAddress flag alongside IsBirthDeclarationRegistrationCaseList.razorIsChangeOfAddress → navigate to /change-of-address?open=newNewRegistrationCasePage.razorSame redirect for ChangeOfAddress visit reason List page ?open=new query param auto-opens OpenChangeOfAddressDialog
VisitReason enum: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/VisitReason.cs — ChangeOfAddress = 1
Labels: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/VisitReasonLabels.cs
Outbound notifications link-back:
OutboundNotificationsPage.razor routes ChangeOfAddress case type → /change-of-address/{id}
UI patterns reused from Registration/Birth:
CaseLockActions, CaseLockBar, AppCollapsibleSection, address form with street autocomplete
Detail page injects handlers and IChangeOfAddressApi (user actions via API client; initial load via handlers per Blazor EF concurrency rules)
6. Tests
Domain tests
Path: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/ChangeOfAddress/ChangeOfAddressCaseTests.cs
Test Coverage Open_SetsPersonIdentifiedAndIntakeStatusFactory + checklist DeclareNewAddress_InvalidPostalCode_ThrowsSchaerbeek-only rule ConfirmAddressChange_WhilePolicePending_ThrowsPolice gate HappyPath_OpenDeclareConfirmFull confirm path ApplyPoliceVerificationResult_Confirmed_MovesToUnderReviewPolice loop
Integration tests
Path: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/ChangeOfAddress/ChangeOfAddressTests.cs
Test Coverage Open_WithoutNationalRegisterNumber_ThrowsBusiness rule via handler HappyPath_OpenDeclareConfirm_UpdatesPersonDomicileEnd-to-end: open → claim → declare → confirm → Person.DomicileAddress updated
Uses MunicipalAppFactory, RegistrationTestHelpers.SetRole, seeded NR person (Jean Dupont).
BFF client smoke:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Api/BffApiClientTests.cs — registers IChangeOfAddressApi / ChangeOfAddressApiClient.
E2E tests
Path: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/ChangeOfAddressE2ETests.cs
Test Coverage PopulationOfficer_OpensChangeOfAddressCase_FromNationalRegisterSearchList → NR dialog → search "Dupont" → open case → detail page
Uses Playwright, data-testid selectors, MunicipalE2EFixture, E2ECaseSeeder.EnsureJeanDupontRegisteredAsync.
E2E docs: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/README.md
Naming conventions (template for Phase 14)
Layer Convention Phase 13 example Phase 14 (planned) Domain folder Domain/{BoundedContext}/ChangeOfAddress/IdentityDocuments/Aggregate {Name}CaseChangeOfAddressCaseDocumentRequestCaseID type {Name}CaseId record structChangeOfAddressCaseIdDocumentRequestCaseIdRepository I{Name}CaseRepositoryIChangeOfAddressCaseRepositoryIDocumentRequestCaseRepositoryException Invalid{Context}TransitionExceptionInvalidChangeOfAddressTransitionExceptionSame pattern Application Features/{Context}/{Slice}/ + {Slice}Handler15 slices ~8 slices per phase-14 doc Auth/Guard {Context}CaseAuthorization, {Context}CaseGuardAt feature root Same API Features/{Context}/{Slice}/{Slice}Endpoint.cs + {Context}Endpoints.cs/api/change-of-address/api/identity-documents (likely)Web pages /kebab-case routes under Features/{Context}/Pages//change-of-address/identity-documents/requestsBFF client I{Context}Api / {Context}ApiClientIChangeOfAddressApiIIdentityDocumentsApiMigration Phase{N}{FeatureName}Phase13ChangeOfAddressPhase14PassportIdRequestTables snake_case plural change_of_address_casesdocument_request_casesReception
Phase 14 planning notes (from contrast with Phase 13)
Phase 14 spec: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-14-passport-id-request.md
Copy from Phase 13:
Vertical slice layout (Domain → Application → Api → Web → Tests)
NR lookup / ResolveRegisteredPerson-style person resolution
Document attach/download/remove via AdministrativeDocument + IDocumentStorage
List + detail pages with status chips
NewCaseDialog reception routing pattern
Domain tests + integration happy path + one Playwright journey
Likely simplify vs Phase 13:
No police verification loop
No case locking (Phase 14 doc does not mention claim/release — decide whether to reuse Phase 8.1 pattern)
No checklist owned entity — simpler boolean flags (PhotoAttached, FeePaid) on aggregate
Linear status machine: Submitted → InProduction → ReadyForCollection → Issued / Cancelled
Read-only Person — no domicile mutation; terminal action sets IssuedDocumentNumber
No domain event / outbound notifications (unless you add stubs)
New pieces Phase 14 needs:
VisitReason enum extension (currently only FirstRegistration, ChangeOfAddress, EuCitizenRegistration, BirthDeclaration)
RequestType enum (Passport, IdentityCard, renewals)
Minor/parent validation rule (read household from Person)
Status advancement slice (AdvanceDocumentRequestStatus) instead of confirm/reject split
Phase 13 is the closest recent full-stack reference for Phase 14; BirthDeclaration is an alternative reference if you want the same locking/checklist/decision pattern without address/police complexity.