WORK//05
Bill OCR
Upload a bill and get structured fields back, powered by LlamaCloud.
- Type
- AI prototype
- Platform
- Web · Next.js
- Role
- Solo: API route, OCR provider layer and dashboard
- Year
- 2026
Overview
Bill OCR takes an uploaded bill or invoice (PDF, JPG, PNG, WEBP or plain text), runs it through LlamaCloud for OCR, and extracts structured fields that appear on a dashboard. It also saves the original file, the extracted JSON and the raw text.
The problem
Typing invoice details into a system by hand is slow and error-prone. Modern OCR plus LLM-based extraction can turn a photo of a bill into clean, structured data.
What I built
- Upload PDF, image or text bills from a dashboard
- OCR plus schema-based field extraction
- Missing fields always come back as null, never undefined or absent
- Original file, JSON and TXT saved together only after OCR succeeds
- Tunable parse and extraction tiers to trade cost against accuracy
Architecture & key decisions
A provider interface
OCR sits behind an OCRProvider interface, with LlamaCloud as one implementation, so another provider can be swapped in without touching the API route or the UI.
Server-only API key
The upload goes to a Next.js Route Handler. The LlamaCloud key stays on the server and is never sent to the browser.
Challenges
Messy real-world bills
Every vendor lays out invoices differently. A single normalising step guarantees a predictable shape, whatever the model returns.
Outcome
A focused prototype of AI document extraction, with deliberate scope: no database, auth or background jobs, documented in the README as intentional.