Real-Time Stock Analytics
at Scale

Distributed event streaming platform that processes thousands of stock events per second. Kafka · Spark · InfluxDB · Grafana. Production-ready.

10K+ events/sec
<100ms latency
100% open source

Key Features

Distributed Streaming

Apache Kafka with multi-partition topics, consumer groups, and backpressure control for burst traffic.

Hybrid Storage

PostgreSQL for metadata with optimized indexes. InfluxDB for time-series price data and fast aggregations.

Rule-Based Alerts

Price drops, spikes, high volume, and volatility alerts. Configurable thresholds and severity levels.

Live Dashboards

Grafana dashboards for real-time monitoring, candlestick charts, and trend analysis.

Architecture

StockStream architecture: Yahoo API → Producer → Kafka → Spark Consumer → InfluxDB + PostgreSQL → Grafana

End-to-end pipeline: Yahoo Finance API → Kafka → Spark Streaming → InfluxDB & PostgreSQL → Grafana dashboards. Fully containerized with Docker.

Dashboard Preview

StockStream Grafana dashboard showing real-time MSFT price, volume, candlesticks, and metrics

Real-time stock tracking with candlesticks, gauges, and comparative metrics.

Quick Start

1
docker-compose up -d

Start Kafka, Spark, InfluxDB, PostgreSQL, Grafana

2
pip install -r requirements.txt

Install Python dependencies

3
cd producer && python producer.py

Run the stock data producer

4
spark-submit ... consumer/consumer.py

Start Spark Streaming consumer (see README)

Ready to stream?

Clone the repository and run with Docker in minutes.

View on GitHub