This project is a microservices-based e-commerce application built with .NET, demonstrating modern architectural patterns and practices.
The application is decomposed into several autonomous microservices, each focusing on a specific business domain. They communicate via synchronous HTTP (REST/gRPC) and asynchronous messaging (RabbitMQ).
- Catalog.API: Manages product catalog (products, brands, types).
- Tech: .NET 8, PostgreSQL (Marten).
- Basket.API: Handles user shopping carts.
- Tech: .NET 8, PostgreSQL (Marten), Redis (Distributed Cache).
- Discount.Grpc: Provides discount logic via gRPC.
- Tech: .NET 8, SQLite.
- Ordering.API: Manages order processing and fulfillment.
- Tech: .NET 8, SQL Server (EF Core), RabbitMQ (MassTransit).
- YarpApiGateway: A reverse proxy using YARP (Yet Another Reverse Proxy) to route incoming requests to appropriate backend services.
- MessageBroker: RabbitMQ for asynchronous event-driven communication between services.
- .NET 8
- Docker & Docker Compose
- PostgreSQL (Catalog & Basket DBs)
- SQL Server (Ordering DB)
- Redis (Distributed Cache)
- RabbitMQ (Message Broker)
- YARP (API Gateway)
- Marten (Document DB on PostgreSQL)
- MassTransit (Message Bus abstraction)
- Clone the repository.
- Navigate to the
srcdirectory. - Run the following command to start all services and infrastructure:
docker-compose up -d| Service | Local Port | Container Port |
|---|---|---|
| Catalog API | 6000, 6060 |
8080, 8081 |
| Basket API | 6001, 6061 |
8080, 8081 |
| Discount gRPC | 6002, 6062 |
8080, 8081 |
| Ordering API | 6003, 6063 |
8080, 8081 |
| YARP Gateway | 6004, 6064 |
8080, 8081 |
| RabbitMQ Mgmt | 15672 |
15672 |
This project is based on the architecture and concepts from the following course: