
This is a technical training project designed to practice modern .NET application architecture using Clean Architecture, CQRS with MediatR, and microservices with Azure Service Bus. It includes a monolithic Todo API and a decoupled Notification microservice that communicates asynchronously via a message bus.
Architecture Overview
The solution is split into two major parts:
Monolith API: Core Todo logic, designed using Clean Architecture with MediatR and Entity Framework Core
Notification Microservice: A lightweight message-driven service that handles external concerns such as sending emails, triggered by queue messages from the API.
Backend: Todo API (Monolith)
The Todo API is built as a modular, layered monolith using .NET 8, following Clean Architecture principles and the CQRS pattern with MediatR.
Key features:
- CQRS with MediatR: All use cases are implemented as commands/queries with dedicated handlers.
/n
- Exception Handling: Custom pipeline behavior handles exceptions globally via MediatR.
- AutoMapper: Used for mapping between domain models and DTOs.
- Clean Architecture: Clear separation between Domain, Application (Service), and Infrastructure layers.
- Unit of Work & Repositories: Encapsulate data access using EF Core.
Microservice: NotificationService
The notification system is split into two projects, an API and a background worker service.
Key features:
- Azure Service Bus: Used for decoupled, async communication between API and worker.
- .NET Worker Service: Continuously listens to the queue and processes messages.
- Scalable architecture: Easily extended to support additional event types or integrations.
