Inspiration

Research teams receive spending rules in notices, while receipts and payment requests arrive later. Re-entering amounts and finding the right rule makes a simple reimbursement harder to review. Ledger Lab connects the document, the decision and the payment in one workspace.

What it does

Upload a policy notice as an image, PDF or text file. Local OCR reads image and scanned-PDF pages, and AI proposes a monthly budget, an approval threshold and a single-expense limit. Each rule appears in a table alongside the original supporting quotation. A quotation is accepted only when it is an exact excerpt of the uploaded text and contains the same amount. It shows the source of the number; a person still checks the rule before it becomes active. A reviewer can correct the values and confirm the policy.

Upload a receipt to extract its amount and description. The request is checked against the active policy and reserved spending. A $201 request under a $200 limit is blocked with a clear explanation: Rule 03, the $200 limit, and the $1 excess. Eligible requests are reviewed and approved before payment. In this single-user prototype, the same confirmation applies above and below the approval threshold. That threshold changes the warning text. It does not switch to a principal-investigator or finance role.

PayPal Sandbox Orders powers a sample supplier checkout, including buyer approval and verified capture. PayPal Sandbox Payouts sends an employee reimbursement; the ledger marks it paid when the matching payout item reports SUCCESS and its amount and recipient match. The demo shows an actual $0.10 sandbox payout.

How we built it

Tesseract.js and PDF.js read documents in the browser using locally served English and Simplified Chinese OCR data. The AI layer uses deepseek-v4.1-flash through a Bohrium OpenAI-compatible endpoint and keeps a quotation only when it is an exact excerpt of the source text and contains the same amount. Python, Flask and SQLite store confirmed policies, requests and reservations. PayPal Orders v2 and Payouts v1 handle the payment flows.

AG Grid Community provides a sortable, filterable and searchable ledger with CSV export. Selecting a request brings its policy decision, receipt evidence and payment status together.

What we learned

A useful AI payment workflow needs a visible connection between the words in a notice and the action that follows. We built the rule table, explicit over-limit explanation and payment-status verification to make that connection easy to inspect.

What is next

We would extend the prototype with role-based approvals, multi-user audit history and richer document workflows.

Built With

Share this project:

Updates

Submission history