Paperless: AI Invoice Extraction with Gemini and Supabase
A small web app that extracts structured data from invoices using Gemini AI — upload a document, review the extracted fields, and manage everything in a clean dashboard. Now with dark mode, vendor submission links, and a demo mode.
Invoices are a pain to deal with manually. This is a small web app that takes care of the data entry part — you upload a document, AI reads it, and the structured data lands in a table you can actually manage.
What It Does
The core loop is simple: upload a document, get structured data back, review and approve it, mark it paid when done.
The dashboard gives you a live summary — total outstanding, overdue amounts, what's been paid this month, and how many invoices are sitting in the approval queue. The invoices page has filters for approval status, payment status, and date range, plus sortable columns and a CSV export if you need to pull things into a spreadsheet.
For each invoice, it pulls out the vendor, invoice number, date, due date, category, line items, and totals. If it can't find something, it leaves it blank rather than guessing. Click any invoice to open the detail panel and see the full breakdown.
Vendor Submission Links
A new feature lets you generate shareable links and send them to vendors. They visit the link, upload their PDF invoice with their name and email (no login required), and the invoice is extracted and saved directly into your account. No more chasing vendors for copies or handling email attachments yourself.
Links can be toggled on and off, and you can delete them when you are done. Each link is token-based and can optionally expire.
Demo Mode
You can try the app without signing up. The demo mode gives you 3 free extractions to test the workflow — upload a document, see the extraction, and get a feel for how it works. Once you hit the limit, you will see a signup prompt to create an account and continue.
Dark Mode
The app supports dark mode with a toggle in the sidebar. Your preference is saved to localStorage and syncs across sessions. If you have not set a preference, it falls back to your OS setting.
Security
The app has rate limiting on the API (5 requests per minute per IP), input validation on all uploads, and demo mode protections to prevent abuse. Each user's data is isolated at the database level with Row Level Security — there is no risk of seeing someone else's invoices.
The Stack
- Next.js for the frontend
- Supabase for the database, login, and file storage
- Gemini for reading the documents
- Tailwind CSS for the UI
How It Works
You drop in a file — an image or a PDF — and it gets sent off to Gemini, which reads it and returns the data in a structured format. Multi-page PDFs get split into individual pages first and processed one at a time, then the results are merged back together. This tends to be more accurate than throwing the whole document at the model at once.
Everything comes back as a draft. You review it, fix anything that looks off, and approve it before it counts. That step is intentional — AI extraction is good but not perfect, and it is better to catch mistakes before they are in your records.
What I Would Add
A few things I would build out if I kept going:
- Email ingestion — forward invoices to an address and have them show up automatically
- Recurring vendors — flag when an expected invoice has not arrived
- Approval workflows — for teams where more than one person needs to sign off