docs(architecture): surface core-audit + DPA across architecture docs
Touches the deeper architecture surfaces the Phase 6 sweep skipped: - overview.md: split must-have (core-shared, core-cms, core-api) from optional (core-trpc, core-ui, core-realtime, core-events, core-audit); add core-audit to the Five tags optional list - dependency-flow.md: extend the bindAll diagram with resolveAudit; add auditLog row to the BindContext table; rename the TRACER/LOGGER/METRICS heading to include AUDIT (ADR-018); note the R52-style boundary rule for @repo/core-audit (consume via protocol) - vertical-feature-spec.md: target-state section now states 3 must-have + 5 optional cores; tag matrix includes the optional cores; bind- production signature destructure includes auditLog - di-explainer.html: §08 instrumentation gains an IAuditLog block + the Wiring path tree shows resolveAudit + auditLog in ctx - testing-strategy.md: RecordingAuditLog reference + reset() guidance
This commit is contained in:
@@ -6,12 +6,19 @@ A vertical-feature monorepo. Business capabilities are top-level packages; non-b
|
||||
|
||||
```
|
||||
packages/
|
||||
# Foundation (no business logic)
|
||||
core-shared/ Generic primitives — Payload field/block helpers, tRPC init/context, lib utilities
|
||||
# Must-have foundation (no business logic)
|
||||
core-shared/ Generic primitives — Payload field/block helpers, tRPC init/context,
|
||||
instrumentation interfaces, audit protocol + truncate-ip + AuditEntry shape,
|
||||
BindContext + protocol types for optional cross-cutting cores
|
||||
core-cms/ Composition only: assembles feature CMS exports into one Payload config
|
||||
core-api/ Composition only: aggregates feature tRPC routers into one appRouter
|
||||
|
||||
# Optional cross-cutting cores (scaffold on demand via `pnpm turbo gen core-package <name>`)
|
||||
core-trpc/ Frontend tRPC client + per-framework providers (Next.js, TanStack)
|
||||
core-ui/ Design-system primitives (atoms, molecules, generic organisms, templates)
|
||||
core-realtime/ Socket.IO server + broadcaster + handler registry (ADR-016)
|
||||
core-events/ In-memory + Payload-backed event bus + job queue (ADR-015)
|
||||
core-audit/ DPA-compliant audit logging — sinks, hook factories, eraseSubject (ADR-018)
|
||||
|
||||
# Business capabilities
|
||||
auth/ Users + sign-in/sign-up/sign-out + session/cookie domain
|
||||
@@ -25,6 +32,8 @@ packages/
|
||||
core-typescript/ Shared tsconfig + vitest base
|
||||
```
|
||||
|
||||
See `docs/architecture/template-tiers.md` for the must-have/optional split and the scaffold commands.
|
||||
|
||||
## Data flow
|
||||
|
||||
```
|
||||
@@ -95,7 +104,7 @@ The workspace is organized into five mutually exclusive tags:
|
||||
|
||||
- **app** (4 packages): `apps/cms`, `apps/web-next`, `apps/web-tanstack`, `apps/storybook`
|
||||
- **core-composition** (2 must-have): `packages/core-api`, `packages/core-cms`. Plus `packages/core-trpc` when scaffolded via `pnpm turbo gen core-package trpc` (optional).
|
||||
- **core** (1 must-have): `packages/core-shared`. Plus `packages/core-ui`, `packages/core-realtime`, `packages/core-events` when scaffolded via `pnpm turbo gen core-package <name>` (optional).
|
||||
- **core** (1 must-have): `packages/core-shared`. Plus `packages/core-ui`, `packages/core-realtime`, `packages/core-events`, `packages/core-audit` when scaffolded via `pnpm turbo gen core-package <name>` (optional).
|
||||
- **feature** (5 packages): `packages/auth`, `packages/blog`, `packages/media`, `packages/marketing-pages`, `packages/navigation`
|
||||
- **tooling** (2 packages): `packages/core-eslint`, `packages/core-typescript`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user