A professional Web API project built using Clean Architecture, .NET 8, Entity Framework Core, CQRS, Dependency Injection, and proper domain-driven structure.
This repository is designed as a portfolio-grade backend project showing best practices used in modern .NET development.
- .NET 8
- C#
- Clean Architecture
- CQRS + MediatR
- Entity Framework Core
- SQL Server / LocalDB
- FluentValidation (si lo agregas más adelante)
- Swagger / OpenAPI
- Dependency Injection
- Repository Pattern
- Domain-Driven Design (DDD) principles
CleanArch/
│── CleanArch.Api/ → Presentation layer (controllers, DTOs, swagger)
│── CleanArch.Application/ → Use cases, CQRS, DTOs, validation
│── CleanArch.Domain/ → Entities, enums, interfaces, core logic
│── CleanArch.Infrastructure/→ EF Core, repositories, persistence
- Fully structured Clean Architecture
- REST API with CRUD operations
- DTO validation
- Repository pattern
- EF Core with migrations
- Dependency Injection everywhere
- Swagger UI
- Async/Await all the way
- Extensible and production-ready
dotnet restoredotnet ef database update --project CleanArch.Infrastructuredotnet run --project CleanArch.ApiAPI available at:
https://localhost:5001
http://localhost:5000
Swagger UI:
/swagger
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/TodoItems | Get all todo items |
| GET | /api/TodoItems/{id} | Get todo item by ID |
| POST | /api/TodoItems | Create a new todo item |
| PUT | /api/TodoItems/{id} | Update an existing item |
| DELETE | /api/TodoItems/{id} | Delete a todo item |
POST /api/TodoItems
{
"title": "Learn Clean Architecture",
"description": "Understand layered patterns"
}This repository shows that you understand:
- Enterprise-level architecture
- Separation of concerns
- Dependency Inversion
- Clean, testable code
- Professional backend development
Perfect for recruiters, interviews, and portfolio highlights.
- Project structure with Clean Architecture
- CRUD operations for TodoItems
- CQRS with MediatR (Commands & Queries)
- Swagger documentation
- Add FluentValidation for DTOs
- Add pagination to GET /TodoItems
- Implement unit tests (xUnit / NUnit)
- Add authentication (JWT)
- Deploy to Azure / Render
- Add CI/CD pipeline with GitHub Actions
This project is under the MIT License.