Receipt Reader Draft
A local app that reads photos of my receipts and records what I bought, item by item.
The problem
My bank statement shows where I spent money and how much. It doesn't show what I bought. That information is on the receipts, and I was never going to type them in.
What I built
It's a small web app that runs on my Mac. I photograph receipts with my phone, the photos sync to the Mac through iCloud, and I drag them from Photos onto the page. Claude Haiku reads the line items from each photo, a second model assigns categories, and the results go into SQLite. Photos taken within 90 seconds of each other count as one receipt, so I can photograph a long receipt in pieces.
Items the models aren't sure about go to a review queue that I work through from the keyboard. When I change a category, the app saves a rule and applies it to future receipts. A shared receipt can be split 50/50 or by a custom amount. Amounts are stored as whole cents, and on an odd-cent 50/50 split the extra cent goes to me.
I built it in six stages, with tests for each. WebMock blocks network access in the test suite, so no test calls a real API.
What happened
I start it with one command. It backs up the database when it shuts down and exports to CSV or JSON. The original photos can't be replaced once the paper is thrown out, so a doctor command warns me if the photo archive isn't in iCloud Drive or covered by Time Machine.