
Weekend Productivity Challenge: Paper Trail
Every household and small business has the same quiet, low-grade admin problem: receipts. They pile up in coat pockets, camera rolls and inboxes creating a tax time or budget analysis nightmare!
Vision & What the App Does
Every household and small business has the same quiet, low-grade admin problem: receipts. They pile up in coat pockets, get photographed and forgotten in a camera roll, or get physically lost before expense season ever arrives. The actual task, turning a paper or PDF receipt into a categorized line item, is repetitive, low-value work that's perfectly suited to being automated away.
That's the problem Paper Trail solves. It's a mobile-friendly receipt tracker: you take a photo of a receipt (or upload a file from your desktop), and the app does the rest. It reads the merchant, amount, currency, and date off the receipt, assigns it a spending category, and files it away, ready to be pulled into a report the moment you need one, whether that's at month-end or when a financial year closes.
From the user's side, the experience is deliberately narrow:
- Sign in through a Cognito-hosted login screen.
- Upload a receipt: camera capture on mobile, drag-and-drop or file picker on desktop.
- Review expenses in a running list, grouped by month or shown in total.
- Download a report as a CSV, with "This month" and "This financial year" as the two one-tap options, and a custom date range available for anyone who needs it.
No manual data entry, no spreadsheet wrangling, just a photo in, a categorized expense out.
How I Built It
I scoped this deliberately tight to keep it simple: one input (a receipt image or PDF), one pipeline (extract, categorize, store), one output (a filtered CSV). I used Claude pro to come up with the original cloudformation file and front end web design then used Amazon Q in console to overcome a few issues I had with permissions and CORS once I had deployed it!
The first real decision was how receipts get from a phone to structured data. I initially had the browser upload straight to S3 using a presigned URL, keeping Lambda out of the data path entirely. I later changed that: the frontend now sends the receipt through API Gateway to a dedicated receipt-processing API, which handles the upload to S3 and kicks off extraction from there. It costs a small amount of latency and payload overhead compared to the direct-to-S3 approach, but it means every upload passes through one authorized, observable API surface, which made validation, logging, and error handling far simpler to reason about.
The trickiest part was extraction quality. Textract's
AnalyzeExpense API is very good at finding structured fields on a receipt, but its output is verbose and inconsistently labeled across receipt formats. Rather than writing brittle parsing logic against Textract's raw field types, I fed its summary output into Bedrock (Claude) with a tightly-scoped prompt asking for exactly one JSON object back: merchant, amount, currency, date, category. That combination (Textract for OCR-grade extraction, Bedrock for normalization and judgment) turned out to be far more robust than either service alone, and it's now the piece of the architecture I'm most pleased with.The other challenge was making reporting genuinely low-friction without giving up flexibility. I didn't want a generic "pick any date range" form as the primary interface, since most people only ever want "this month" or "this financial year." So the report Lambda accepts a
period parameter ( month , financial_year , or custom ), and the UI presents the first two as the obvious, one-tap default while custom range sits behind a collapsed "advanced" toggle. It's a small UX decision, but it changes the app from "a tool with a date picker" into "a tool that just gives you what you almost certainly want."AWS Services Used / Architecture Overview
- Amazon Cognito: user authentication (Hosted UI, Authorization Code + PKCE flow) and JWT issuance
- Amazon S3: one bucket for the static frontend (behind CloudFront), one for uploaded receipts
- Amazon CloudFront: serves the frontend over HTTPS with an Origin Access Control back to S3
- Amazon API Gateway (HTTP API): JWT-authorized routes for receipt upload, expense listing, and report generation
- AWS Lambda: receipt upload handling, receipt processing, expense queries, and CSV report building
- Amazon Textract (
AnalyzeExpense): structured OCR extraction from the receipt image
- Amazon Bedrock (Claude): normalizes Textract's output into clean merchant/amount/category/date fields
- Amazon DynamoDB: stores each expense, keyed by user and date, so month/financial-year queries are cheap range reads
The flow end to end: a user authenticates via Cognito, uploads a receipt through API Gateway to a receipt-processing Lambda, which stores the file in S3 and triggers extraction, Textract extracts fields, Bedrock structures them, the result lands in DynamoDB, and the frontend queries DynamoDB for expense views and CSV reports.

What I Learned
The biggest lesson was architectural, and it came from changing my mind mid-build. I started with the browser uploading straight to S3 via a presigned URL, on the theory that keeping Lambda out of the data path is always faster and cheaper. I moved to routing uploads through API Gateway and a dedicated Lambda instead, and the app is better for it: one authorized entry point for every upload, consistent logging, and a single place to add validation later, rather than two different paths to reason about. The lesson wasn't "direct-to-storage is wrong," it was that the simplest path on paper isn't always the simplest one to operate.
I also came away with a much better appreciation for pairing a purpose-built extraction service with a general-purpose model. Textract alone gives you data; Bedrock turns that data into something an application can trust and act on without brittle regex or rule-based parsing. That combination is one I'll reach for again outside this project.
Finally, this build reinforced that serverless-first genuinely fits weekend timelines. Cognito, API Gateway, Lambda, S3, and DynamoDB all snap together through CloudFormation without any servers to patch or scale. The constraint that mattered most was design discipline, not infrastructure plumbing.
Check out a walk through of how to upload a receipt or download a report here;
Grab my cloudformation and web front end which will require a little tweaking to get your own instance going here;
Built as part of the AWS Weekend Productivity Challenge.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article