docs(architecture): refresh containers + nx boundaries diagrams, add local-infra diagram #119
Reference in New Issue
Block a user
Delete Branch "docs/architecture-refresh-infra-diagram"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Dépoussiérage of
docs/architecture.mdafter the auth/session track and a new local-infra diagram.Fixed
portal-adminwas missing despite shipping in ADR-0020 and being scaffolded inapps/portal-admin. Added as a sibling SPA with its own session cookie (__Host-portal_admin_session), and the BFF box now distinguishes/api/*(end-user) from/api/admin/*(RBAC +@RequireMfa({ freshness: 600 })).shared-uiwas drawn underscope:portal-shell. The actual tag in libs/shared/ui/project.json:7 isscope:shared. Same forshared-state(which wasn't on the diagram at all). Both now live in thescope:sharedbubble.portal-adminwas absent. Added with its planned (dashed) edges to the shared libs and a note that noscope:portal-adminrow exists ineslint.config.mjsyet — that lands when admin modules grow real lib deps (follow-up).shared-tokens ⟶ shared-uiframed as "narrower scope", which doesn't apply (both arescope:shared/type:shared). Replaced with examples actually enforced bydepConstraints.Added
docker compose upactually starts: postgres / redis / otel-collector always up, plus opt-in profilesdbtools(pgweb),observability(Jaeger),serve-static(Caddy). Shows ports, named volumes, the bring-up cheat sheet, and the separate CI-runners stack (apf-portal-ci-runners, distinct network). Sources point straight at the compose files so a contributor can chase any detail in one click.Misc
squash[…]node (mermaid was rejecting unquoted parens inside the label).Test plan
pnpm exec prettier --check docs/architecture.md→ clean.:/(inside[]labels). Compose-side--profile Xonly appears inside"…"so it's safe.post-auth-track état-des-lieux of docs/architecture.md. three small lies caught, one diagram added. containers (§2): portal-admin (adr-0020) was missing from the c4 level-2 view despite being scaffolded under apps/portal-admin and shipping its own session cookie. added as a sibling spa on a distinct origin with its own session (__host-portal_admin_session), and the bff box now distinguishes /api/* (end-user) from /api/admin/* (rbac + @requiremfa). nx boundaries (§3): - shared-ui was drawn under scope:portal-shell. its actual tag in project.json is scope:shared. same for shared-state, which wasn't on the diagram at all. both moved to the scope:shared bubble. - portal-admin absent. added with planned (dashed) edges to the shared libs; no scope:portal-admin row exists yet in eslint.config.mjs, that's a follow-up when admin modules grow. - the "forbidden" examples framed shared-tokens ⟶ shared-ui as a narrower-scope violation. both are scope:shared / type:shared, so depConstraints actually permit it. replaced with examples that are genuinely lint-enforced. local dev infrastructure (§5, new): visualises what `docker compose up` starts: postgres + redis + otel-collector always-up, plus opt-in profiles dbtools (pgweb), observability (jaeger), serve-static (caddy per adr-0019). shows ports, named volumes, bring-up cheat sheet, and the separate ci-runners stack (apf-portal-ci-runners, dedicated network). source links point at the compose files so a contributor chases details in one click. to-be-added table: trace-context-propagation row updated — its trigger ("first observability instrumentation lands") was already met. now flagged as overdue / pending a follow-up. also carries the one-line mermaid syntax fix on §4's `squash` node (parens-inside-label needed quoting). pre-existing local edit.