UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository -> https://www.udemy.com/course/net-backend-bootcamp-modulith-vsa-ddd-cqrs-and-outbox/?couponCode=NOVE24
See the overall picture of Modular Monoliths (Modulith) architecture on .NET in real-world EShop project;
There is a couple of modules implemented EShop domain over Catalog, Basket, Identity and Ordering modules with Cloud-native Backing services (Redis, RabbitMQ, Keycloak) and Relational PostgreSQL databases isolated db schemas, communicating over RabbitMQ Event Driven Communication and following VSA, DDD, CQRS and Outbox Patterns.
We have implemented below architectural patterns in this repository.
- Modular Monoliths (Modulith) Architecture
- Vertical Slice Architecture (VSA)
- Domain-Driven Design (DDD)
- Command Query Responsibility Segregation (CQRS)
- Outbox Pattern for Reliable Messaging
- ASP.NET Core Minimal APIs and latest features of .NET8 and C# 12
- Vertical Slice Architecture implementation with Feature folders and single .cs file includes different classes in one file
- CQRS implementation using MediatR library
- CQRS Validation Pipeline Behaviors with MediatR and FluentValidation
- Use Entity Framework Core Code-First Approach and Migrations on PostgreSQL Database
- Use Carter for Minimal API endpoint definition
- Cross-cutting concerns Logging, Global Exception Handling and Health Checks
- Using Redis as a Distributed Cache over PostgreSQL database
- Implements Proxy, Decorator and Cache-aside patterns
- Publish BasketCheckoutEvent to RabbitMQ via MassTransit library
- Implement Outbox Pattern For Reliable Messaging w/ BasketCheckout Use Case
- Sync Communications between Catalog and Basket Modules with In-process Method Calls (Public APIs)
- Async Communications between Modules w/ RabbitMQ & MassTransit for UpdatePrice Between Catalog-Basket Modules
- OAuth2 + OpenID Connect Flows with Keycloak
- Setup Keycloak into Docker-compose file for Identity Provider as a Backing Service
- JwtBearer token for OpenID Connect with Keycloak Identity
- Implementing DDD, CQRS, and Clean Architecture with using Best Practices
- Implement Outbox Pattern For Reliable Messaging w/ BasketCheckout Use Case
- EShop Modules to Microservices w/ Stranger Fig Pattern
You will need the following tools:
Follow these steps to get your development environment set up: (Before Run Start the Docker Desktop)
- Clone the repository
- Once Docker for Windows is installed, go to the Settings > Advanced option, from the Docker icon in the system tray, to configure the minimum amount of memory and CPU like so:
- Memory: 4 GB
- CPU: 2
- At the root directory of solution, select docker-compose and Set a startup project. Run docker-compose without debugging on visual studio. Or you can go to root directory which include docker-compose.yml files, run below command:
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
-
Wait for docker compose all services. That’s it! (some microservices need extra time to work so please wait if not worked in first shut)
-
Launch Shopping Web Api -> https://localhost:6060 in postman and send api request to internal modules. You can import postman collection in your local environment.
- Mehmet Ozkaya - Initial work - mehmetozkaya