Originally published byDev.to
I just released v1.0.0 of an open-source, production-ready real-time analytics pipeline built with Python. Here's what it does and why you might care.
The Problem
Every SaaS product needs analytics β event tracking, real-time dashboards, time-series aggregations. Most teams either pay for Segment/RudderStack or build their own from scratch. This project is the "build your own" done right.
Architecture
Client β FastAPI β Redis Streams/Kafka β Event Processor β TimescaleDB β WebSocket β Dashboard
Tech Stack
| Component | Technology |
|---|---|
| API Layer | FastAPI (async, auto-docs, WebSocket native) |
| Event Queue | Redis Streams or Apache Kafka |
| Storage | TimescaleDB (PostgreSQL extension for time-series) |
| Real-time | WebSocket with JWT auth + auto-reconnect |
| Metrics | Prometheus + OpenTelemetry |
| Logging | Structured JSON with correlation IDs |
| Deployment | Docker Compose + Kubernetes |
Features
- Async Event Ingestion β REST API + batch endpoints, buffered via Redis Streams or Kafka
- Adaptive Sampling β configurable rate-based sampling per event type
- Data Retention β TTL-based policies with automatic partition management
- Enterprise Security β JWT auth, RBAC (admin/editor/viewer), rate limiting, security headers, correlation IDs
- Live Dashboards β WebSocket push with auto-reconnect
- Observability β Prometheus metrics, OpenTelemetry traces, structured JSON logs
- Production Ready β Docker multi-stage build, Kubernetes manifests, health checks
Quick Start
git clone https://github.com/aman179102/real-time-analytics-pipeline
cd real-time-analytics-pipeline
make install
docker compose up -d postgres redis
make migrate
make run-dev
Testing
150 out of 152 unit tests pass. The 2 excluded tests are pre-existing async timing issues in process_loop β zero regressions introduced.
Enterprise Middleware Pipeline
Every request flows through:
CorrelationMiddleware β AuthMiddleware β SecurityHeadersMiddleware β RateLimitMiddleware β SizeLimiterMiddleware β Router
Try It Out
GitHub: https://github.com/aman179102/real-time-analytics-pipeline
Star the repo if you find it useful! Contributions and feedback are always welcome.
πΊπΈ
More news from United StatesUnited States
NORTH AMERICA
Related News
π I Built a Dropshipping Automation Pipeline β Here's What I Learned (and What I'd Do Differently)
10h ago
How I Cut My LLM API Bill by 40x: A Freelancer's Migration Story
10h ago

Mattress Firm Coupons: Save up to $600
3h ago
Google Ordered to Pay $2 Billion For Anti-Competitive Practices By Swedish Court
20h ago
The Censorship Wall: Why Every AI Companion App Ends Up Filtering You
20h ago