Skip to content

02 / In-house product

2026

Metriclens

SaaS metrics computed once, correctly, for everyone

  • NEXT.JS
  • FASTAPI
  • POSTGRES
  • DUCKDB
  • TYPESCRIPT
  • OPENTOFU

Summary

Metriclens turns raw contract data into the SaaS metrics finance teams argue about — MRR, CMRR, expansion, churn — from one authoritative methodology instead of a spreadsheet nobody fully trusts. A Next.js front end over a FastAPI engine, money stored to the cent, formulas declared rather than hand-coded. In development.

A · Problem

SaaS metrics get recomputed in a dozen spreadsheets and never agree. Is that dollar new, expansion, or contraction? Different tabs, different answers — and the number that reaches the board is whichever one was opened last.

B · Approach

A declarative metrics engine: formulas parsed, dependency-resolved, and compiled to SQL or run vectorized over a hybrid Postgres and DuckDB store. Currency lives as integer cents, never floats; contracts ingest through generated, per-entity Excel templates; authorization is graph-based across organizations and their operating entities.

C · Artifacts

backend API handlers
216
app routes
46
React components
93
Postgres tables, cents-precise
14

A from-scratch formula parser, dependency resolver, and SQL generator behind a single written methodology; a hybrid accessor so a metric runs as generated SQL or vectorized in memory; S3-versioned data on OpenTofu-managed infrastructure.

D · Outcome

One authoritative number per metric, per entity — the same answer whoever asks. In development toward launch.