Building Bill Orbit: A Multiplayer Receipt Splitter for the Browser.doc

Building Bill Orbit: A Multiplayer Receipt Splitter for the Browser

23 August 2026 Harry Chapman

I built a zero-account browser bill splitter where everyone at the table scans a receipt, drags items onto hungry animated plates, and never loses a penny to floating-point maths.

Nothing kills the warm glow of a good dinner with friends quite like the twenty-minute forensic accounting tribunal at the end of it.

Usually, one person gets nominated as the human spreadsheet. They squint at a crumpled thermal receipt in dim restaurant lighting, type thirty numbers into their phone calculator while five people shout “I had the halloumi, wait no, we shared the halloumi”, and arrive at a total that is somehow £14.20 short of the bill because everyone forgot the service charge.

Every existing app I looked at wanted everyone at the table to download a 90 MB native app from the App Store, verify an email address, create a password, and add each other as friends just to pay for a pizza.

I built Bill Orbit so one person could photograph the receipt, drop a URL into the group chat, let everyone claim their own food simultaneously in the browser, and have the entire room self-destruct 24 hours later. And because end-of-dinner admin is dreary, I gave everyone at the table a customisable animated plate whose eyes follow your finger and physically eat the food you drag onto it.

A shared table, disguised as software

Split the bill. Feed the plates.

One temporary room, one editable receipt and no designated table accountant.

Try Bill Orbit
Bill OrbitThe Wobbly Table

Fish & chips£18.50

2 × House lager£13.00

Garlic bread£6.00

Sticky date pudding£9.50

Total£47.00
£0 baseline cost24 hours before expiryLive shared editsNo account required

Zero accounts and a 24-hour self-destruct

The screen is laid out like a tabletop: the parsed receipt sits in the middle, and circular plates for everyone in the group orbit around it (or sit in a horizontally scrolling bottom tray on phones narrower than 768 pixels).

Under the hood, the frontend is vanilla TypeScript talking over WebSockets to Cloudflare Workers and Durable Objects. Opening a new bill mints a six-character room code and a cryptographic token. There are no sign-ups, no databases to pay for while idle, and no stored receipt images. The Durable Object holds the authoritative room state in memory, persists active edits to KV, and runs a scheduled cleanup that permanently wipes any room that has been quiet for 24 hours.

Four rules before the feature list

Choose a design principle

Make people the interface

Participants became animated plates rather than names in a spreadsheet. Their eyes follow the action, their mouths react when food arrives and their size grows with their share.

Solving the 2 × House Lager problem

Almost every OCR receipt splitter falls over on the exact same line:

2 × House Lager £13.00

If you and your friend had one pint each, a standard receipt parser treats that row as a single £13.00 monolith. Either one of you takes the whole £13.00 and does mental arithmetic later, or somebody has to manually delete the row and type two £6.50 beers by hand.

Bill Orbit automatically splits multi-quantity lines into individual draggable pills worth their fraction of the line price (£6.50 each), while keeping the original receipt row intact. Drag one pill to your plate, drag the second pill to your friend’s plate, and you are done.

Try the core interaction

Two beers should look like two beers

2 × House lager£13.00

Choose one of the two drinks, then choose a plate.

The hitbox bug where hungry plates stole your beer

Giving the plates cartoon physics created my favourite bug of the whole project.

When you drag a food item across the table, nearby plates track the cursor with their eyes and lean in with their mouths open. When you drop the item, the plate plays a squash-and-stretch chewing animation.

In my first mobile build, the drop target was the animated SVG element itself. On a narrow phone tray where two plates sat shoulder-to-shoulder, dragging an item towards Plate A made Plate B lean over in anticipation. As Plate B stretched, its SVG bounding box expanded right underneath the user’s thumb and intercepted the drop. Your friend’s plate literally lunged across the table and stole your garlic bread.

The fix was to divorce the physics from the art. Every plate now has an invisible, mathematically fixed circular collision hitbox underneath it. The visible SVG face can squash, stretch, lean and chew as dramatically as it likes without moving a single pixel of the drop zone.

Real-time multiplayer over flaky pub Wi-Fi

Pubs and basement restaurants have terrible mobile signal. If two people tap the same portion of fries at the same time on a high-latency 4G connection, the room cannot afford to duplicate the cost or lose an assignment.

The Durable Object acts as a single-threaded referee. When you drag an item onto your plate, your browser updates optimistically for zero-latency feedback and fires an ASSIGN_ITEM message over the WebSocket. The server processes messages strictly in arrival order: if someone else claimed that pill 40 milliseconds before you, the server rejects your claim and pushes the canonical state back to your screen.

Live cursors share the same WebSocket pipe, packed into a tiny binary Uint8Array and throttled to 30 Hz per client. They never touch persistent storage and vanish the instant a socket disconnects.

What happened when Bill Orbit went to Berlin

The OCR pipeline runs locally via Tesseract.js and WebAssembly on capable desktop browsers, or falls back to a serverless vision endpoint on phones. It worked beautifully on British receipts right up until I fed it a restaurant bill from Berlin:

2 x Radeberger Pils A          12,00
1 x Vodka White Edition B       9,20
1 x Blaubeer Mojito B          11,00
2 x Schnitzel Klassik A        28,60
 
MWST A 19,00%                  10,07
MWST B  7,00%                   2,01
 
SUMME EUR                     136,10

Three things exploded at once:

  1. The parser expected decimal points (12.00), so European decimal commas (12,00) scrambled the price extraction.
  2. German receipts print a single-letter tax-band code (A or B) after every item name, which got glued onto the item strings and confused quantity parsing.
  3. The tax breakdown rows at the bottom (MWST A 19,00% 10,07) looked enough like <name> <price> that the parser cheerfully added €12.08 of German value-added tax to the table as two extra dishes.

I rebuilt the normaliser to unify decimal commas before converting prices to integer minor units, strip trailing tax-band codes, and filter out lines matching regional tax keywords (MWST, TVA, IVA, VAT, TAX) paired with percentage signs.

ALEX GASTSTÄTTEN · BERLINRECHNUNG

2 × Radeberger Pils12,00

Vodka White Edition9,20

Blaubeer Mojito11,00

Tequila Sunrise10,10

Super Salad12,50

Schnitzel Klassik28,60

UNBAR TOTAL136,10 EUR

Recognition should fail helpfully

The useful lines vanished with the error

The first version found useful items, noticed that their prices did not match the printed total, then discarded everything.

Partial result hiddenThe person sees an error and has to begin again.

Even more importantly, I killed the “all-or-nothing” parser rule. Originally, if a crumpled crease hid one price so the extracted items didn’t sum to the printed total, the scanner threw up its hands and discarded the whole receipt. Now it keeps every line it recognised, draws green bounding boxes on the photo, tells you the exact shortfall (say, £4.50 missing), and lets you tap the unrecognised smudge on the photograph to add the missing line.

Four smaller traps that bit during testing

  • Over-eager input clamping: Early on, a validation rule stopped you typing an item price higher than the remaining unassigned balance. If £5.00 was left unallocated and you tried to fix an OCR typo from £2.00 to £12.00, the input box blocked you the instant you typed 12. Inputs now let you type freely and only sanitise, clamp and broadcast on blur or Enter.
  • Mystery tip inflation: When proportional tips were enabled, a plate with £20.00 of food on it would display £23.50 in big text, prompting immediate accusations that the app couldn’t add up. Plates now explicitly print £20.00 items + £3.50 tip above the total.
  • The IEEE 754 penny heist: In JavaScript floating-point arithmetic, 0.1 + 0.2 evaluates to 0.30000000000000004. Bill Orbit converts every price into integer pennies or cents at the boundary. And when a £10.00 dish is split three ways (1000p ÷ 3 = 333p remainder 1p), an explicit deterministic remainder rule hands out 334p, 333p and 333p in participant index order so the sum of the plates always equals the receipt total to the exact penny.
  • Blurry retina faces: The first custom face-drawing canvas saved bitmap rasters, which turned into a blurry smudge on 3× DPR phone screens. The editor now records pen strokes as normalised vector coordinates and renders them as crisp inline SVG paths at any zoom level.

Verification

Every arithmetic rule and multiplayer race condition is backed by automated unit and end-to-end tests:

Test areaCasesExpected result
CurrencyUneven divisions across 3, 7 and 11 peopleIndividual shares equal the receipt total to the exact penny
ReconnectionDisconnects and reconnects under a throttled connectionThe browser restores state without duplicating assignments
Receipt parsingSingle-column, multi-column and European comma receiptsItems are extracted while MWST/VAT tax blocks are excluded
Concurrent dropsTwo people claim the same item in one state tickThe first claim wins and the second browser snaps back
Display scaling200% zoom and mobile layout changesPlates remain readable and fixed hitboxes never overlap

Seven rounds of iteration

The route from useful to alive

Stage 1 of 7 · Idea

A shared tabletop, not a dashboard

Put one receipt in the centre and make the people around it the controls.

The table is open

Scan a receipt, invite some friends and feed the plates.

No account is needed, receipt photographs are not stored and each room disappears after 24 hours.

Open Bill Orbit ↗
Page 1 1,392 words 7 min Play