A modern, scalable order management system built using Clean Architecture principles and .NET 8.0.
This solution follows Clean Architecture principles with a clear separation of concerns:
- Domain Layer: Core business logic and entities
- Application Layer: Business rules and use cases
- Infrastructure Layer: External concerns and implementations
- API Layer: Web API endpoints and controllers
- .NET 8.0 SDK
- Visual Studio 2022 or VS Code
- SQL Server (for production) or SQLite (for development)
- Required NuGet packages:
dotnet add package NSwag.AspNetCore --version 14.4.0
dotnet build -tl
cd src/Api
dotnet watch run
The application will be available at https://localhost:5001
- Framework: .NET 8.0
- Architecture: Clean Architecture
- Database: Entity Framework Core 8.0
- API Documentation: Swagger/OpenAPI
- Validation: FluentValidation
- Testing: xUnit, NUnit, FluentAssertions
- Code Quality: EditorConfig for consistent coding styles
- MediatR for CQRS pattern implementation
- FluentValidation for request validation
- Entity Framework Core for data access
The solution includes unit tests covering:
- Command and Query Handlers
- Validators
- Business Logic
Run the tests with:
dotnet test
The following areas have been identified for future enhancement:
-
API Documentation
- Enhance Swagger UI with more detailed endpoint descriptions, resolve the issue where the swagger doc says My Title, even though a title has been defined in program.cs
- Add request/response examples
- Include authentication requirements in documentation
-
Test Coverage
- Add Integration tests for API endpoints
- Implement API tests to verify end-to-end functionality
- Expand test coverage beyond the Application layer
-
Security
- Implement Authentication using ASP.NET Core Identity
- Add role-based authorization
- Secure API endpoints
-
Performance Optimization
- Move daily report filtering to the database layer
- Add additional caching where appropriate
-
API Response Handling
- Introduce additional appropriate HTTP status codes for different scenarios
-
Additional functionality
- Add logic around deletion of order