#
What I Built
InvoicePilot AI is a privacy-first, local-first AI assistant that extracts structured data from invoices and receipts in PDFs and images. It validates arithmetic and exports sanitized CSV/XLSX reports.
It uses Gemma 2B through Ollama for AI extraction, with a regex-based fallback when the model is unavailable. The application has a React frontend and FastAPI backend.
#
Key Features
- AI-powered invoice and receipt extraction
- PDF parsing and OCR for scanned documents
- Local inference using Ollama and Gemma 2B
- Regex-based fallback extraction
- Arithmetic validation and confidence scoring
- Batch document uploads and inline editing
- Sanitized CSV and XLSX exports
#
Who Would Pay for It?
- Freelancers who want to automate invoice processing.
- Small agencies managing multiple vendor invoices.
- Organizations that prioritize privacy and local data processing.
#
Tech Stack
- Frontend: React, TypeScript, Vite
- Backend: Python, FastAPI
- AI: Gemma 2B, Ollama
- OCR and Parsing: PyMuPDF, Tesseract
- Database: SQLite, SQLAlchemy
- Exports: CSV, XLSX
- Deployment: Docker, Docker Compose
#
Quick Setup
Clone the repository:
Start Ollama (optional): Set up the backend:
Activate the virtual environment, then run:
Start the frontend in a separate terminal:
Frontend: [http://localhost:5173](http://localhost:5173)
API documentation: [http://localhost:8000/docs](http://localhost:8000/docs)
#
How It Works
- Upload invoice or receipt documents.
- Extract text using PDF parsing or OCR.
- Process the text using Gemma 2B or the regex fallback.
- Validate totals and flag inconsistencies.
- Review extracted data and export reports.
#
Why Open Innovation Matters
InvoicePilot AI combines open-weight AI with deterministic validation to support transparent, customizable, privacy-conscious document processing. Users can run inference locally, inspect the source code, and experiment with alternative models.
#
Demo and Repository
#
Future Improvements
- Accounting software integrations
- Additional export formats
- Improved multi-currency support
- Better extraction accuracy for complex invoices
#
Hacktoberfest Categories
- Side Hustle / Productivity
- Open Source AI Tools / Best Use of Open Weights
InvoicePilot AI demonstrates how open-weight models, OCR, and deterministic validation can automate invoice processing while giving users greater control over their data.