All Projects
Backendadvanced View on GitHub

MicroMart

Microservices e-commerce platform with RabbitMQ, YARP gateway, and Docker

3–5 hours to set up10 technologies5 guided steps

About This Project

A production-grade microservices e-commerce system with 4 services (Catalog, Orders, Inventory, Notifications), an API gateway with YARP, async messaging with RabbitMQ, and full Docker Compose orchestration. Demonstrates service boundaries, async communication, and distributed system patterns.

What You'll Learn

Design and implement microservice boundaries based on DDD
Build an API gateway with YARP for routing and auth
Implement async messaging between services with MassTransit
Apply the Outbox and Saga patterns in a real system
Set up distributed tracing and centralised logging across services

Key Features

4 independent microservices: Catalog, Orders, Inventory, Notifications
YARP API gateway — single entry point for all services
Async messaging with RabbitMQ + MassTransit (Publish/Subscribe)
Outbox pattern for reliable message delivery
Saga pattern for distributed order placement transaction
Database per service (each has its own PostgreSQL schema)
Distributed tracing with OpenTelemetry + Jaeger
Centralized logging with Serilog + Seq
JWT auth validated at the gateway
Full Docker Compose stack — one command to run everything

Project Structure

directory tree
MicroMart/
├── gateway/              # YARP API Gateway
├── services/
│   ├── catalog/          # Product catalog service
│   ├── orders/           # Order management + Saga
│   ├── inventory/        # Stock tracking service
│   └── notifications/    # Email/push notifications
├── shared/
│   └── MicroMart.Contracts/  # Shared message contracts
├── docker-compose.yml
└── docker-compose.override.yml

Setup Guide

1

Clone the repository

Clone MicroMart with all 4 services and the gateway.

bash
git clone https://github.com/asmanasir/MicroMart.git
cd MicroMart
2

Start everything with Docker Compose

One command starts all services, RabbitMQ, PostgreSQL, Redis, Jaeger, and Seq.

bash
docker-compose up -d
3

Verify all services are running

Check each service health endpoint.

bash
# Gateway (single entry point)
curl http://localhost:5000/health

# Individual services
curl http://localhost:5001/health  # Catalog
curl http://localhost:5002/health  # Orders
curl http://localhost:5003/health  # Inventory

Running the Project

1

Access the API through the gateway

All traffic goes through the YARP gateway on port 5000.

bash
# Browse products
curl http://localhost:5000/api/catalog/products

# Place an order (triggers Saga across 3 services)
curl -X POST http://localhost:5000/api/orders \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"productId": "...", "quantity": 2}'
2

Watch distributed tracing in Jaeger

See how a single API call traces through multiple services.

bash
# Open Jaeger UI
http://localhost:16686

# Open Seq for centralized logs
http://localhost:5341

# RabbitMQ management
http://localhost:15672  # admin/password

Project Info

CategoryBackend
Difficultyadvanced
Setup time3–5 hours to set up
Technologies10 tools

Tech Stack

ASP.NET Core (.NET 8)YARP (API Gateway)RabbitMQMassTransitEF CorePostgreSQLRedisDocker ComposeSerilogOpenTelemetry

Prerequisites

  • .NET 8 SDK installed
  • Docker Desktop with at least 4 GB RAM allocated
  • Basic understanding of REST APIs and Docker
View Source on GitHub
L

Learnixo

Project Author

The most complete microservices project on the platform. Every service has its own database, communicates async via RabbitMQ, and is observable end-to-end. This is what senior .NET developers are expected to build.