diff --git a/docs/architecture/dependency-flow.md b/docs/architecture/dependency-flow.md index cbbb7ed..2abc415 100644 --- a/docs/architecture/dependency-flow.md +++ b/docs/architecture/dependency-flow.md @@ -111,7 +111,11 @@ apps/web-next/src/server/bind-production.ts (bindAll) │ production → PayloadJobsEventBus + PayloadJobQueue │ dev-seed → InMemoryEventBus + InMemoryJobQueue │ ↓ - ├─ bindProductionBlog(config, tracer, logger, bus, queue) + ├─ resolveRealtime → IRealtimeBroadcaster + IRealtimeHandlerRegistry (ADR-016) + │ server.ts → SocketIORealtimeBroadcaster + RealtimeHandlerRegistry (passed in from server.ts) + │ page/test → InMemoryRealtimeBroadcaster + RealtimeHandlerRegistry (defaults) + │ ↓ + ├─ bindProductionBlog(config, tracer, logger, bus, queue, realtime, realtimeRegistry) │ │ │ ├─ blogContainer.bind(TRACER).toConstantValue(tracer) │ ├─ blogContainer.bind(LOGGER).toConstantValue(logger) @@ -119,8 +123,9 @@ apps/web-next/src/server/bind-production.ts (bindAll) │ │ (real repo: inline this.tracer.startSpan + this.logger.captureException per method) │ ├─ withSpan(tracer, ..., withCapture(logger, ..., useCase(deps))) → UseCase symbol │ ├─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol - │ ├─ // bus.subscribe(...) (ADR-015, gen event consume) - │ └─ // queue.register(...) in dev-seed; Payload task in prod + │ ├─ // bus.subscribe(...) (ADR-015, gen event consume) + │ ├─ // queue.register(...) in dev-seed; Payload task in prod + │ └─ // realtimeRegistry.register(...) (ADR-016, gen realtime handler) │ └─ (same for auth, marketing-pages, navigation, media) ``` diff --git a/docs/architecture/vertical-feature-spec.md b/docs/architecture/vertical-feature-spec.md index b585a10..372a1c0 100644 --- a/docs/architecture/vertical-feature-spec.md +++ b/docs/architecture/vertical-feature-spec.md @@ -257,7 +257,7 @@ packages/navigation/ index.ts ``` -Optional `events/`, `jobs/`, `integrations/cms/jobs/` directories (see ADR-015 and `docs/guides/events-and-jobs.md`); features may grow them on demand. The spec's canonical layout above remains correct as the minimum. +Optional `events/`, `jobs/`, `integrations/cms/jobs/` directories (see ADR-015 and `docs/guides/events-and-jobs.md`); optional `realtime/` and `realtime/handlers/` directories (see ADR-016 and `docs/guides/realtime.md`); features may grow any of them on demand. The spec's canonical layout above remains correct as the minimum. **Request flow:**