This project implements e-commerce modules (Catalog, Basket, Discount, and Ordering) with both NoSQL (DocumentDb, Redis) and Relational databases (PostgreSQL, SQL Server). It uses RabbitMQ for event-driven communication and YARP API Gateway for routing.
- Built with ASP.NET Core Minimal APIs leveraging the latest features of .NET 8 and C# 12.
- Implements Vertical Slice Architecture with feature folders.
- CQRS implementation using MediatR library for command and query separation.
- CQRS Validation Pipeline Behaviors with MediatR and FluentValidation.
- Uses Marten library for .NET Transactional Document DB on PostgreSQL.
- Uses Carter for Minimal API endpoint definition.
- Features cross-cutting concerns like Logging, Global Exception Handling, and Health Checks.
- ASP.NET 8 Web API application, Following REST API principles, CRUD.
- Utilizes Redis as a Distributed Cache for basket data.
- Implements design patterns: Proxy, Decorator, and Cache-aside.
- Syncs with the Discount microservice using gRPC for pricing calculations.
- Publishes BasketCheckout events to RabbitMQ using MassTransit.
- High-performance gRPC Server for inter-service communication with the Basket microservice.
- Defines Protobuf messages for gRPC services.
- Manages data with SQLite and Entity Framework Core, including database migrations.
- Fully containerized for seamless deployment.
- Implementing DDD, CQRS, and Clean Architecture.
- Features CQRS with MediatR, FluentValidation, and Mapster.
- Consumes RabbitMQ BasketCheckout events with MassTransit.
- Manages data with SQL Server and EF Core, including automatic migrations on startup.
- Synchronous Communication: gRPC-based inter-service calls.
- Asynchronous Communication: RabbitMQ Message-Broker.
- Implements Publish/Subscribe Topic Exchange Model.
- Manages events with MassTransit.
- Shared EventBus Messages Library for consistent event contracts across microservices.
- Built using YARP Reverse Proxy, applying the Gateway Routing Pattern.
- Configurable with routes, clusters, transforms, and rate limiting via FixedWindowLimiter.
- ASP.NET Core web application styled with Bootstrap 4 and Razor templates.
- Consumes APIs from microservices via YARP using Refit HttpClientFactory.
- Containerizes microservices and databases.
Ensure the following tools are installed on your system:
- Clone the repository.
- Start Docker Desktop.
- Run the project:
- Open the solution in Visual Studio, set docker-compose as the startup project, and start without debugging.
- Alternatively, execute the following command in the root directory:
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
- Access the Web UI:
- Open your browser and navigate to https://localhost:6065.
- Explore the ShoppingApp to interact with microservices via the YARP API Gateway.