docs: cite symbols, not lines, in ARCHITECTURE 6a (RD-31)
Section 6a cited line numbers and two paths from before the monorepo split (WP-67). A line number goes stale on the next edit; a symbol survives it. Replace every L<n> citation in the section with the named symbol, fix the two dead paths (environment.ts now lives under libs/shared, proxy.conf.json is now one file per app), and point the read walkthrough at mijn-registratie.section.ts, where the RD-03 split moved the dashboard's <app-async> block. Mark RD-31 done and update its README row. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -571,27 +571,34 @@ no longer hand-written DTOs — it's an **NSwag-generated typed client**
|
||||
|
||||
- **Proxy.** The app uses a relative base URL (`apiBaseUrl: ''`), so `/api` calls are
|
||||
same-origin and `ng serve` proxies them to the backend on `:5000`.
|
||||
([`environment.ts`](../../../src/environments/environment.ts),
|
||||
[`proxy.conf.json`](../../../proxy.conf.json)). Under `docker compose up` the app is served
|
||||
localized (both locales) by `scripts/serve-i18n.mjs`, which proxies `/api` to the `api`
|
||||
container itself (`API_PROXY_TARGET`).
|
||||
([`environment.ts`](../../../libs/shared/src/environments/environment.ts),
|
||||
[`proxy.conf.json`](../../../apps/ssp/proxy.conf.json)). Each app carries its own
|
||||
`proxy.conf.json` — `apps/ssp` and
|
||||
[`apps/behandelportal`](../../../apps/behandelportal/proxy.conf.json) — and both point at
|
||||
`http://localhost:5000`. Under `docker compose up` the app is served localized (both
|
||||
locales) by `scripts/serve-i18n.mjs`, which proxies `/api` to the `api` container itself
|
||||
(`API_PROXY_TARGET`).
|
||||
- **Client → HttpClient seam.** The NSwag client's `fetch` is routed through Angular's
|
||||
`HttpClient` by `httpClientFetch` — the one place cross-cutting concerns live:
|
||||
`X-Correlation-Id` on every call, `Idempotency-Key` on non-GETs, a 10 s timeout, and
|
||||
GET-only retry. Routing through `HttpClient` is exactly what lets the interceptors see API
|
||||
traffic. ([`api-client.provider.ts`](../../../libs/shared/src/infrastructure/api-client.provider.ts):
|
||||
`httpClientFetch` L47-82, `provideApiClient` L86-92; registered in
|
||||
[`app.config.ts`](../../../apps/ssp/src/app/app.config.ts) L37.)
|
||||
`httpClientFetch`, `provideApiClient`; registered in
|
||||
[`app.config.ts`](../../../apps/ssp/src/app/app.config.ts): `provideApiClient()`.)
|
||||
- **Interceptors (dev-only, stripped in prod).** `scenario.interceptor.ts` (the `?scenario=`
|
||||
toggle) and `role.interceptor.ts` (`X-Role` on role-aware endpoints).
|
||||
|
||||
**A read (dashboard):** `<app-async [data]="store.profile()">` →
|
||||
**A read (dashboard):** `<app-async [data]="store.profile()">` in
|
||||
[`mijn-registratie.section.ts`](../../../apps/ssp/src/app/registratie/ui/dashboard/mijn-registratie.section.ts)
|
||||
(`MijnRegistratieSection`) →
|
||||
[`BigProfileStore`](../../../apps/ssp/src/app/registratie/application/big-profile.store.ts) →
|
||||
`DashboardViewAdapter.dashboardViewResource()` = `resource({ loader: () =>
|
||||
client.dashboardView() })`
|
||||
([`dashboard-view.adapter.ts`](../../../apps/ssp/src/app/registratie/infrastructure/dashboard-view.adapter.ts))
|
||||
→ GET `/api/v1/dashboard-view` → `httpClientFetch` → proxy → backend → back through the
|
||||
`parseDashboardView(json): Result` trust boundary → `RemoteData<DashboardView>` → rendered.
|
||||
[`wat-moet-ik-regelen.section.ts`](../../../apps/ssp/src/app/registratie/ui/dashboard/wat-moet-ik-regelen.section.ts)
|
||||
reads the same store.
|
||||
|
||||
**A write (change address):** the `Submitting` effect (§2d) → `createSubmitChangeRequest`
|
||||
([`submit-change-request.ts`](../../../apps/ssp/src/app/registratie/application/submit-change-request.ts))
|
||||
@@ -603,8 +610,8 @@ ProblemDetails → string ([`submit.ts`](../../../libs/shared/src/application/su
|
||||
|
||||
**Backend.** A single minimal-API host computes business decisions server-side (BFF-lite),
|
||||
returns ProblemDetails on rule rejection, and dedupes replays via `Idempotency-Key`
|
||||
([`Program.cs`](../../../backend/src/BigRegister.Api/Program.cs): `/dashboard-view` L80,
|
||||
`/change-requests` L120).
|
||||
([`Program.cs`](../../../backend/src/BigRegister.Api/Program.cs): `api.MapGet("/dashboard-view")`,
|
||||
`api.MapPost("/change-requests")`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user