This is a .NET 8.0 Web API project designed for managing restaurants while following the principles of Clean Architecture.
The project demonstrates advanced software engineering practices including CQRS, MediatR, Identity & JWT Authentication, Logging, Testing, and more.
- Structured the solution into separate layers (API, Application, Domain, Infrastructure).
- Enforced separation of concerns and testability.
- Code-First approach with migrations.
- Database interaction through EF Core and Repository patterns.
- Implemented CQRS (Command and Query Responsibility Segregation) using MediatR.
- Separation of read and write operations for better scalability.
- Integrated ASP.NET Core Identity for secure user management.
- Implemented JWT (JSON Web Token) for authentication.
- Role-based authorization for securing endpoints.
- Used FluentValidation for request model validation.
- Added comprehensive test coverage for valid and invalid scenarios.
- Simplified object-to-object mapping between DTOs and entities.
- Implemented structured logging using Serilog for better monitoring and debugging.
- Added pagination support for retrieving restaurants efficiently.
- xUnit for unit testing.
- Moq for mocking dependencies.
- FluentAssertions for cleaner and more readable test assertions.
- Integration Testing for end-to-end API testing.
- .NET 8.0 Web API
- Clean Architecture
- Entity Framework Core
- AutoMapper
- FluentValidation
- CQRS + MediatR
- ASP.NET Core Identity
- JWT Authentication
- Serilog Logging
- Pagination
- xUnit, Moq, FluentAssertions
- Integration Testing
- SQL Server
- src/Restaurants.API: The main API project. This is the entry point of the application.
- src/Restaurants.Application: Contains the application logic. This layer is responsible for the application's behavior and policies.
- src/Restaurants.Domain: Contains enterprise logic and types. This is the core layer of the application.
- src/Restaurants.Infrastructure: Contains infrastructure-related code such as database and file system interactions. This layer supports the higher layers.
- tests/Restaurants.API.Tests: Contains unit tests for the API.
git clone https://github.com/MuhammedReda263/Restaurants.git cd Restaurants
src/Restaurants.API/appsettings.json
dotnet ef database update --project src/Restaurants.Infrastructure --startup-project src/Restaurants.API
dotnet run --project src/Restaurants.API