7d56802e1d581585ec643f6046d86ef5170f73fc
PR 3 of the charts chantier — closes the loop on ADR-0023 by wiring the three starter components from #171 onto the /audit page. Three computed signals derive aggregations from the *current page's* items (no new BFF endpoint — server-side stats land separately if ever needed): * `dailyVolume` — events grouped by ISO date (YYYY-MM-DD). * `outcomeBreakdown` — counts per outcome. * `dailyByEventType` — flat (day, eventType, count) triples. A new `<section class="charts">` renders above the existing filter form, behind a `hasChartData()` guard so the section disappears entirely on empty pages (no "0 events" donut, no half-rendered bars). Each chart sits in a `.chart-tile`; the stacked-bar gets `.chart-tile--wide` to span both grid columns since its legend benefits from the extra horizontal space. A `.charts-note` paragraph above the grid says explicitly that the aggregations are "computed from the events currently loaded on this page only" — honest disclosure of the per-page scope, no misleading "all-time" framing. Captions / descriptions / aria-labels live in plain English in the template per ADR-0020's source-locale-only chrome posture. No new i18n strings. Bundle impact: the lazy `audit` chunk grows from ~4.4 KB to ~84 KB gzip with the chart deps loaded — comfortable under [ADR-0017]'s 100 KB cap. The estimate in ADR-0023 was ~65 KB; Plot's full mark set + d3-scale-chromatic interpolators add a bit more than projected but still fit the budget. Side tweaks: * `apps/portal-admin/project.json` bumps the `anyComponentStyle` budget from 5/6 KB to 6/8 KB to accommodate the charts grid SCSS (audit.scss lands at ~6.5 KB). * `apps/portal-admin/tsconfig.app.json` references the new `libs/shared/charts/tsconfig.lib.json` (auto-added by `nx sync` after the import in audit.ts). Verification: * 57 portal-admin specs pass (was 54; +3 for the charts section rendering, the empty-page hide guard, and the donut center label binding). * `pnpm nx run-many -t lint test build --projects=portal-shell, portal-admin,shared-charts` — green. * Audit chunk gzip = 84 KB, under the budget.
Documentation index
This is the entry point to all project documentation. It is maintained automatically: any addition, rename, or removal of a .md file under docs/ must be reflected here in the same change.
Conventions
- Documentation is written in English.
- One topic per file. Group related files into a folder when there are three or more.
- Cross-reference with relative links so they keep working in GitHub, IDEs, and exported sites.
- For architectural decisions, do not add them here — they belong in decisions/ as MADR 4.0.0 ADRs.
Sections
Daily development
- development.md — repo layout, prerequisites, initial setup, daily commands, observability dev-loop (Jaeger UI, log ↔ trace correlation), dependency updates (Renovate), conventional commit cycle. Day-to-day reference for working on the project.
Architecture
- architecture.md — cross-cutting Mermaid diagrams: C4 system context, C4 containers, Nx module boundaries, CI/CD pipeline. Single-decision diagrams (auth sequence, ERD, etc.) live inline in their ADR.
Onboarding & environment
Setup guides for new contributors:
- setup/01-wsl-terminal-setup.md — modern WSL terminal (Zsh + Powerlevel10k + CLI tools)
- setup/02-dev-web-stack.md — Node via nvm, pnpm via corepack, Docker
- setup/03-angular-nx-monorepo.md — Angular + Nx monorepo bootstrap
Operations & runbooks
Empty — to be populated when we deploy.
Security, performance, accessibility
Empty — placeholders to be filled with rationale docs alongside their corresponding ADRs.
Description
Languages
TypeScript
85.3%
JavaScript
5.4%
SCSS
4.3%
HTML
3.9%
Shell
0.8%
Other
0.3%