Revenue & retention

SaaS Retention Warehouse

A full analytics warehouse for SaaS revenue and retention. Built a star schema in DuckDB, modeled cohort retention, MRR waterfall, NRR, and LTV, and served metrics through a FastAPI + React dashboard.

  • DuckDB
  • dbt
  • FastAPI
  • React
  • Cohort Analysis

Role

Data modeling, dbt transformations, API and dashboard build

Timeframe

2025

The problem

Subscription businesses track revenue in billing tools that can't answer retention questions: which cohorts stick, where MRR leaks, and what a customer is actually worth over time.

Approach

  1. 01

    Designed a dimensional star schema (customers, subscriptions, invoices, date) in DuckDB so every metric traces back to a single grain.

  2. 02

    Built version-controlled dbt models for staging, intermediate, and mart layers with tests on keys and revenue totals.

  3. 03

    Modeled cohort retention curves, an MRR waterfall (new, expansion, contraction, churn), net revenue retention, and LTV.

  4. 04

    Exposed the marts through a FastAPI service consumed by a React dashboard with cohort, segment, and period filters.

Outcome

  • One reconciled source of truth for MRR, NRR, and LTV across the whole subscription lifecycle.

  • Cohort retention curves that isolate which acquisition months and plans drive long-term revenue.

  • Reproducible, tested transformations — a metric change is a pull request, not a spreadsheet edit.