How maheshkumarsingh/eshopmicroservices works
Project type and purpose
• This is a microservices-based e-commerce reference implementation (“eShop Microservices”) built on .NET 9 using Domain-Driven Design (DDD), CQRS, and event-driven communication.
• It provides separate bounded contexts for Catalog, Basket, Ordering, and Identity, exposed via an API Gateway and orchestrated with Docker, message broker (RabbitMQ/Kafka), and DevOps pipelines.
File structure
• Top-level:
• src/BuildingBlocks – a shared .NET class library containing CQRS interfaces (ICommand, IQuery, handlers), behaviors (validation, logging), and custom exception handling.
• src/Services – each microservice lives in its own directory (e.g., Basket.API, Catalog.API). They follow a pattern: Endpoints, Handlers, Data repositories, Models, Configuration (appsettings.json), Dockerfile.
• docker-compose.* – container orchestration definitions.
• eShop-microservices.sln – Visual Studio solution referencing all projects.
• This shows a classical microservices layout: 1) Shared building blocks, 2) Service boundary per domain, 3) Infrastructure artifacts (Docker, compose).
README for additional insights
• It explicitly calls out:
• API Gateway (Ocelot/YARP) as the entry point.
• Four microservices (Catalog, Basket, Ordering, Identity).
• Polyglot persistence (SQL Server/PostgreSQL for Catalog & Ordering, Redis for Basket).
• Asynchronous messaging with RabbitMQ/Kafka.
• gRPC between services for low-latency calls.
• Cross-cutting concerns: Serilog, ELK/Grafana, CI/CD.