Skip to content

Repository files navigation

Paper Route

License: MIT CI

A business simulator that feels like a game. Build a business out of blocks — revenue streams and expense categories — tune them with sliders, and watch a rigorous 36-month P&L and cash flow projection react instantly.

Paper Route lives halfway between a game and a financial tool: the interface and interaction feel like gameplay, but the analysis underneath is real. "What if I hire two people and raise prices 10%?" is answerable in under a minute, and every number behind the answer traces line-by-line to a real monthly statement. The engine is deterministic — same inputs, same outputs, always — because that's what makes the analysis trustworthy.

Local-first: no accounts, no server, no tracking. Your scenarios live in localStorage, and export to JSON any time you want a backup or to hand a scenario to someone else.

Supported business models: manufacturing / physical products, e-commerce / retail, and services / consulting.


Screenshot tour

The Shelf — your scenarios as save-slot cards, each with a mini cash sparkline. Fork one to try a variant without losing the original.

The Shelf: two scenario cards, "+10% price" and "Base case," each showing a business name, a cash-curve sparkline, and Open/Fork/Export/Delete actions.

The Board — lanes of revenue and expense blocks; clicking a block slides in an inspector with its sliders and fields, rendered straight from the block catalog. Every change recomputes the full 36-month projection live.

The Board with the Furniture Line block's inspector open, showing Starts Month, Unit Price, Starting Units per Month, Monthly Growth, Max Units per Month, Materials Cost per Unit, and Labor Cost per Unit as sliders with exact-value fields.

Compare — pick 2–3 scenarios and see their cash curves overlaid, plus a KPI table with deltas called out ("break-even 2 months later," "low point $9,294 deeper").

Compare view: an overlaid cash-balance chart for "+10% price" vs "Base case," and a KPI delta table showing cash low point, sustained break-even, and revenue/profit by year with colored deltas.

The Ledger — a real monthly statement: revenue by block, COGS, gross profit, opex by block, operating profit, then the cash section. Every number on every other screen traces back to a line here. CSV export included.

The Ledger: a monthly table with Profit & Loss rows (revenue by block, COGS materials/other, gross profit, opex by block, operating profit) and a Cash section (collections, materials paid, other paid) across months M1–M9 of Year 1.


Features

  • Live sandbox — drag a slider, every chart and KPI recomputes and animates instantly.
  • Block-based builder — 13 block types across revenue and expenses, each with catalog-defined sliders, fields, and help text.
  • Starter templates — Manufacturing, E-commerce, and Services templates drop 4–6 tuned blocks so you see live numbers within 30 seconds.
  • Scenario forking & comparison — duplicate a scenario like a save state, change one thing, compare side-by-side.
  • The full ledger — a real 36-month statement with year toggles and CSV export, so nothing on screen is a black box.
  • Import / export — every scenario (or your whole collection) exports as pretty-printed, versioned JSON and re-imports cleanly, with validation that never crashes the app on a bad file.

How the math works

computeProjection(scenario) is a pure function — no React, no DOM, no side effects — that turns a scenario into a 36-month projection. It runs on every slider tick.

The P&L layer (per month)

  1. Revenue per block, by its own math (unit ramp × price, retainer clients × fee, billable hours × utilization × rate) → total revenue.
  2. COGS per block, split into a materials-like portion and an "other" portion — tracked separately because they cash-flow differently → gross profit.
  3. Opex per block (staff, rent, marketing, shipping, one-time purchases, etc.) → total opex.
  4. Operating profit = gross profit − opex.

The cash layer (why profitable businesses die)

  • Collections lag revenue by your customer terms: immediate (0 months), net-30 (1 month), or net-60 (2 months). Sales in the final months of the 36-month window may collect after it ends — that cash is honestly left out, not smeared back into the window.
  • Materials payments follow your supplier terms: paid in the sale month (on delivery), or one month early (prepay). The prepay month-1 edge case: a month-1 purchase can't be paid before the window starts, so month 1's payment covers both month 1's and month 2's materials — the total paid across the horizon is conserved, just front-loaded by one month.
  • Everything else — labor cost, all other opex, one-time purchases — is paid in the month it's incurred.
  • Net cash per month = collections − materials paid − everything-else paid. Running cash balance = starting cash + the cumulative sum.

Derived metrics

  • Cash low point — the minimum running balance and the month it hits. The headline "will this business survive" number.
  • Sustained break-even month — the first month after which operating profit stays ≥ 0 for the rest of the horizon. A business that dips back into the red later doesn't get credit for an earlier false start.
  • Per-block unit economics — contribution margin, in dollars and percent, for every unit-based revenue block (product lines, retail SKUs).
  • Break-even monthly revenue — fixed opex ÷ blended contribution margin, computed at the month-12 cost structure. "Blended" means revenue-weighted across your revenue blocks, with shipping and percent-of-revenue expenses counted as variable.
  • Year totals — revenue and operating profit for years 1, 2, and 3, plus ending cash at month 36.

The honesty rule

Whenever a metric is mathematically undefined — no break-even, a non-positive margin — the engine returns a typed n/a. The UI shows an honest empty state. It never shows NaN, Infinity, or a cheerful fake number. Money is computed in floating point and rounded only at display time; the engine's golden-file tests assert every value to the cent.

What it deliberately isn't

No taxes, no loans or funding mechanics beyond starting cash, no depreciation, no balance sheet, no run-the-clock simulation or random events. These are honest simplifications, not oversights — see §12 of the design spec for the full list and reasoning.


Local development

pnpm install
pnpm dev        # start the dev server
pnpm test       # run the test suite
pnpm typecheck  # tsc --noEmit
pnpm lint       # eslint
pnpm build      # typecheck + production build

Requires pnpm and Node 22+.

Tech stack

Vite · React 19 · TypeScript (strict) · Tailwind CSS v4 · Zustand · Zod · Recharts · Vitest · ESLint · pnpm · GitHub Actions · GitHub Pages.

No backend, no accounts, no database. All data lives in your browser's localStorage, plus whatever you explicitly export.

License

MIT — see LICENSE. Full design spec: docs/superpowers/specs/2026-08-02-paper-route-design.md.

About

A business simulator that feels like a game — build a business out of blocks, tune it with sliders, and watch a real 36-month P&L and cash flow projection react instantly.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages