IntraDotNet.CleanArchitecture is a framework designed to streamline the development of applications following Clean Architecture principles. Clean Architecture, popularised by Robert C. Martin, promotes the separation of concerns through distinct layers:
-
Domain Layer: Contains enterprise business rules, entities, and domain logic. This layer has no dependencies on external frameworks or libraries.
-
Application Layer: Defines application-specific business rules, business logic, use cases, and interfaces. It orchestrates the flow of data between the domain and outer layers e.g. Infrastructure (see below).
-
Infrastructure Layer: Implements external concerns such as data persistence, external APIs, and framework-specific code.
-
Presentation Layer: Handles user interface and API endpoints.
-
Dependency Inversion: Dependencies point inward. Inner layers define interfaces that outer layers implement.
-
Independence: The domain and application layers are independent of frameworks, UI, databases, and external agencies.
-
Testability: Business logic can be tested without UI, databases, or external dependencies.
While Clean Architecture provides excellent separation of concerns, it often comes with significant boilerplate such as code—repository patterns, CQRS implementations, validation pipelines, and mapping between layers. IntraDotNet.CleanArchitecture addresses this by providing:
- Pre-configured infrastructure components and base classes
- Reusable patterns for common scenarios (CQRS, validation, error handling)
- Convention-based configurations to minimise repetitive setup
- Streamlined integration with Entity Framework Core and other common dependencies
This project allows developers to focus on business logic rather than architectural plumbing, while still maintaining the benefits of Clean Architecture.
- Domain
- Application
- Infrastructure