Skip to content
Acorn Works
All work

ROUTE OPERATIONS

Replacing the legacy app that ran the money

Associated Vending — vending and amusement route operator

A collection running through the splits engine into operator and location sharesA submitted collection enters a data-driven splits engine with an off-the-top fee, and is divided into an operator share and a location share. The remaining cent is allocated by an administrator's rule, and a statement is emailed to the location owner automatically.COLLECTIONSPLITS ENGINEOFF THE TOPOPERATORLOCATIONROUNDING GOES YOUR WAYAUTO-EMAILEDINTEGER CENTS · APPEND-ONLY HISTORY · DRY-RUN IMPORT
Client
Associated Vending
Work
ROUTE OPERATIONS
Built with
Supabase · PostgreSQL · Row-level security
Result
Splits right to the penny

Situation

The starting point

The business ran collections, machine tracking, and revenue splits with location owners on a Windows application called Smart. It worked, in the sense that the company had been run on it for years. But the split rules were baked into the software, the office couldn't see the history behind a number, and getting a statement to a location owner meant somebody assembling it by hand.

What we built

Scope

  1. 01Multi-tenant route management covering locations, machines, meters, collections, the money room, and splits
  2. 02A customer-facing portal for location owners, with strict data isolation from the operator's own records
  3. 03Location statements generated and emailed automatically the moment a collection is submitted
  4. 04CSV import for bulk data, and a multi-tab workspace because office staff keep several records open at once

Details that mattered

Where the work actually went

  1. 01The splits engine is fully data-driven with an off-the-top fee model. Every hard-coded fee rule from the old system was removed and re-expressed as data an administrator can see and change.
  2. 02Rounding is configurable. An administrator decides whether the remaining cent goes to the location or the operator, and there's an exact-penny mode for locations that audit closely.
  3. 03Money is stored as integer cents and meter readings as integers. No floating point anywhere near a dollar figure.
  4. 04Row-level security is scoped to route ownership plus explicit backup grants, so a collector sees the locations they're responsible for and nothing else.
  5. 05Machine movement history is append-only and records are soft-deleted, never removed. The office has an audit log viewer.
  6. 06CSV import runs with dry-run and commit parity: you see exactly what an import will change before you let it change anything.

What it proves

Rounding allocation rules and dry-run imports are not features anyone puts in a demo. They're what you build after you've watched a reconciliation go wrong and had to explain it to the person on the other side of the split.

Stack

  • Supabase·
  • PostgreSQL·
  • Row-level security·
  • CSV import

Have something like this?

Tell us what's broken, in your own words. We'll come back with whether we can help and roughly what it would take.