# ADR-002: Modular monolith with explicit ModuleContract

- Status: Accepted
- Date: 2026-07-04
- Traces: BRD §17.3, SR-FND-053, SR-MKT-001/002, NFR-MNT-02/03

## Context
Eight business modules must be independently enable-able per tenant/plan,
marketplace-extensible later, and extraction-ready — with a 7-FTE team
that cannot pay a microservices tax in v1.

## Decision
Single deployable Laravel app; modules under `app/Modules/<Name>` each
exposing one `ModuleContract` implementation registered in
config/modules.php. Cross-module interaction ONLY via (a) published data
contracts (read), (b) service interfaces (write), (c) domain events.
No cross-module Eloquent relationships or table joins in module code.
Entitlement service (SR-FND-050) gates registration per tenant.
Architectural tests assert the boundary (no `App\Modules\X` symbol usage
inside `App\Modules\Y`).

## Consequences
+ Marketplace/plugin model inherits the same contract surface.
+ Extraction path documented via DBD §5.3 FK register.
- Some duplication (DTOs at boundaries) accepted deliberately.
