Skip to content

Repository files navigation

BillSplitter Native

Android-first Expo / React Native app for splitting a receipt between people or groups after OCR recognition.

The project is a native companion to billsplitter-mobile: it keeps the same receipt parsing core, but adds camera capture, photo import, mobile editing flows, and device-friendly export/import.

What It Does

  • scans or imports a receipt photo on device
  • sends the image to Yandex OCR
  • parses the recognized text into receipt items, discounts, and total
  • assigns line items to color groups with live totals and unassigned remainder
  • supports manual correction of item cards and total card
  • exports and re-imports split state as JSON
  • includes dev-client and e2e-oriented debug flows for repeatable OCR testing

Current Feature Set

  • Expo SDK 54 + React Native 0.81 app with custom dev client support
  • mobile split studio UI with editable receipt cards
  • Yandex OCR integration through EXPO_PUBLIC_YANDEX_OCR_* env variables
  • receipt parser shared from the web project and adapted for the native workflow
  • optional e2e sample-photo flow for OCR -> parser -> edit testing without system dialogs
  • JSON share/import flow for moving receipt state between app installs or devices
  • cloud Android builds through EAS for development, preview, and production

Tech Stack

  • Expo
  • React Native
  • TypeScript
  • Vitest
  • expo-camera
  • expo-image-picker
  • expo-document-picker
  • expo-sharing

Main Scripts

  • npm install — install dependencies
  • npm run test — run Vitest tests
  • npm run dev-client — start Expo dev client server on port 8084
  • npm run dev-client:android — open the Android dev client with the expected deep link
  • npm run e2e:metro — start dedicated e2e Metro with debug tools enabled on port 8088
  • npm run e2e:android — run Android e2e flow with the dedicated Metro port
  • npm run android — run the Android app locally
  • npm run apk — create a cloud APK build via EAS
  • npm run apk:local — create a local APK build via EAS local build
  • npm run aab — create a production Android App Bundle
  • npm run prebuild — regenerate native Expo projects

Local Setup

  1. Install dependencies with npm install.
  2. Create .env.local with EXPO_PUBLIC_YANDEX_OCR_FOLDER_ID and EXPO_PUBLIC_YANDEX_OCR_API_KEY.
  3. Restart Metro or Expo after any env change.
  4. For the most stable local Android flow, start npm run dev-client and then run npm run dev-client:android.
  5. If native projects need regeneration, run npm run prebuild before native rebuilds.

E2E and Debug Hooks

  • Automation hooks for camera, OCR result blocks, and receipt cards are available in the app.
  • Internal e2e debug controls are enabled only when EXPO_PUBLIC_E2E_DEBUG_TOOLS=1 is set.
  • That flag exposes Debug autofill and E2E sample photo, which makes it possible to test the full OCR -> parser -> edit flow without system dialogs.
  • To run the dedicated Android e2e path without Metro port conflicts, use npm run e2e:android.
  • To keep only the dedicated Metro server running, use npm run e2e:metro.
  • You can override the e2e port with E2E_DEV_SERVER_PORT, for example E2E_DEV_SERVER_PORT=8090 npm run e2e:android.

JSON Export / Import

  • Поделиться JSON creates a real .json file and opens the system share sheet.
  • Загрузить из файла reads a JSON file through the native file picker and restores the split studio state.
  • The exported payload currently includes schemaVersion, exportedAt, language, merchantName, detectedTotal, ignoredLineCount, customTotalCardTitle, ocrText, receiptItems, and ocrRecognitionResult.
  • The format is currently versioned as schemaVersion: 1.

Build Notes

  • preview in eas.json produces an installable .apk with arm64-only ABI to keep cloud builds smaller.
  • production produces an .aab for store publishing.
  • development produces the dev client build.
  • The preview APK is intended for real Android devices, not x86/x86_64 emulators.

Notes

  • This repository lives next to billsplitter-mobile and reuses the same receipt parsing domain.
  • OCR currently runs directly from the client app. For wider distribution, it would be safer to move the OCR call behind a backend proxy instead of shipping client-visible EXPO_PUBLIC_* credentials.

About

Android-first Expo and React Native app for receipt OCR, bill splitting, live group totals, and JSON export/import.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages