Skip to content
decent4Start a project

Case study — Workflow design

Receipt reconciliation: from shoebox to close package.

LedgerLens is a pre-accounting pipeline Kyle designed for solo operators: forward an invoice, photo a receipt, hand your accountant a clean monthly close package.

This case study documents the operational system: intake, extraction with confidence flags, matching and review, exception handling, and close export.

Honest status: this is a workflow case study of a designed system. MVP features are still in development. No live production customer is claimed, and bank-feed matching was cut from v1.

Problem

Solo operators (plumbers, freelancers, Etsy sellers, one-truck landscapers) run the same broken pipeline. Receipts pile up in a glovebox. Invoices sit in an email folder. Every January the whole mess lands on an accountant who has to reconstruct twelve months of history.

The operator does not want accounting software. What they actually do is receive documents. What the accountant needs is those documents, categorized, totaled and exportable.

The real failure mode is silent guesses. A wrong total in a tax export is worse than no product.

Before

Kyle mapped what actually happens before designing anything:

  • Capture is ad hoc: glovebox, email folder, phone camera roll, no single inbox.
  • Categories are guesses: no vendor memory.
  • January is archaeology: the accountant reconstructs, and deductions get missed on faded receipts.
  • No exception path: duplicates, ambiguous vendors and low-confidence reads have nowhere to land.

What was designed: five stages

  1. IntakePer-org forwarding address, mobile photo capture, content-hash deduplication.
  2. ExtractionVendor, date, total, tax and category. Every field carries a confidence score.
  3. Match + reviewAmount, date window, normalized vendor. Auto-confirm only above a conservative threshold.
  4. Exception queuePeople decide on mismatches, ambiguity, duplicates and gaps.
  5. Close packageBlocked until the review queue is clean. The accountant gets a share link.

How it works

Ingestion. Invoices are forwarded to a per-org address, or receipts are photographed through a mobile capture flow. Attachments go to object storage and a content hash deduplicates within the org.

Extraction. A worker calls the extraction model with a structured-output schema. Fields below threshold create review items. Nothing below threshold ever reaches an export.

Vendor rules. A category correction (“this Shell station is Fuel, not Meals”) becomes a vendor rule, so next month’s identical receipt skips review.

Monthly close. A job attempts to close the prior month and refuses if unresolved review items exist, emailing the operator a deep link instead. When clean, it produces a PDF cover (category totals, flagged list, missing-receipt gaps), QBO- and Xero-importable CSVs and a ZIP of source images. The accountant share link is hashed, revocable and access-logged.

Exceptions are the product

Six exception types route to review instead of silently writing bad data:

  • Amount mismatch: total does not fit the expected range or prior pattern.
  • Date window: receipt date falls outside the close period.
  • Vendor ambiguity: normalized name matches more than one vendor.
  • Duplicate: same vendor, amount and date window as an existing entry.
  • Recurring vendor, no receipt: history shows monthly spend but no document arrived.
  • Low confidence: extraction below the floor, so the operator is prompted to retake.

The close gate is deliberate: the package is clean or it does not exist.

Stack

Next.jsTypeScriptPostgres (Neon)DrizzleCloudflare R2BullMQ + RedisAnthropic API (structured outputs)Resend InboundStripe Billing

What I learned

Confidence is the product. Every field shows its score; anything below threshold lands in review.

The close package is the artifact, not a dashboard.

Cut bank-feed matching from v1. A half-working matcher would destroy the trust the confidence flags build.

Block the close, don’t warn and proceed. The gate has to be structural.

Have a messy process like this?

Or email info@decent4.com · call (618) 606-0066