Skip to content

Repository files navigation

Splitr

Swipe to split

Split receipts between two people with a Tinder-like swipe interface.

License: MITNode.js 20+React 19Vite


Contents

Features · Quick Start · Scripts · How It Works · Current Limitations · Contributing


Features

  • Receipt upload — PNG, JPG, WebP images or PDF files; camera capture on mobile
  • OCR extraction — Tesseract.js for images, pdfjs-dist for selectable-text PDFs
  • Optional cropping — crop to receipt area for better OCR accuracy
  • Item editing — fix names, adjust prices, add/remove items before splitting
  • Swipe to categorize — Tinder-style cards: left = Me, right = You, up = Common (50/50), down = Ignore
  • Instant results — see the final split and copy a summary to clipboard
  • Debug & test modes?debug=true for raw OCR output; ?testMode=edit to bypass OCR in tests

Quick Start

git clone https://github.com/laveez/splitr.git
cd splitr
npm install --legacy-peer-deps
npm run dev

The --legacy-peer-deps flag is needed due to react-tinder-card peer dependency on React 18.

Opens at localhost:5173.

Scripts

CommandDescription
npm run devStart dev server
npm run buildTypeScript check + production build
npm run lintRun ESLint
npm run lint:fixRun ESLint with auto-fix
npm testRun Playwright e2e tests
npm run test:uiRun tests with Playwright UI
npm run test:headedRun tests in headed browser

How It Works

flowchart LR
A[Upload<br/>image / PDF] --> B[Crop<br/>optional]
B --> C[OCR / Extract<br/>Tesseract · pdfjs]
C --> D[Edit items<br/>fix · add · remove]
D --> E[Swipe cards<br/>Me · You · Common · Ignore]
E --> F[Results<br/>totals · clipboard]
style A fill:#2d4a2d
style C fill:#38608c
style E fill:#2d4a2d
Loading

Images are processed client-side with Tesseract.js OCR; PDFs with selectable text use pdfjs-dist for direct extraction. Detected items are parsed into name/price pairs, editable before the swipe phase. Each swipe assigns the item to a person, splits it 50/50, or ignores it.

Current Limitations

Note: The receipt parser is optimized for Finnish K-Ruoka grocery receipts — euro currency format, Finnish discount types (Plussa-tasaerä, Plussasetti, Tasaerä), and K-Ruoka receipt structure. To support other formats, extend the parsing logic in src/utils/receiptParser.ts.

Contributing

Contributions are welcome! Open an issue or submit a PR.

git clone https://github.com/laveez/splitr.git
cd splitr
npm install --legacy-peer-deps
npm run dev

License

MIT

About

Split receipts between two people with a Tinder-like swipe interface

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages