Skip to content

A modern e-commerce microservices reference application built with .NET 8, implementing Clean Architecture, CQRS, and DDD principles. Features include YARP API Gateway, RabbitMQ messaging, Redis caching, and Docker containerization with PostgreSQL and SQL Server.

License

Notifications You must be signed in to change notification settings

datngw/eshop-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

eShop Microservices

This project is a microservices-based e-commerce application built with .NET, demonstrating modern architectural patterns and practices.

🏗 Architecture Overview

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).

Core Services

  • 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).

Infrastructure & Gateways

  • 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.

🚀 Technologies

  • .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)

🛠 Getting Started

Prerequisites

Run the Application

  1. Clone the repository.
  2. Navigate to the src directory.
  3. Run the following command to start all services and infrastructure:
docker-compose up -d

Access Points

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

📚 References

This project is based on the architecture and concepts from the following course:

About

A modern e-commerce microservices reference application built with .NET 8, implementing Clean Architecture, CQRS, and DDD principles. Features include YARP API Gateway, RabbitMQ messaging, Redis caching, and Docker containerization with PostgreSQL and SQL Server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published