A production-grade event-driven microservices system for real-time supply chain telemetry — inspired by architectures used at Uber, Maersk, and FedEx.
This platform showcases scalable ingestion, stream processing, and live monitoring using Kafka, Spring Boot, MongoDB, and WebSockets.
The system is composed of loosely-coupled microservices communicating via Kafka and observed in real time through a WebSocket dashboard.
- Entry point for all client requests
- Uses Spring Cloud Gateway for routing
- Works as a reverse proxy / traffic controller
- High-speed REST ingestion service
- Converts telemetry into events
- Publishes events to Kafka topics
- Subscribes to Kafka events
- Performs validation & processing
- Stores history into MongoDB
- Sends live data updates via WebSockets
- WebSocket-powered
- Live cards and status indicators
- Displays speed, temperature, fuel & location
✔ Real-Time Visualization on WebSockets
✔ Smart Telemetry (Temperature, Speed, Fuel)
✔ Kafka Event Streaming to absorb traffic spikes
✔ Polyglot Persistence (Kafka + MongoDB)
✔ Cloud-Native Architecture using Docker Compose
- Docker Desktop
- Java 21
- Maven
Runs Kafka, Zookeeper, and MongoDB:
docker-compose up -d| Service | Port | Command |
|---|---|---|
| Tracking Service | 8081 | Run TrackingServiceApplication |
| Processor Service | 8082 | Run TrackingProcessorApplication |
| API Gateway | 8080 | Run ApiGatewayApplication |
- Use Postman or curl:
POST http://localhost:8080/api/v1/tracking
Content-Type: application/json
{
"shipmentId": "VACCINE-BOX-01",
"latitude": 40.7128,
"longitude": -74.0060,
"status": "IN_TRANSIT",
"temperature": -5.0,
"speed": 80.0,
"fuelLevel": 90.0
} 📦 project-root
├── api-gateway/ # Spring Cloud Gateway
├── tracking-service/ # REST → Kafka producer
├── tracking-processor/ # Kafka consumer → Mongo/WebSocket
├── docker-compose.yml # Infrastructure setup
└── README.md
⭐ Future Enhancements
- Add Prometheus + Grafana monitoring
- Add distributed tracing with OpenTelemetry
- Add GeoJSON map-based visualization