Saturday, April 18, 2026
Day 16 — billing schema is in
The hardest schema work of the project so far. Fee schedules, billing packages, billable charges, billing cycles — all wired up so an invoice can carry a base monthly fee plus arbitrary trainer-logged extras. None of the competitors do this.
2 min read · Backfilled retrospective — written 2026-05-04
Daily entry
Day 16of building EquinePilot
Currently Day 77 · founder build log
Milestones reached
- ✓Flexible billing
If there's a single piece of EquiPilot that's going to make a barn switch off whatever they're using now, I think it's going to be billing. Today the schema went in.
The mental model I've been carrying around for two weeks: a barn's monthly invoice is a base fee (program / package / board) plus a variable list of add-ons that accumulated over the month (lessons beyond the package, hoof oil applications, haul-in fees, extra training rides, supply purchases). Competitors handle the base part. Almost none handle the variable part well — managers end up tracking those in a spreadsheet and adding them to invoices manually.
Today's schema:
fee_schedule_items— the menu of chargeable things a barn can bill for. Category, name, default amount, flagged if it's loggable by trainers.billing_packages— the configurable replacement for the hardcoded ProgramType enum I started with (an early bad call I'm fixing now). Each package has a monthly rate, a lessons-per-week count, and a description.client_packages— assigns a package to a client, with effective dates so changes don't retroactively rewrite history.billable_charges— variable line items. Created by trainers in the field ("Logged a haul-in for the Smith family — $40"), reviewed by the manager before they go on the invoice.billing_cycles— the invoice itself. Knows its period, its package fee, its rolled-up charges, its status (draft / sent / paid / void), and its sequence number for display.
Plus barn_settings extended with billing day, invoice prefix, and starting invoice number. Plus QBO fields prepped for next week (qbo_customer_id, encrypted token storage), but no QBO code yet — the plumbing is there.
What's still ahead: the actual surfaces (fee schedule manager, package CRUD, client assignment), the trainer logging flow, the manager review queue, the bulk "generate invoices for every client" button, the PDF generation, and an invoice correction workflow because real life doesn't always go right the first time. None of that is small. But schema first. The shape has to be right before the UI gets built on top of it.
Spent way too long today picking between cents-as-integer columns vs. numeric(10,2) for monetary amounts. Went with cents. Easier to reason about, no float weirdness, everywhere I render it I just formatCents() it. (You make this decision once per project. Make it the boring way.)
Tomorrow: the surfaces. End of week: invoices that actually generate.