Layered architecture
Presentation, application, domain and data access stacked so that each layer calls only the one beneath it.
A claims back office where the rules change constantly but the shape of the system does not. Business rules sit in one layer, so a regulatory change is an edit in one place rather than a search across the codebase.
- Dependencies point one way only. Enforce it with project references or an architecture test, not a code review.
- Cross layers with data, not entities. Map at the boundary so a column rename cannot reach the UI.
- No layer skipping. If presentation calls the repository directly, a use case is missing from the application layer.
- Transactions belong to the application layer. A repository that opens its own makes composition impossible.