RMFU Desk

Engine room · /tools

Calculators that ship as product, not slides

After sign-in, one route hosts 14 modes of desk math — each backed by callables in app/engines/tools/service.py, the same module the homepage signal calls via the public demo API.

23public functions
75,716lines Python (app/)
63route modules

Replace the sample with your own query string after the gate. Marketing demo: POST /api/public/marketing-desk-demo (allowlisted).

What runs under the hood

Routers validate query params and call thin wrappers; numerics stay in one service module so tests and marketing demos cannot drift from production.

01 — Parse & coerce

FastAPI Query models coerce types; lists (cashflows) arrive as comma-separated strings and decode to float[].

02 — Pure functions

npv, irr, npv_schedule_rows, rule_of_40_from_pct, wacc_cost_of_capital

No ORM, no tenant — deterministic outputs for a given input vector.

03 — Render inline

Templates re-render the same page with result dicts — no client-required JS for the signed-in tool index.

Source spine (excerpt)

Leading lines of the real tools module — not marketing lorem.

"""Operator pocket tools — small pure functions used by /tools.

Each function returns a dict with the inputs echoed back, the result, and a
short interpretation sentence (in casual exec tone).
"""
from __future__ import annotations

from dataclasses import dataclass
import math
from typing import Iterable


# -------- IRR / NPV ---------------------------------------------------------

def npv(rate: float, cashflows: list[float]) -> float:
    return sum(cf / ((1 + rate) ** t) for t, cf in enumerate(cashflows))


def npv_rate_sensitivity(rate: float, cashflows: list[float], bump: float = 0.01) -> dict:
    """±bump hurdle NPV and approximate $ / 1% change in NPV (last period scale)."""
    base = npv(rate, cashflows)
    up = npv(rate + bump, cashflows)

Mode inventory

npv, irr & schedules · compound · multiples · breakeven · kelly · margin of safety · cash conversion cycle · coverage · payback · wacc · SaaS unit economics · Rule of 40 · DuPont ROE · ROIC vs WACC

Slug Role Typical params
npvHurdle PV + IRR + schedule slicerate, cf
compoundFV / rule of 72principal, growth, years
kellyEdge → sizewin_prob, win_amt, loss_amt
mosPrice vs intrinsicmos_price, iv
cccCash conversiondso, dio, dpo
r40Rule of 40r40_g, r40_m
waccCAPM blendrf, beta, mrp, pretax_rd, tax, de
dupontROE decompositiondup_nm, dup_at, dup_em
spreadROIC − WACCspr_n, spr_ic, spr_w
…plus breakeven, multiples, coverage, payback, SaaS unit economics, and more inside /tools.

Three-minute mental model

RMFU is one surface for reading (brief + pulse), remembering (library + drills), and stress-testing (risk, macro, scenarios). Sign in to reach your tenant desk; this public site is the story, not the datastore.

Open the full guided tour → (recommended instead of this short blurb).

Use Open desk when you already have access — you will authenticate at the gate like any other protected route.

Sign in

Live calculators vs. marketing

After sign-in, /tools hosts shareable one-page calculators (NPV, payback, Kelly, and more). This public tools hub explains what exists for crawlers and prospects.

Open desk

Why drills matter

Bookmarks decay. RMFU uses short, spaced repetitions so vocabulary and frameworks stay retrievable when you are in front of a committee or a live tape — not only when you are reading alone.

Nudge inputs

Edit fields, then Apply & refresh (or use on the card). Same payload as the public demo API.

Last response JSON

app/engines/tools/service.py

Leading lines of the real module (marketing excerpt).

"""Operator pocket tools — small pure functions used by /tools.

Each function returns a dict with the inputs echoed back, the result, and a
short interpretation sentence (in casual exec tone).
"""
from __future__ import annotations

from dataclasses import dataclass
import math
from typing import Iterable


# -------- IRR / NPV ---------------------------------------------------------

def npv(rate: float, cashflows: list[float]) -> float:
    return sum(cf / ((1 + rate) ** t) for t, cf in enumerate(cashflows))


def npv_rate_sensitivity(rate: float, cashflows: list[float], bump: float = 0.01) -> dict:
    """±bump hurdle NPV and approximate $ / 1% change in NPV (last period scale)."""
    base = npv(rate, cashflows)
    up = npv(rate + bump, cashflows)