The Revenue Leak Map for SaaS — see where subscription dollars leak, who is affected, and what to fix.
Sellable, acquisition-ready micro-SaaS asset. Built for portfolio depth and clean handoff.
- Revenue Leak Flow — a dollar-proportional Sankey of MRR: retained revenue flows through, six leak types peel off. Ribbon thickness never lies.
- Leak Index (0–100) — a single banded score with a published spec and golden-case tests.
- Honest detection — every dollar traces to a real Stripe object (invoices in retry, past-due invoices, expiring cards, dead trials, live discounts, payment-failure churn). Forward-looking numbers are labeled projected. Disjointness rules prevent double counting.
- Per-customer drill-down — each leak node lists the actual affected accounts and amounts.
- Trend — every sync stores a snapshot; the dashboard charts Leak Index over time.
- Recovery sequences — daily cron emails affected customers (3 sequenced categories), deduped per customer per week, fully audited, dry-run without an email key.
- Branded CFO report — print/PDF export with methodology and basis labels (Pro).
cp .env.example .env # Neon DATABASE_URL + AUTH_SECRET (free tier)
npx pnpm@9.15.0 install
npx pnpm@9.15.0 db:push
npx pnpm@9.15.0 db:seed
npx pnpm@9.15.0 devOpen http://localhost:3000. Demo sign-in (any email + password demo) is enabled in development and disabled in production builds unless ALLOW_DEMO_LOGIN=true.
Deploy (Vercel + Neon + Stripe): see docs/DEPLOY.md.
| Route | Description |
|---|---|
/demo |
Public interactive demo — no account required |
/dashboard |
Leak flow, gauge, trend, drill-down (demo data until Stripe connected) |
/report |
Branded print/PDF leak report |
/settings |
Stripe Connect + billing + recovery toggles |
/sale |
Acquisition memo |
| Path | Description |
|---|---|
apps/web |
Next.js 15 app (UI, API routes, Stripe fetch/map layer) |
packages/leak-engine |
Pure detection + Leak Index + demo data — 21 fixture tests, zero deps |
packages/db |
Prisma schema (Postgres) |
docs/ |
Agent handoff, architecture, Leak Index spec, data room |
Verification: pnpm test (engine), pnpm typecheck, pnpm --filter @leakmap/web e2e (Playwright, public pages). CI runs all three plus a production build against a Postgres service.
Read docs/AGENT-HANDOFF.md first. Obsidian: 01 Projects/LeakMap - Agent Transfer.md.
Source-available under the PolyForm Noncommercial License 1.0.0.
You may view, fork, modify, and use this software for personal, educational, or noncommercial purposes. Commercial use — including running it as a paid service, embedding it in a commercial product, or any use intended for commercial advantage — requires a separate commercial license. Contact the maintainer to discuss terms.
Copyright © 2026 LeakMap. All commercial rights reserved by the author.
