Skip to content

Data-KentC/smartap-showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartap-showcase

An AI that reads invoices, checks its own math, and tells you exactly when to trust it — and when not to.

The story

Picture your AP team member's inbox on a Monday morning: fifteen invoices. Some are clean PDFs from AWS. One is a blurry phone photo of a taxi receipt. One is a scanned printout from a broker who still faxes things in 2026.

The old way: a junior keys each one into the ledger by hand. Slow, and every keystroke is a chance to fat-finger a decimal point.

The SmartAP way: AP team member drags the whole stack onto one screen and clicks Go.

An AI reads each invoice like a very careful, very honest clerk. It pulls the vendor name, the amount, the tax treatment — and then, critically, it checks its own work. Does quantity times price actually equal the line total? Does tax plus subtotal actually equal the grand total? If the arithmetic doesn't add up, the invoice gets stopped — not silently accepted just because the AI sounded confident.

For a vendor it's seen before — AWS, Singtel, the office landlord — it already knows the right account code and books it instantly. For a brand-new vendor, it reasons through the invoice, makes its best call, and tells you exactly how sure it is, in plain numbers, not a vague "looks right."

Kent skims each one. Fixes a typo. Approves a $10 mobile bill. Rejects the one invoice that's clearly a duplicate scan. Three minutes later, a spreadsheet lands in his downloads folder, ready to hand to the accounting system — and underneath it all, a tamper-proof record sits quietly, showing exactly what happened and why, in case an auditor ever asks.

That's SmartAP. Not a robot replacing the accountant — a very fast, very literal junior who never gets tired, never hides a mistake, and always shows its work.

What makes SmartAP genuinely different

  1. It checks its own arithmetic — not just its confidence

AI models can sound completely certain while being completely wrong. A blurry "1.40" can become "14" with total conviction. SmartAP doesn't just ask the AI how sure it is — it independently recalculates the maths using plain, boring, un-hackable Python. If the numbers don't reconcile, the invoice stops, no matter how confident the AI claimed to be.

  1. Every field explains itself, and the data can't be silently wrong

Most tools give one confidence score for the whole document. SmartAP gives every individual field — vendor name, date, total — its own confidence score and a plain-English note on where it found that value and why it might be uncertain.

This is enforced by something called Pydantic — think of it as a strict form-checker sitting between the AI and the database. Before any extracted data is allowed to proceed, Pydantic checks: is the amount actually a number? Is the date actually a valid date? Is every required field present? If the AI hands back something malformed, Pydantic rejects it on the spot, before it can ever reach the accounting records. It's the difference between "we hope the data is clean" and "the data is structurally guaranteed to be clean."

  1. It speaks Singapore GST, not generic tax

Built by a Singapore Chartered Accountant, not retrofitted afterward. It automatically applies the IRAS 4/7 concession for staff phone bills, flags blocked input tax on things like medical insurance, and distinguishes standard-rated, zero-rated, and exempt supplies — the actual rules a Singapore controller deals with weekly.

  1. It gets smarter every time a human corrects it

Approve or correct a GL coding decision, and SmartAP remembers. The next invoice from that vendor is coded instantly and perfectly next time — no AI reasoning needed. Accuracy compounds with use instead of staying static.

  1. It costs nothing to run

No enterprise contract, no vendor lock-in. Runs on free-tier AI and a local database on your own machine — proof that solid AP automation architecture doesn't need an enterprise budget to build correctly.

What it actually does, step by step

Upload one or more invoices — PDF, photo, scan, doesn't matter.

Read — AI vision extracts the key facts.

Self-check — arithmetic must add up, dates must make sense, structure must be valid (the Pydantic check above).

Duplicate check — compared against every invoice ever processed, catching even a resubmitted invoice with one digit changed.

Code the accounting — instantly for known vendors, reasoned for new ones, always showing why.

Human decides — approve, correct, or reject. Always a person's final call.

Remember — corrections teach the system for next time.

Export — a clean spreadsheet ready for the accounting system, plus a permanent, tamper-evident record of every decision made.

Setup

powershellcd ap-processor

venv\Scripts\Activate.ps1 streamlit run app.py

To customise accounting codes for a new company, see export_gl_table.py and import_gl_updates.py — edit the chart of accounts in Excel, no code required.

About

An AI application with web interface that reads invoices, checks its own math, and tells you exactly when to trust it — and when not to.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors