This data dashboard project is a simulated real-time stock trading dashboard built using Python, Kafka, Streamlit, and Docker. It mimics a live trading environment where fake buy/sell orders are generated or submitted manually, and the stock price reacts accordingly. This project demonstrates real-time data streaming using Kafka and real-time plotting with Streamlit.
Whether you're learning Kafka, Docker, or just want to simulate stock movements for fun or demo purposes—this app offers a clean and interactive experience.
- Displays data that updates in real time (every 0.5 seconds)
- Shows current stock price and timestamp
- Includes manual Buy and Sell buttons for user interaction
- Interactive Plotly chart visualizing price over time
- Kafka acts as the streaming backbone.
- A producer generates simulated buy/sell orders.
- A consumer listens for these events and updates a shared JSON file with new prices.
- The Streamlit dashboard reads from this shared file to visualize live trading data.
producer/: Generates and sends simulated orders to Kafka.consumer/: Consumes Kafka events and updates the shared price file.shared/: Storesprice_data.json, the live price file.streamlit_dashboard/: Streamlit dashboard that reads price data and allows user trades.docker-compose.yml: Spins up Kafka, Zookeeper, Producer, Consumer, and Streamlit.
docker-compose up --buildOpen your browser and go to:
http://localhost:8501/