diff --git a/docs/architecture/dependency-flow.md b/docs/architecture/dependency-flow.md index 6c1a94b..cbbb7ed 100644 --- a/docs/architecture/dependency-flow.md +++ b/docs/architecture/dependency-flow.md @@ -107,14 +107,20 @@ apps/web-next/src/server/bind-production.ts (bindAll) │ ↓ │ tracer + logger instances │ ↓ - ├─ bindProductionBlog(config, tracer, logger) + ├─ resolveEventsAndJobs* → IEventBus + IJobQueue (ADR-015) + │ production → PayloadJobsEventBus + PayloadJobQueue + │ dev-seed → InMemoryEventBus + InMemoryJobQueue + │ ↓ + ├─ bindProductionBlog(config, tracer, logger, bus, queue) │ │ │ ├─ blogContainer.bind(TRACER).toConstantValue(tracer) │ ├─ blogContainer.bind(LOGGER).toConstantValue(logger) │ ├─ ArticlesRepository(config, tracer, logger) → bound to IArticlesRepository │ │ (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 + │ ├─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol + │ ├─ // bus.subscribe(...) (ADR-015, gen event consume) + │ └─ // queue.register(...) in dev-seed; Payload task in prod │ └─ (same for auth, marketing-pages, navigation, media) ``` diff --git a/docs/architecture/vertical-feature-spec.md b/docs/architecture/vertical-feature-spec.md index 4a7ad98..b585a10 100644 --- a/docs/architecture/vertical-feature-spec.md +++ b/docs/architecture/vertical-feature-spec.md @@ -659,7 +659,6 @@ Big-bang refactor executed as 11 internal phases; each phase ends with a verific - Real Payload integration tests with a test database (stub with mock repos; write real integration tests later) - Coverage reporting aggregation across packages (initial vitest setup per-package; aggregation is a follow-up) - Multi-browser Playwright matrix (chromium only initially; add firefox/webkit later) -- Cross-feature events: shipped via `@repo/core-events` (ADR-015, 2026-05-08). Jobs: shipped via `@repo/core-shared/jobs` + Payload's job queue (same ADR). - Payload subscriptions / realtime (spec addendum v4); no feature requires it yet - CMS app Next.js 15.5 + Payload 3.81 stabilization concerns (recently patched; monitor; no specific action in this refactor) @@ -673,7 +672,7 @@ Big-bang refactor executed as 11 internal phases; each phase ends with a verific - `pnpm dev --filter @repo/web-tanstack` renders the same blog post using the same feature packages - Storybook builds showing `core-ui` primitives - Any deep import (e.g., `import x from '@repo/blog/src/...'`) fails `pnpm lint` -- Any cross-feature import fails `pnpm lint` +- Cross-feature imports are restricted to event contracts (ADR-015): the `feature` boundary tag accepts other `feature` tags, but rule E1 (`no-handler-reexport`) keeps consumer handlers, use cases, and repositories private. Importing a publisher's contract is allowed; importing anything else still fails `pnpm lint`. - Root `AGENTS.md` and one-per-package AGENTS.md reflect the new architecture - 9 new ADRs (5 existing maintained/appended/superseded + 4 new) - Zero references to deleted packages anywhere in the codebase