Files
carmanagement/docs/ops/phase4-module-boundaries.md
T
root 8fc88ffc14
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 51s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
fix production issues
2026-08-12 16:48:41 -04:00

1.6 KiB

Module boundaries for possible Phase 4 extracts

Purpose: Document current monolith seams so a future extract does not require archaeology. Not a license to split today (ADR-003).

Notification / jobs

Piece Path
Worker entry apps/api/src/workers/index.ts
Job loop apps/api/src/workers/jobs.ts
Outbox processing apps/api/src/services/notificationService (and related)
Compose api-worker in docker-compose*.yml

Seam: DB outbox + Redis pub for IN_APP. Extract later = move worker package + keep outbox schema shared or via events.

Payments / webhooks

Piece Path
Webhook router apps/api/src/modules/webhooks/
Payments apps/api/src/modules/payments/
Billing apps/api/src/modules/billing/
Subscriptions apps/api/src/modules/subscriptions/

Seam: Provider signature verify → idempotent intent/invoice update → outbox side effects. Extract later = webhook ingress service writing to the same billing tables or a command queue.

Media

Piece Path
Storage drivers apps/api/src/lib/storage
Upload HTTP apps/api/src/http/upload (and module callers)
Compose MinIO minio profile in dev compose

Seam: API accepts upload → stores object key → optional worker job for virus scan / derivatives. Extract later = media service owning bucket + callback to API.

Shared that must not fork casually

  • Prisma schema / migrations (packages/database)
  • Auth tokens / tenant companyId middleware
  • Plan catalog (packages/types planCatalog)