Clean Architecture
Easy to understand, easy to maintain, and easy to extend. With a focus on shipping solutions.
Clean Architecture: Focus on solving business problems, not plumbing infrastructure when maintaining complex projects.
Context
Components
| COMPONENT DEPENDENCY MATRIX | Component | Dependencies | Build Issues | Layer |
|---|---|---|---|---|
| Contact UI Table View | Contact DTO, Contact Actions | RSC/Client separation needed | UI | |
| Contact UI Details View | Contact DTO, Contact Entity | Type safety validation | UI | |
| Contact UI New | Contact Form, Contact Actions | Form validation integration | UI | |
| Contact UI Edit | Contact Form, Contact Actions, Contact DTO | State management complexity | UI | |
| Contact Form | Contact Validator, Contact Values | TanStack Form integration | UI | |
| Contact DTO | Contact Entity | Serialization boundaries | Application | |
| Contact Entity | Contact Schema | Domain validation | Domain | |
| Contact Service | Contact Repository Interface | Service layer abstraction | Application | |
| Contact Validator | Contact Schema, Contact Values | Zod schema integration | Domain | |
| Contact Actions | Contact Service, Contact DTO | Server action patterns | Application | |
| Contact Values | Contact Schema | Type inference | Domain | |
| Contact Repository | Contact Repository Interface, Contact Schema | Database integration | Infrastructure | |
| Contact Repository Interface | Contact Entity | Clean architecture boundaries | Domain | |
| Contact Schema | None (Pure domain) | DrizzleORM schema definition | Domain |
Definition
A domain-centric approach to organising dependencies and improve maintainability. Address fear to make changes.
Projects separated by concerns:
- UI
- Core
- Infrastructure
Libraries
- DotNet
- Automapper
- Mediator
- Dapper
- Entity Framework
- Swagger
- NSwagStudio