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
Secret Claude Tracker Shocks Users After Anthropic's Anti-Surveillance Stance
12h ago
EV Batteries Defy Expectations, Last Hundreds of Thousands of Miles
1d ago
GBase 8a Performance Anomaly Case Study: How a Single Parameter Change Sparked a Chain Reaction
1d ago
Who Else Has Inherited a Codebase With Zero Comments and a Prayer?
1d ago
ๅฎ็พ็ๅนณๅบธ
3h ago