Inspiration

Splitting a group meal bill can get messy when everyone orders different items or shares dishes. DuoPay helps make each person’s share clear and fair.

What it does

DuoPay scans a receipt in the browser and extracts item names and prices, tax, tip, and total using OCR. People can review the scan, assign items to one or more friends, or split the bill equally. Tax and tip are allocated proportionally, and the calculations use integer cents so every share adds up exactly. Each person can open a PayPal Sandbox checkout for their share.

How we built it

Tesseract.js 6 runs an English OCR model in a browser Web Worker using WebAssembly. JavaScript parses the text and calculates shares with BigInt-backed largest-remainder allocation. PayPal’s JavaScript SDK v5 provides the Sandbox checkout path. Receipt images stay in the browser.

Challenges and testing

OCR can misread a receipt, so scanned values stay editable. To avoid rounding errors, DuoPay distributes cents deterministically. The tests include 4,000 randomized split reconciliations.

Limitations and next steps

This is a test-only prototype. A completed Sandbox buyer payment has not been tested. Before production, order creation and capture need a secure backend.

Built With

  • css
  • html
  • javascript
  • paypal-javascript-sdk
  • paypal-sandbox
  • tesseract.js
  • web-workers
  • webassembly
Share this project:

Updates

Submission history