AI extractor for invoices & receipts — photo or PDF to data

DocLens

Role: Full-stack developer — Vue / Nuxt, AI integration · Period: 2024 · Client: Own product · Platforms: Web

DocLens — AI extractor for invoices & receipts — photo or PDF to data

Upload an invoice or receipt — a phone photo or a PDF — and AI extracts the vendor, dates, line items, tax and totals, checks that the numbers add up and exports to Excel. Works with documents in any language.

Accounting and logistics teams retype invoices and receipts by hand every day. DocLens turns a document into structured data in a few seconds: the image or PDF goes to a server route that calls Gemini's vision model with a strict JSON schema, and the result comes back as an editable form.

Trust matters more than speed, so every extraction is verified: qty × price on each line, the sum of items against the subtotal, subtotal plus tax against the total, and the tax rate against the tax amount — including Russian invoices where VAT is included in the prices. Uncertain fields are highlighted, everything is editable, and the result exports to Excel (CSV) or JSON.

Key features

  • Photos and PDFs; large images are downscaled in the browser before upload
  • Vendor, customer, tax IDs, dates, currency, line items, tax and totals
  • Automatic arithmetic checks with clear pass / review status
  • Editable fields and line items with highlighted uncertain values
  • Export to Excel-ready CSV (UTF-8, Cyrillic-safe) and JSON
  • Any language — tested on English, US and Russian documents
  • Sample documents with cached results, so the demo works even without AI quota

What I did

  • Built the app with Vue 3, Nuxt 4 and TypeScript
  • Wrote the Nitro server route with Gemini vision, JSON output and a model fallback chain
  • Designed the validation layer that checks the extracted numbers
  • Implemented client-side image downscaling, CSV/JSON export and local history
  • Created fictional sample documents in English and Russian for the demo

Results

  • All sample documents extracted with every check passing
  • Result in ~2–3 seconds
  • $0 running cost on free tiers

Tech stack

  • Vue 3
  • Nuxt
  • TypeScript
  • Gemini API
  • Nitro server routes
  • Vision AI

Links

← Back to portfolio · Start a similar project