How advaitt17/invoiceai works
Invoice AI is a Flask web application for uploading PDF invoices, extracting structured invoice and product data with confidence scores, and presenting, exporting, and revisiting results. The documented workflow is browser upload → Flask processing → invoice extraction → saved results → browser review/export; batch handling and history are additional capabilities. Sampled excerpts support the upload/API, extraction, and history/export links, but do not show all route implementations or persistence details, so uncertain internal wiring is omitted.
Main entry points: app.py Flask routes · index.html Invoice UI · invoice_processor.py Invoice processor · main.js Upload and batch UI
Components 19
Web experience
- Invoice UI
templates/index.html - Upload and batch UI
static/js/main.js - Application interactions
static/js/app.js - Results display
static/js/results.js - Dashboard
static/js/dashboard.js - Web styling
static/css/style.css
Processing API
- Flask routes
app.py
Extraction engine
- Invoice processor
invoice_processor.py - PDF text and OCR
invoice_processor.py - Field and table extraction
invoice_processor.py - Confidence scoring
invoice_processor.py
Results and history
- Result files
app.py - Extraction history
app.py - Data export
app.py
Other components
- Invoice user
- Gemini service
- Tesseract OCR
- PDF invoice
- Excel writer
Connections 22
- Invoice user → Invoice UI: uses
- Invoice user → PDF invoice: selects
- Invoice UI → Upload and batch UI: loads
- Upload and batch UI → Flask routes: uploads PDFs
- Application interactions → Flask routes: requests API
- Flask routes → Invoice processor: processes invoices
- Invoice processor → PDF text and OCR: extracts text
- PDF text and OCR → Tesseract OCR: uses OCR
- Invoice processor → Field and table extraction: analyzes invoice
- Invoice processor → Gemini service: requests extraction
- Invoice processor → Confidence scoring: scores fields
- Flask routes → Result files: writes results
- Flask routes → Result files: reads results
- Flask routes → Extraction history: serves history
- Extraction history → Result files: reads records
- Flask routes → Data export: generates exports
- Data export → Excel writer: writes workbook
- Flask routes → Invoice UI: returns results
- Invoice UI → Results display: displays results
- Invoice UI → Dashboard: loads dashboard
- Invoice user → Data export: requests download
- Invoice UI → Web styling: uses styles