Skip to content

About

Real-time delivery analytics system using Kafka, ML, Redis and Streamlit.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🚚 Real-Time Delivery Operations Dashboard (Kafka + ML + WebSockets)

Python Kafka Docker Streamlit ML


📊 Overview

A real-time delivery analytics system that simulates logistics platforms like Uber/DHL.

It processes streaming delivery events, applies ML-based delay prediction, and visualizes live metrics via a WebSocket-powered dashboard.


🏗️ Architecture

Architecture


⚡ Tech Stack

  • Streaming: Kafka
  • Processing: Python (Flink-style streaming)
  • ML: Scikit-learn (delay prediction)
  • Real-time layer: Redis + WebSockets
  • Storage: PostgreSQL
  • Frontend: Streamlit
  • Deployment: Docker

📸 Dashboard Preview

Dashboard


🚀 Features

  • 🔥 Real-time Kafka event streaming
  • ⚡ ML-based delay prediction
  • 📡 Live WebSocket updates
  • 📊 KPI dashboard (deliveries, delay, cities)
  • 💾 PostgreSQL storage for analytics
  • 🐳 Fully Dockerized system

⚙️ How to Run

1. Clone repo

git clone https://github.com/your-username/delivery-ops-dashboard.git
cd delivery-ops-dashboard

2. Create virtual environment:
python3 -m venv venv
source venv/bin/activate

3. Install dependencies:
pip install -r requirements.txt

4. Train ML Model:
python ml/train_model.py

5. Start Infrastructure:
docker-compose up --build

6. Create Kafka Topic:
docker exec -it kafka kafka-topics --create \
--topic delivery_events \
--bootstrap-server localhost:9092 \
--partitions 1 \
--replication-factor 1

7. Run Services:
PYTHONPATH=. python data_generator/kafka_producer.py
PYTHONPATH=. python streaming/flink_job.py
PYTHONPATH=. python realtime/websocket_server.py
streamlit run dashboard/app.py

8. Open Dashboard:
http://localhost:8501

🧠 What This Project Demonstrates
Real-time data engineering pipelines
Event-driven architecture
Streaming + ML integration
WebSocket-based live dashboards
Distributed system design

🔥 Future Improvements:
Apache Flink cluster (real)
React dashboard (frontend upgrade)
AWS deployment (MSK + RDS + EC2)
Grafana monitoring
Kubernetes (EKS)

👨‍💻 Author:
Subhankar Biswas



About

Real-time delivery analytics system using Kafka, ML, Redis and Streamlit.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages