This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Freelancers and small businesses deal with a surprisingly tedious task: turning invoices and receipts into structured records without manually typing every field into a spreadsheet.
InvoiceLens is a local-AI invoice and receipt assistant built to make that workflow easier. Upload an invoice or receipt, extract the important fields, review the results, correct anything that looks wrong, and export the records to CSV.
It is designed for freelancers, independent bookkeepers, and small businesses that want to reduce repetitive data entry without sending financial documents to a third-party AI inference API.
InvoiceLens can extract fields such as vendor details, invoice number, date, subtotal, tax amounts, and total. It also runs validation checks and flags suspicious results for human review. Records can be edited before being marked as reviewed.
Human-in-the-loop verification: Tax identifiers such as GSTIN should be checked against the original invoice before records are relied upon. When a GSTIN is missing or uncertain, the user can review and complete the field manually rather than treating an incomplete extraction as verified.
The important design decision: an AI-generated value is not automatically a trustworthy value.
During a local test with a synthetic invoice, Gemma correctly read the subtotal and individual tax amounts but incorrectly reported the total tax as ₹11,800 instead of ₹1,800. InvoiceLens flagged both the tax-total mismatch and the invoice-total mismatch. It did not silently correct the model or pretend the result was accurate.
That is the kind of failure an invoice workflow needs to make visible.
The potential business model is a lightweight tool for freelancers and small accounting practices: save time on repetitive entry while keeping a person in control of financial records. I have not yet validated willingness to pay with a real customer, so this is a target use case rather than a proven business.
Demo
Live demo:
Video walkthrough:
The walkthrough demonstrates the invoice-processing workflow, including extracted fields, validation warnings, manual review, and CSV export.
Hosted demo limitation: The public Render version uses mock extraction and returns synthetic invoice data; it does not run Gemma. The local version integrates Gemma 3 4B through Ollama for on-device inference.
Code
GitHub repository:
InvoiceLens
Your invoices stay yours.
A local-first assistant that turns invoice and receipt images and PDFs into structured, editable records with validation warnings and a reviewed CSV export. Built for Indian freelancers, small businesses and small CA practices. Extraction runs on your own machine with an open-weight model (Gemma 3 4B through Ollama), with Tesseract OCR as a fallback.
Status: working scaffold. The full pipeline runs end to end and is covered by automated tests that use a fake model. It has not yet been measured against real model output; no accuracy claim is made anywhere in this repository. See Evaluation.
What it does
- Upload JPG, PNG or PDF files (10 MB each, PDFs up to 5 pages).
- Extract vendor, GSTIN, invoice number, date, subtotal, discount, CGST/SGST/IGST and total with Gemma vision. If the answer is unusable, run Tesseract and retry the model once.
- Validate in Python (never…
The project includes a React/Vite frontend, a FastAPI backend, local model integration, extraction and validation logic, CSV export, and automated tests.
InvoiceLens combines:
- Gemma 3 4B through Ollama: the local vision model used to extract structured fields from invoice images.
- FastAPI: the backend API for document processing, record management, validation, and export.
- React, Vite, and JavaScript: the interface for uploading documents, reviewing extracted fields, and editing records.
- Python validation logic: arithmetic checks and review flags that operate independently of the model's claims.
- CSV export: a practical bridge between the tool and the spreadsheets freelancers and bookkeepers already use.
- Session-scoped records: requests are separated by session identifier, with records held in memory rather than a persistent database.
I tested the extraction workflow using synthetic invoice data and verified document uploads, record listing, manual review, CSV export, and separation between two session identifiers. The backend test suite and frontend production build also passed.
There are limitations. Model extraction can be wrong, and validation checks cannot catch every semantic error. Records are lost when the server restarts. OCR fallback is optional and was not available in my local environment because Tesseract was not installed. InvoiceLens is a working prototype, not accounting software or a guarantee of tax compliance. Extracted values still need to be checked against the source document.
Engineering for trust, not just extraction
InvoiceLens separates model-generated values from deterministic validation. The model proposes structured invoice fields; independent checks compare arithmetic relationships and flag inconsistencies for human review. Users can correct extracted values before marking records as reviewed.
The backend also separates records by session identifier and applies in-memory limits. This is a prototype-level isolation mechanism, not user authentication or a complete multi-tenant security system.
These design choices reflect the core goal of InvoiceLens: make AI-assisted data entry useful without assuming that AI-generated financial data is correct.
Why Does Open Innovation Matter?
Invoice data can contain names, addresses, tax identifiers, transaction amounts, and other sensitive business information. Sending every document to a hosted AI API introduces a third party into that workflow.
With an open-weight model running locally through Ollama, InvoiceLens can perform inference on the user's machine without requiring a paid, remote model API for the core extraction step. That gives the user more control over where document contents go and makes experimentation possible without a per-request inference bill.
Open tooling also makes the system easier to inspect and change. The extraction logic, validation rules, prompts, and review workflow can be modified for different invoice formats or business needs. The model is replaceable, and the validation layer can be tested independently.
Local inference is not magic: it still needs compatible hardware, and model errors remain possible. That's why the project combines local extraction with explicit validation and human review rather than treating a fluent model response as ground truth.
For a small side hustle, the goal is simple: make repetitive work less tedious without making private data or blind trust in AI the price of convenience.
Prize Categories
- Best Use of Gemma — Gemma 3 4B is used as the core local vision model for invoice extraction.
Top comments (0)