This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.
What I Built
LocalReceipts AI turns receipt images and PDF invoices into an editable expense register, with all receipt processing on the user's laptop.
It is designed for freelancers and small business owners in India who need to hand their Chartered Accountant something more useful than a folder of photographs.
The workflow is deliberately small: upload bills, extract their details with a local vision model, correct the results, and download an accounting CSV. There is also a JSON backup containing the edited records and original extraction for comparison.
The app supports:
- Batch PNG, JPG, JPEG and PDF uploads, with document/page previews.
- Vendor name, invoice date, expense category, vendor GSTIN, subtotal, tax amount, total and line-item summary.
- Six expense categories: Software, Travel, Meals, Office Supplies, Utilities and Professional Services.
- An editable table with expense and tax totals, review notes and a Reviewed checkbox.
- CSV exports with readable accounting headers and JSON backups.
- Friendly handling of unavailable Ollama servers, missing models, malformed responses and damaged or protected documents.
GSTIN stays a text identifier, separate from the numeric tax amount. Missing amounts stay blank: an unreadable tax figure should never silently become zero.
Who would pay for it? The customer hypothesis is an independent consultant, freelancer or small business that spends time retyping receipts but does not want to upload client or financial documents to a cloud service. A potential paid offering would be assisted installation, model configuration and support for their receipt workflow. That is a business hypothesis, not validated demand: I do not yet have a paying customer or external user study.
Demo
This is a local desktop utility. There is currently no public hosted app or video demo. The repository contains a runnable synthetic demonstration and setup instructions so readers can reproduce the workflow without providing private receipts.
Run the synthetic receipt demo · Installation and app walkthrough
After installing Python dependencies and downloading a vision model, configure Ollama in local-only mode and run the app. On Windows:
# In the Ollama terminal, after exiting any existing Ollama instance:
$env:OLLAMA_NO_CLOUD = "1"
$env:OLLAMA_HOST = "127.0.0.1:11434"
ollama serve
# In another terminal, from the cloned repository:
.\.venv\Scripts\python.exe -m streamlit run app.py
Select an installed vision model, upload a receipt, inspect the preview, extract it, edit the table and download the CSV. The app's default model name is llama3.2-vision; custom installed models are supported.
For a repeatable test, the demo script generates a fictional software-store receipt and sends it to local Ollama:
.\.venv\Scripts\python.exe scripts\smoke_local_model.py --model qwen3.5:4b
In the live local test, qwen3.5:4b returned:
| Field | Extracted value |
|---|---|
| Vendor | SAMPLE SOFTWARE STORE |
| Invoice date | 2026-10-19 |
| Category | Software |
| GSTIN | null |
| Subtotal | INR 1,000.00 |
| Tax | INR 180.00 |
| Total | INR 1,180.00 |
| Items | Software subscription |
The script checks the expected tax and total. This is one synthetic test, not a claim of general receipt accuracy. The smaller installed moondream model returned valid JSON but incorrect amounts on this example. That failure is documented too: structured output does not make an answer financially correct.
Code
GitHub repository: LocalReceipts AI
LocalReceipts AI
A modular, offline Streamlit desktop utility for Indian freelancers and small businesses. PNG/JPEG bills and multi-page PDF invoices become an editable INR expense register, with CSV and JSON downloads.
Install once (internet needed for packages and model weights)
Requires Python 3.10+ and a recent local Ollama installation. Model memory requirements vary substantially; choose one that fits your machine. The default llama3.2-vision can be slow without sufficient GPU memory. minicpm-v and llava are alternatives.
From this directory in PowerShell:
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
ollama pull llama3.2-vision
Set Ollama to local-only mode before processing private documents. Quit the Ollama tray application first, then start its server in a dedicated terminal:
$env:OLLAMA_NO_CLOUD = "1"
$env:OLLAMA_HOST = "127.0.0.1:11434"
ollama serve
Keep that terminal open. If Ollama reports the port is…
The repository includes the application, modular extraction code, dependency files, a Windows launcher, tests, setup documentation and validation notes.
How I Built It
The stack is Python, Streamlit, the Ollama Python SDK, Pandas, Pillow and PyMuPDF. Local open-weight vision models perform the extraction; there is no hosted model fallback.
The pipeline is:
Image / PDF
→ bounded in-memory decoding
→ local vision extraction
→ JSON parsing and field normalization
→ editable expense register
→ CSV / JSON download
For PDFs, PyMuPDF renders pages locally. Each page is sent individually to Ollama, followed by a local text reconciliation pass that produces one invoice record. The prompt explicitly warns against summing repeated totals and page carry-forwards. Multi-page results still require review against the originals.
The model receives a JSON schema and instructions to leave uncertain fields null. A fallback parser handles markdown fences or surrounding text. Separate validation normalizes amounts and dates and flags missing fields, suspicious GSTIN formatting and inconsistent totals.
A few details mattered more than the happy-path demo:
- Privacy extends beyond the hostname. Requests are pinned to loopback, ignore proxy environment variables and do not follow redirects. Cloud-named and remote-backed models are rejected before images are sent. Model metadata is preserved because an SDK can otherwise discard fields identifying a remote-backed alias.
- The server needs its own configuration. Ollama should be started with cloud features disabled. Setting an environment variable in the Streamlit terminal does not reconfigure an already-running Ollama server.
- Edits must survive reruns. The editor applies changes to canonical session records so metrics and exports reflect corrections.
- CSV is an execution surface. Text that could be interpreted as a spreadsheet formula is escaped in CSV exports.
- One failure should not lose the batch. Successful receipts remain available when another file fails, and identical file contents are skipped.
The automated suite passed 35 tests covering parsing, financial normalization, PDFs, image conversion, local transport, model failures, multi-page request handling, exports and Streamlit state. Dependency compatibility checks also passed. These checks complement, rather than replace, OCR testing on representative documents.
Current limits are explicit: the app is single-user, records are held in session memory, backups need to be downloaded before ending a session, and accuracy depends on the model and scan quality. Its CSV is an expense register for accountant review—not a statutory GST return or a determination of input-tax-credit eligibility.
Why Does Open Innovation Matter?
Local inference makes the privacy promise practical. Once dependencies and model weights are installed, the workflow can run without an internet connection. Receipt images do not need to be sent to a hosted inference API.
There is no per-receipt hosted inference fee. Hardware, electricity, installation and support still cost money, but processing more bills does not inherently create another cloud API bill. That makes a small support-oriented business model worth exploring.
Models are replaceable. The contrast between the two locally tested models is a useful example: I can compare another model using the same synthetic test and choose based on observed results. I am not tied to one provider's endpoint or pricing.
The workflow can be inspected and adapted. The parsing, review and export logic is visible in the repository. Future work could target specific receipt layouts or accountant workflows, while checking model and dependency licensing before commercial distribution.
The next step is a local pilot with real users and representative receipts, measuring correction time and error patterns before making stronger accuracy or commercial claims.
AI disclosure: Codex assisted with implementation and testing and authored this submission text. The reported test results are from actual runs; no customer feedback or revenue is claimed.
Top comments (0)