ASP.NET Core
Clean Architecture API for a Portfolio
Designing an ASP.NET Core backend with separated domain, application, and infrastructure layers for maintainability.
Context
This case study models a personal portfolio management system: projects, articles, skills, contact messages, and publishing status. The goal is to create a backend structure that can grow from static content into a real database-backed application.
Approach
I split the system into clear layers:
- Domain contains entities and important business rules.
- Application contains use cases, DTOs, and validation.
- Infrastructure handles database access, repositories, and external services.
- API receives requests, calls use cases, and returns responses.
This design keeps each part responsible for one thing. If SQL Server is replaced with PostgreSQL or caching is added later, the API layer does not need a large rewrite.
Technical points
The API prioritizes consistent responses, early validation, and readable error messages. Swagger is used to inspect contracts, while migrations keep database changes traceable.
Result
This case study shows how I think about backend work: not only making it run, but making it readable, testable, and easy for another engineer to continue.