Data and business rules
The schema is designed before the endpoints. Relationships, uniqueness, and state transitions are enforced in the database and the service layer, so invalid data cannot enter through a second path.
Migrations are versioned and reversible. Reporting needs are considered early, because a model that suits the form but not the report becomes expensive later.
- Typed access layer and explicit transaction boundaries
- Validation at the edge and in the domain layer
- Indexes chosen for real query patterns
- Audit trails for changes that need to be traceable