This project is designed following the principles of Clean Architecture, ensuring a modular, maintainable, and testable codebase. Below is the reference structure showing how different layers and projects depend on each other.
The Core layer is split into Application, Domain, and Mapper, each having specific responsibilities and dependencies.
-
Application
- References:
- Domain: Contains essential business logic and domain entities.
- Contents:
- Bases
- Behaviors
- Dtos
- Features
- Helpers
- Interfaces
- Middlewares
- References:
-
Domain
- Contents:
- Common
- Entities
- Enums
- Contents:
-
Mapper
- References:
- Application: Contains mapping configurations to convert between different layers.
- Contents:
- AutoMapper profiles and configurations.
- References:
The Infrastructure layer provides implementations for the interfaces defined in the Core layer, focusing on external services and database interactions.
-
CleanArchitecture.Infrastructure
- References:
- Application: Uses application services and interfaces.
- Persistence: Contains database-related services and implementations.
- Contents:
- Dependencies
- ScheduleServices
- Storage
- Tokens
- References:
-
CleanArchitecture.Persistence
- References:
- Application: Uses application services and interfaces.
- Domain: Contains domain entities and logic.
- Contents:
- Dependencies
- Configuration
- Context
- Migrations
- Repositories
- UnitOfWorks
- References:
The Presentation layer contains the API project, which exposes the application's functionalities via RESTful endpoints.
- CleanArchitecture.Api
- References:
- Infrastructure: Uses infrastructure services and implementations.
- Mapper: Uses mapping configurations.
- Persistence: Uses database-related services and implementations.
- Contents:
- Connected Services
- Dependencies
- Properties
- Controllers
- wwwroot
- appsettings.json
- Program.cs
- References:
- AutoMapper
- MediatR
- Microsoft.AspNetCore.Authentication.JwtBearer
- Microsoft.AspNetCore.Identity.EntityFrameworkCore
- FluentValidation
- Npgsql
- Serilog
- Hangfire
- Hangfire.PostgreSql
- ...
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project directory:
cd <project-directory>
3.Build the solution:
dotnet restore
dotnet build
4.Apply migrations to the database:
dotnet ef database update
5.Run the application:
dotnet run --project CleanArchitecture.Api ```
....................
`Let me know if you need any further changes or additions! `