Independent AI projects

Independent AI Engineering / Case study

Ledger Lens — AI Invoice & Receipt Processor

A privacy-oriented invoice and receipt review application with local PDF parsing, Tesseract OCR, manual corrections, structured validation, and reviewed exports. Live model-assisted extraction remains disabled.

Local OCR live · AI disabled

Public document processing, review and exports work. Live model-assisted extraction remains disabled after unsuccessful AI acceptance.

Engineering result

Working public local OCR, PDF text extraction, document preview, manual corrections, human review and JSON/CSV exports; live AI remains disabled.

In this project
Ledger Lens review workspace displaying an explicitly labeled deterministic synthetic invoice sample
Synthetic demonstration from the project repository. The sample result is deterministic and does not demonstrate live AI extraction. Screenshot source ↗

Overview

Built independently around a reviewable local workflow. Users can process documents, inspect pages and text, correct fields, acknowledge warnings, and export without model assistance. The AI integration is documented as unaccepted and remains disabled.

My contribution

I independently built browser PDF/OCR adapters, page preview and correction workflows, shared validation, decimal-safe arithmetic diagnostics, review and warning gates, export formatting, bundled assets, and synthetic acceptance fixtures.

The problem

Invoices and receipts mix scanned images, PDF text, ambiguous totals, and inconsistent field formats. Automating extraction without inspection can turn OCR or model errors into misleading financial data.

Architecture

The static React/Vite frontend on Vercel parses native PDF text with PDF.js or runs Tesseract OCR on scanned pages in the browser. Preview, extracted text, manual corrections, schema validation and decimal-safe arithmetic diagnostics feed a revision-aware human-review step. Reviewed data downloads locally as JSON or spreadsheet-safe CSV. OCR/PDF workers, WASM, fonts and English language data are bundled with the app. The separate protected text-only Cloudflare extraction path remains disabled after unsuccessful live AI acceptance.

Simplified workflow · Ledger Lens — AI Invoice & Receipt Processor
  1. 01Local image or PDF → page preview
  2. 02Browser · PDF text or Tesseract OCR
  3. 03Manual correction · structured validation
  4. 04Decimal-safe arithmetic diagnostics
  5. 05Human review + warning acknowledgment
  6. 06Local JSON / spreadsheet-safe CSV

Current public workflow. OCR and native PDF text are distinct from deterministic samples; live model-assisted extraction is disabled.

Technical decisions

  • Extract native PDF text where available; use real Tesseract OCR for scanned pages. Show page previews, rotation and explicit OCR override so users can inspect extraction choices.
  • Bundle OCR/PDF assets and English language data instead of relying on runtime CDN fallbacks. Keep document processing on the user device.
  • Separate native text, real OCR, deterministic sample results, manual corrections and model provenance. Loading a sample result must not imply an OCR or model run.
  • Use structured field validation and decimal-safe arithmetic diagnostics for tax, discounts and totals. Financial consistency is a diagnostic, not proof of document correctness.
  • Require review of the current revision and acknowledgment of unresolved warnings. Invalid formats block export; edits invalidate earlier review.
  • Keep live model-assisted extraction disabled after unsuccessful AI acceptance. The manual workflow remains useful independently of the model.

Limitations and trade-offs

  • Accepts one PNG, JPEG or unencrypted PDF at a time, up to 10 MiB and three PDF pages of one document.
  • English OCR and decimal-point numeric formatting are supported; OCR accuracy varies with scan quality and layout.
  • Live AI extraction is disabled after unsuccessful Gate E2 model acceptance. The latest authorized run stopped at AI_UNAVAILABLE; no accepted live AI draft or model-accuracy claim is made.
  • Arithmetic checks do not establish that a receipt is authentic or its values are correct. Human inspection remains essential.
  • Local processing does not promise that the hosted app can reload offline. The documented offline demonstration uses a local server after setup.

Security, performance, and reliability

  • The active document workflow processes locally without uploading files for OCR, preview, correction or export. This portfolio embeds only static synthetic screenshots and provides outbound links.
  • Bundled workers and assets avoid runtime CDN fallbacks; there is no service worker or document cache. Bounded file/page processing and cancellation limit browser work.
  • Strict schemas block invalid export formats; explicit review and warning acknowledgment guard the current data revision.
  • CSV export neutralizes spreadsheet formula risks. JSON and CSV downloads preserve synthetic labels for sample data.
  • The separate protected text-only AI path is not the active local workflow. Production Turnstile validation passed, but that did not establish successful model extraction.

Testing and verification

  • The branded public OCR/document-review demonstration is verified, including manual correction and JSON/CSV exports.
  • Browser tests use synthetic documents to exercise actual OCR/PDF processing with external requests blocked, corrected download bytes, accessibility at three widths, rejection and cancellation.
  • Load sample result uses deterministic synthetic text/data without OCR or inference; Process sample document performs real extraction. These are distinct evidence paths.
  • Production Turnstile validation passed. Live AI acceptance did not succeed, so live model-assisted extraction remains disabled. Mock-backed tests do not establish real model accuracy.

Results

A working public OCR and document-review application that supports corrections and local exports without live AI. No accepted live model-assisted draft is claimed.

  • Working public local OCR, PDF text extraction, document preview, manual corrections, human review and JSON/CSV exports; live AI remains disabled.
  • Reviewable structured data and decimal-safe diagnostics without claiming financial correctness or accepted live model extraction.

What I learned

  • A document tool should retain a useful manual workflow when model acceptance fails.
  • Provenance, visible warnings and review gates matter as much as a plausible extraction result.

Technology and links

React · TypeScript · Vite · PDF.js · Tesseract.js · Web Workers · Zod · Vitest · Playwright

Related work

Have a similar engineering challenge?

Let’s discuss the product, the constraints, and where I can contribute.

Get in touch