The Problem
Founders and finance operators running recurring subscription businesses struggle to extract true net MRR growth from raw payment processor dashboards. Stripe and Chargebee log individual invoice events, but calculating Net Revenue Retention (NRR), monthly cohort decay, and customer expansion requires complex dimensional transformations that off-the-shelf dashboards often obscure.
I built RevenueRadar to provide instant, audit-grade financial clarity: connect billing webhooks, ingest invoice line items into an idempotent data pipeline, and render real-time cohort retention curves with sub-second query performance.
Architecture & Data Pipeline
The system is built on a four-stage decoupled architecture:
- Ingestion Webhooks: Secure Node.js endpoints verify Stripe/Chargebee HMAC signatures and push raw payload events into an asynchronous Redis queue.
- ETL Normalization: Background workers normalize disparate currency exchanges, handle pro-rated upgrades/downgrades, and categorize transaction deltas (New, Expansion, Contraction, Churn, Reactivation).
- Time-Series Storage: Normalized records populate a PostgreSQL database indexed for high-speed cohort aggregation and moving-average calculations.
- Interactive Telemetry Interface: A Next.js front-end with optimized Canvas visualizations allows executive teams to slice revenue by plan tier, acquisition channel, and geography.
The Stack
Key Features Delivered
- Live MRR Breakdown Waterfall: Visualizes New MRR, Expansion, Contraction, and Churn in real time.
- Cohort Retention Heatmap: Tracks month-over-month customer retention percentages across 12 consecutive signup cohorts.
- LTV & CAC Payback Engine: Computes blended and organic Customer Acquisition Cost payback periods automatically.
- Automated Churn Early Warning Alerts: Triggers Slack and email webhooks when account payment failures (dunning) exceed defined thresholds.
Architectural Lessons
Handling webhook concurrency was the critical technical challenge. High-volume Stripe event storms during subscription billing cycles can produce out-of-order execution. Implementing a Redis-backed distributed lock with event version timestamps prevented race conditions and ensured zero duplicate revenue recording.