Just a simple .Net API with CRUD features, following Domain-Driven Design (DDD) principles 🥲! Powered by .NET 8
and C hashtag version 12
.
Before starting, ensure you have the following tools and environments set up on your machine:
- .NET 8.0 SDK
- PostgreSQL
- Redis
- Docker (optional)
git clone <repository_url>
cd <project_directory>
Update the configuration files located at PRN231.API/appsettings.json
and PRN231.API/appsettings.Development.json
with appropriate database connection strings, Redis configurations, and other settings.
At the root directory, restore the required NuGet packages by running:
dotnet restore
Launch the application locally using the following command:
dotnet run --project PRN231.API
🚀 The application will listen on:
- HTTP: http://localhost:5184
- HTTPS: https://localhost:7100
(You can change these ports in the launchSettings.json file located at PRN231.API/Properties/launchSettings.json)
Update the same configuration files (PRN231.API/appsettings.json
and PRN231.API/appsettings.Development.json
) with appropriate database connection strings, Redis configurations, and other settings.
At the project root directory, use Docker Compose to build and run the containers:
docker compose up
- Develop CRUD operations.
- Develop "hand-made" authentication operations.
- Integrate soft delete functionality.
- Implement DTOs and AutoMapper for object mapping.
- Implement DbFactory, Unit of Work, and Repository patterns.
- Implement exception handling middleware / .NET 8 exception handler.
- Implement Result Monad.
- Implement Minimal APIs.
- Enable authentication using JWT tokens.
- Automatically log AuditLogs to the database.
- Automatically track Entities' CreatedAt and ModifiedAt timestamps.
- Integrate SignalR for real-time notifications.
- Implement Redis Cache for efficient data caching.
- Implement SMTP Email sender.
- Refactor: Use email templates instead of hard-coding.
- Set up Hangfire for background jobs.
- Replace AutoMapper by Mapperly to improve performance.
- Implement ASP.NET Core Identity.
- Implement RabbitMQ for messaging services.
- Apply CQRS Pattern (Command and Query Responsibility Segregation).
- Dockerize the application for easy deployment 🐳.