# ADR-0003: Clean architecture, manual composition root

# Context

The domain rules (member state machine, chain-context invariants, BVAD contents) must be testable and understandable without pulling in a DB, HTTP, or crypto library. Typical Node services mix all four, making unit tests flaky and future refactors hard.

# Decision

Adopt the classic four-layer split: domainapplicationinfrastructureinterface. Ports live in application/ports.ts; adapters implement them in infrastructure/. Composition happens in a single composition-root.ts per service. No DI framework.

# Consequences

# Alternatives considered