Quits
Shared costs app page template · App screens
A ruled cash book on cream paper: black ink, balances set big in fixed board cells, owed figures in ledger brackets, double rules under every total, and one green that only ever means square.
The first screen is the balance board of Flat 4: four names in a serif and four figures set big in fixed cells like a station board, owed amounts in brackets the way a ledger writes them, a double rule under a net figure that is always 0.00, and the three transfers that square the house. Mark one paid and the changed digits roll to their new values; a person who reaches 0.00 turns green, the only colour on the page.
Below is the book itself, working: switch between Flat 4, a five-person trip to Skye and a blank book; add and remove people; put in bills split equally, by whole-number shares or by exact amounts, with the odd penny shown as you type and an exact split that will not save until it adds up to the penny. The bills ledger, totals and a sticky board beside it update together, and settling, deleting and adding all have undo.
Then a drawing of how six bill-by-bill debts net down to three transfers, the house rules the maths keeps (odd pennies, shares, brackets, limits), prices as ledger lines, a dated changelog, and a sign-up form for opening a book with a CSS-drawn phone beside it. Everything is drawn in HTML, CSS and SVG; there are no images.
The brand is fictional: Quits, a shared-costs book for housemates and trips, made in Leeds. Names, people and figures on the page are invented.
What works
- Mark paid on either board: digits roll, settled people turn green, the transfer count drops, undo from the notice or the Paid back list
- Book switcher tabs (arrow keys, Home and End): Flat 4, Skye at Easter, a blank book
- Add and remove people with validation: empty, duplicate, odd characters, the ten-person limit, and people still on lines of the book
- New bill: what, amount, paid by, and equal, shares or exact parts with a live tally of each share and the odd pennies
- Inline validation: missing description, amount format, zero, over £10,000, nobody ticked, no shares, and exact parts that do not add up (to assign or over)
- Bills ledger with totals; take a bill out or undo a settlement, each with undo
- Fewest transfers found by exhaustive subset search, so cancelling subgroups settle among themselves
- Open a book sign-up: inline validation, loading, error with retry (any email containing fail), and success
States you can link to
script.js reads these from the URL, so you can open the page in a given state to review it, screenshot it or show it to an agent.
| Parameter | What it does |
|---|---|
?group=trip | opens on Skye at Easter: five people, six bills, four transfers. Open ?group=trip |
?state=empty | a blank book: nobody yet and the empty ledger. Open ?state=empty |
?state=settled | every transfer marked paid: all figures 0.00 in green and the Quits line. Open ?state=settled |
?state=mismatch | an exact split of £60.00 that adds up to £57.00, with the error. Open ?state=mismatch |
?signup=invalid | the sign-up form with its inline errors. Open ?signup=invalid |
?signup=loading | the sign-up while it sends. Open ?signup=loading |
?signup=error | the sign-up failed to send, with nothing saved. Open ?signup=error |
?signup=success | the book opened, with the opening balance. Open ?signup=success |
Use it
Copy templates/splitter/ into your project, or download the zip, which has the Screenery badge script already removed. Colours, type, spacing and radii are custom properties at the top of style.css. This template loads no libraries: only its own files and web fonts.
The docs explain the token pattern and how to move a template into React, Vue, Svelte or Astro. The guide has prompts for handing it to a coding agent.