Visualizing how distributed backend systems actually work β not just building them.
Most applications hide backend complexity behind clean UIs. This project does the opposite.
The Microservices Playground exposes and animates real backend behavior β turning invisible service-to-service communication, event propagation, and distributed state changes into something you can actually see and interact with in real time.
It's not an e-commerce app. It's a developer-focused system visualization tool built on top of a real microservices stack. Every action you take in the UI triggers actual backend flows, and every step of those flows is streamed back to the visualizer live via WebSocket.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT (Next.js) β
β System Visualizer Interface β
ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββ¬ββββββββββββββββββ
β HTTP β WebSocket (live updates)
βΌ βΌ
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββ
β API GATEWAY β β SOCKET SERVICE β
βββββ¬βββββββ¬βββββββ¬βββββ¬ββββ β (Event Stream Hub) β
β β β β ββββββββββββ¬ββββββββββββ
βΌ βΌ βΌ βΌ β consumes
ββββββββ ββββββββ ββββββββ βββββββββ β
β Auth β βProd. β β Cart β βOrder β β
β Svc β β Svc β β Svc β β Svc β β
ββββ¬ββββ ββββββββ ββββ¬ββββ βββββ¬βββ β
β β β β
β publishes β β β
ββββββββββββββββββΊββββββ¬βββββ β
βΌ β
βββββββββββββββββββββ β
β RabbitMQ βββββββ
β Message Broker β
βββββββββββββββββββββ
β² β²
Cart Svc β β Socket Svc
(independentlyβ βindependently)
consumes) β β consumes)
Every service publishes events to RabbitMQ at each meaningful step. The Socket Service independently consumes all of these events and forwards them to the frontend via WebSocket β giving the visualizer a live, parallel view of what's happening inside the system without interfering with the domain services at all.
π’ SYNCHRONOUS ββββ Client β API Gateway β Service
π ASYNCHRONOUS ββββ Service β RabbitMQ β Service (domain events)
π΅ REALTIME ββββ RabbitMQ β Socket Service β Client (WebSocket)
| Service | Responsibility | Protocol |
|---|---|---|
| Auth Service | JWT-based login & signup, password hashing | REST + AMQP |
| Product Service | Stateless product catalog reads | REST |
| Cart Service | User cart state, independent event consumer | REST + AMQP |
| Order Service | Order creation, domain event publisher | REST + AMQP |
| Socket Service | Independently consumes all RabbitMQ events, streams to frontend | AMQP + WebSocket |
Each flow has two parallel tracks β the main flow (what the system does) and the real-time track (how the visualizer sees it live).
Main Flow
Client
ββββΊ API Gateway
ββββΊ Auth Service
βββ User validation
βββ Token issued
βββ Session active
Real-time Track (runs in parallel)
Auth Service βββΊ RabbitMQ βββΊ Socket Service βββΊ WebSocket βββΊ UI Visualizer
Main Flow
Client
ββββΊ API Gateway
ββββΊ Auth Service
βββ Password encrypted
βββ User created
βββ User ready for login
Real-time Track (runs in parallel)
Auth Service βββΊ RabbitMQ βββΊ Socket Service βββΊ WebSocket βββΊ UI Visualizer
Main Flow
Client
ββββΊ API Gateway
ββββΊ Cart Service
βββ Item added to user
βββ Cart updated
Real-time Track (runs in parallel)
Cart Service βββΊ RabbitMQ βββΊ Socket Service βββΊ WebSocket βββΊ UI Visualizer
Main Flow
Client
ββββΊ API Gateway
ββββΊ Order Service
βββ publishes order.placed event
β ββββΊ RabbitMQ
β ββββΊ Cart Service (independently consumes)
β βββ Cart cleared for user
βββ Order placed for user
Real-time Track (runs in parallel)
Order Service βββΊ RabbitMQ βββΊ Socket Service βββΊ WebSocket βββΊ UI Visualizer
Cart Service βββΊ RabbitMQ βββΊ Socket Service βββΊ WebSocket βββΊ UI Visualizer
The Cart Service and Socket Service both independently consume from the same RabbitMQ event. The cart clears itself through the event β no direct call is made from Order Service to Cart Service. The UI visualizer sees both sides of this exchange in real time.
This is not a traditional UI. The frontend acts as a System Playground & Visualization Interface:
User Action
β
βΌ
API Gateway βββΊ Services βββΊ RabbitMQ
β
Socket Service
β
WebSocket
β
UI Visualizer
(Flow Animations, Service Traces,
Real-time State Changes)
Every step you trigger in the UI is reflected back through actual backend events β not mocked, not polled. Designed like a developer tool, not an e-commerce app.
- Microservices Backend β 5 independently-scoped Node.js/Express services
- Event-Driven Architecture β RabbitMQ publish/consume with real domain events
- Real-time Visualization β Socket Service streams live backend events to the UI via WebSocket
- Parallel Event Track β Every flow has a live mirror in the visualizer without coupling to domain logic
- Independent Consumers β Cart Service and Socket Service consume the same events without knowing about each other
- JWT Authentication β Stateless sessions via signed cookies
- Dockerized Infrastructure β Full stack spins up with a single command
- Clean Separation of Concerns β Each service owns its domain, data, and events
| Frontend | Backend | Infrastructure |
|---|---|---|
| Next.js | Node.js | Docker |
| React 18 | Express.js | Docker Compose |
| Tailwind CSS | RabbitMQ | JWT (stateless) |
| Socket.IO Client | Socket.IO Server | bcrypt |
| REST APIs |
1. Clone the repository
git clone https://github.com/your-username/microservices-playground.git
cd microservices-playground2. Configure environment variables
# Create a .env file at project root
PRODUCT_SERVICE_URL=http://localhost:3002
AUTH_SERVICE_URL=http://localhost:3001
CART_SERVICE_URL=http://localhost:3003
ORDER_SERVICE_URL=http://localhost:3004
SOCKET_SERVICE_URL=http://localhost:3005
RABBITMQ_URL=amqp://localhost3. Start all services
docker-compose up --buildAll services spin up together. The visualizer is available at http://localhost:3000.
The Socket Service connects automatically and begins streaming events to the UI.
| Concept | How It's Shown |
|---|---|
| Microservices Design | 5 isolated services with independent concerns |
| Event-Driven Systems | RabbitMQ publish/consume across services |
| Real-time Event Streaming | Socket Service bridges RabbitMQ β WebSocket β UI |
| Independent Consumers | Cart Service and Socket Service both consume the same events without coupling |
| Stateless Auth | JWT in cookies, no server-side sessions |
| Distributed State | Cart cleared via event, not a direct API call |
| Backend Visualization | UI animates actual service-to-service flows live |
| Observer Pattern | Socket Service as a passive consumer β zero impact on domain services |
- Distributed tracing with Jaeger
- Per-service Logs Panel in the visualizer
- Service Health Dashboard
- Failure simulation β retry logic, dead-letter queues
- Replay mode β re-emit past event sequences for debugging
Add your screenshots here
Eswar
Built to bridge the gap between system design theory and real implementation.