Wardian docs

Loan planner

Try it

The app runs here in your browser. Nothing you type leaves it; what it saves stays in this browser, and Claude is off here. Open it on its own.

Download loan-planner.wardian Import it in Wardian: Settings → Import.

For anyone weighing up a mortgage or a loan: see the monthly payment, the interest paid over the whole loan, when it is paid off, and how much a little extra each month saves.

What you put in#

FieldTypeUnitAllowedDefaultRequired
Amount borrowedwhole numberthe currency1 to 100,000,000300,000yes
Interest ratedecimal, 2 places% a year0 to 506yes
Termwhole numberyears1 to 5030yes
Extra payment each monthdecimal, 2 placesthe currency0 to 10,000,0000 (empty means 0)no
First paymentmonthmonth and year1950-01 to 2100-12next monthyes
Currencyone of 8codeUSD, EUR, GBP, CAD, AUD, CHF, JPY, INRUSDyes

What it shows#

How it behaves#

Layout#

Two columns: the loan on the left, the results on the right; one column on a phone. Tab order is the reading order: the fields from top to bottom, then the chart, then Download.

PanelHolds
Your loan (aside)The loan: Amount borrowed (size-sm, num, currency beside it); Interest rate (size-xs, num, "% a year") and Term (size-xs, num, "years") on one row. Payments: Extra payment (size-sm, num, currency beside it); First payment (month, size-sm) and Currency (select, size-xs) on one row. Each field has a hint that becomes its error.
SummaryFour tiles (monthly payment, total interest, total paid, paid off) and what the extra saves. Empty: "Fix the highlighted field to see results."
Balance over timeThe chart, its reading of the month under the pointer, and a legend.
ExportDownload schedule (CSV), with its state beside it.

How it is built#

A Wardian suite of six sealed apps; WebAssembly does the amortization.

AppSlotJobContract
inputsasideThe fields, checked with Loan's parsers; remembers the loan.emits loan:changed (retained); storage
engine—Runs engine.wasm: the monthly payment and a row per month.provides schedule; asset
planner—Turns each change into one plan for every viewer, with and without the extra payment.listens loan:changed; needs engine.schedule; emits plan:ready (retained)
summarymainThe headline numbers.listens plan:ready
chartmainBalance over time.listens plan:ready
exportmainThe schedule as CSV.listens plan:ready; claude:downloads

shared/loan.js holds one parser per field (the table above, as code), and shared/format.js the money, month and duration formats; both are in suite.json "scripts", so every frame has its own copy. The engine's source is src/lib.rs; rebuild engine.wasm with ./build.sh.

This page is apps/loan-planner/README.md in the repository. Something wrong or missing? Change that file.