← Back to WorkAutomation

Digital Breakfast

A self-operating finance machine for a family card shop. Event-driven pipelines reconcile every sale to the penny overnight, and each morning an intelligence layer fuses live numbers with accumulated business rules into one ruthless "what matters today" email.

Next.jsSupabaseVercel CronQuickBooks APIResend

The Challenge

A one-person card shop generates big-company financial complexity: sales across five channels, distributor preorders that charge weeks after ordering, installment plans, financed deals with their own payout math, and accounting books that drift out of sync the moment anyone stops watching. Keeping it straight by hand meant every morning started with an hour of tab-hopping—or worse, with problems nobody noticed until tax time.

The Approach

I built an event-driven orchestrator on Next.js + Supabase: a fleet of scheduled jobs that sync channels, import receipts, match bank transactions, and reconcile the books to zero—each one idempotent and self-healing. On top sits the morning intelligence layer: hard-won business rules ("a filled break recognizes no P&L until it closes", "distributors charge when the release ships") live as rows in a rules table with machine-checkable trigger conditions. Every morning the system evaluates every rule against live data and opens the daily brief with at most six plain sentences—each one a number that matters and why it surfaced. Selection over completeness; the full dashboards stay below as reference.

The Outcome

The business runs its own back office. Books reconcile to zero continuously instead of annually, drift gets caught within a day, and mornings start with a two-minute read instead of an hour of dashboards. The rules table means every lesson learned becomes a permanent tripwire—the system remembers so the operator doesn't have to.

Key Details

  • Event-driven orchestrator: 19 scheduled jobs syncing 5 sales channels into one Supabase source of truth
  • Morning intelligence layer: business rulings stored as data-driven triggers, evaluated against live numbers daily
  • Ruthless selection: max 6 items surface each morning—one sentence, one number, one reason
  • Reconciliation-to-zero: automated bank-feed matching plus daily drift detection with same-day alerts
  • Automated investor reporting: per-deal briefs generated and delivered on their own schedule
  • Fail-open design: a broken rule evaluator degrades to a log line, never a missing morning email
  • The live stats above come from a sanitized public endpoint—aggregate counts only, by design