ADR 0001: Modular monolith first

Status: Accepted

Date: 2026-07-19

Context

We need a reusable platform foundation. Microservices multiply deployment and distributed-transaction cost before module boundaries are proven.

Decision

One API process and one worker process host all domain modules behind the module SDK. Extraction of a module into a separate service is allowed only when load, release independence, data residency, or failure isolation justifies it, and must not change the module's public contract (commands, queries, events).

Consequences

  • Single deployment unit; simple local development.
  • Module boundaries enforced by tests/architecture/boundaries.test.ts (import rules) and the manifest capability system, not by the network.
  • Cross-module collaboration only via public service contracts or integration events through the outbox.