๐โโ๏ธ How to Run the Project
November 21, 2025 ยท View on GitHub
- First make sure that you have .NET 7.0 and Visual Studio 2022 are installed.
- Now open the solution with VS 2022 and build the solution to make sure that there is no error.
- Now make
CleanHr.ApiandClearHr.Blazorprojects as startup projects and then run it. On startup necessary databases will be created in MSSQLLocalDB - (Optional) To enable distributed tracing with Grafana Tempo, run:
docker compose -f src/ServerApp/Presentation/CleanHr.Api/docker-compose.yml up -d- Access Grafana at: http://localhost:3000
- Traces will be automatically sent to Tempo and visualized in Grafana
- See
src/ServerApp/Presentation/CleanHr.Api/Observability/OBSERVABILITY.mdfor detailed documentation
Clean Architecture in ASP.NET Core
This repository contains the implementation of Domain Driven Design and Clear Architecture in ASP.NET Core.
โ๏ธ Fetures
- Domain Driven Design
- CQRS
- REST API
- API Versioning
- Blazor Client (Web Assembly)
- Caching with InMemory and Redis
- Distributed Tracing with OpenTelemetry and Grafana Tempo
- EF Core Repository and Cache Repository
- Microsoft SQL Server
- Simple and clean admin template for starter
๐ Folder Structures:

๐ src/ServerApp:
Will contain all the projects of the server side app and will look like as follows:

๐ src/ServerApp/Core:
Core folder contains the projects related to the application's core funcationalities like Domain Logic and Application Logic. This folder is called the heart of the server app.

๐ EmployeeManagement.Domain Project:
This is application's Domain Layer which will contain:
- Domain entities and aggregate roots which will be mapped to database table
- Domain logic,
- Domain repositories
- Value objects.
- Domain Exceptions
This will not depend on any other project. This is fully independent.

๐ EmployeeManagement.Application Project:
This is application's Application Layer which will contain:
- Appplication Logic
- Infrastructure repositories' interfaces i.e Cache Repository interfaces.
- Infrastructure services' interfaces i.e IEmailSender, ISmsSender, IApplicationLogger etc.
- Data Transfer Objects (Dtos)
- Command and Queries
It will only depend on Domain project aka Domain Layer.

๐ src/ServerApp/Infrastructure:
This folder will contains all the project related to project's infrastuctures like Data access code, persistance and application's cross cutting concerns' intefaces implementation like IEmailSender, ISmsSender etc.

๐ src/ServerApp/Presentation:
This folder will contain the REST API projects which is the PresentationLayer of the project.
