CloudBazzar is a Dockerized microservices-based e-commerce backend built with .NET 8, RabbitMQ, SQL Server, and API Gateway, demonstrating event-driven architecture, JWT authentication, and service-to-service communication.
Services included:
API Gateway – Single entry point for all services
Identity API – JWT token generation & authentication
Ordering API – Create and manage orders
Payment API – Event-driven payment processing
Catalog API – Product catalog
Basket API – Shopping cart
Notification Worker – Background consumer
RabbitMQ – Event bus
SQL Server – Orders database
PostgreSQL – Catalog database
Redis – Basket cache
Seq – Centralized logging
OpenTelemetry Collector – Observability
Generates JWT tokens used to authorize requests across microservices.
Creates a new order and publishes an OrderCreated event.
Fetches order details from SQL Server.
Payment service consumes OrderCreated events from RabbitMQ.
Shows message flow and active consumer.
Centralized routing through Gateway API.
JWT-based authorization in Swagger UI.
Order Created ↓ RabbitMQ (shopsphere.events) ↓ Payment Consumer ↓ PaymentSucceeded / PaymentFailed
- Microservices: Catalog, Basket, Ordering, Payment, Notification
- API Gateway: YARP reverse proxy
- Datastores: PostgreSQL (Catalog), SQL Server (Ordering), Redis (Basket)
- Messaging: RabbitMQ event bus (publish/subscribe)
- Observability: OpenTelemetry (traces), Serilog → Seq, health checks
- Testing: xUnit (starter tests) + basic integration test pattern
- CI: GitHub Actions build + test
- Containers: Dockerfiles + docker-compose (one command runs everything)
Prereqs: Docker Desktop
cd deploy/docker-compose
docker compose up --buildThen open:
- Gateway: http://localhost:8080
- Catalog via gateway: http://localhost:8080/catalog/swagger
- Basket via gateway: http://localhost:8080/basket/swagger
- Ordering via gateway: http://localhost:8080/ordering/swagger
- Payment: http://localhost:5004/swagger
- RabbitMQ UI: http://localhost:15672 (guest/guest)
- Seq logs: http://localhost:5341
A simple dev JWT issuer is included:
- Identity API:
POST http://localhost:5006/token - Use the returned JWT as
Authorization: Bearer <token>for Ordering endpoints.
For production-grade OAuth2/OIDC, swap Identity.API for OpenIddict or Duende IdentityServer.
- Ordering publishes
OrderCreated - Payment consumes
OrderCreated→ publishesPaymentSucceededorPaymentFailed - Notification consumes payment events
See src/ for services and BuildingBlocks/ for shared infrastructure.






