Video Demo 📹: https://youtu.be/WJnTLLJ5n-Q?si=zF1-JP_jFIwNqPcI
Grocery Splitter is an iOS-exclusive application designed to to make bill splitting easier for couples or friends who shop together but need to reimburse personal items. The app utilizes the VisionKit in iOS to extract text from images and is specifically tailored to handle receipts from Sainsbury's.
This project is the final project for CS50, Harvard University's introduction to computer science.
My partner and I frequently go grocery shopping together, and we often check out using one card. Since some items are personal, we need to reimburse our personal expenses back to the shared card. This app was designed to make this process easier and more accurate.
- Text Extraction with VisionKit: Utilizes iOS VisionKit to extract text from images of Sainsbury's receipts. This allows for accurate and quick data entry directly from a photo of your receipt.
- Flexible Data Parsing: The app accommodates different data formats:
- Format 1: Items listed first followed by prices.
- Format 2: Each item followed immediately by its price.
- Nectar Discount Handling: Automatically detects and deducts Nectar discounts from the items, ensuring that your bill is accurate.
- Easy Categorization: Users can categorize each item as shared or personal, making it easy to split the bill accurately.
- SQLite Database Integration: All data is stored locally using SQLite, providing persistent storage for your receipts and summaries.
- Swipe to Delete: Easily manage your data with swipe to delete functionality.
- Summary View: View a summary of your categorized items, including the total amount spent and the amount spent per category.
- Date-wise Organization: Items and receipts are organized by date, making it easy to track your spending over time.
- User-Friendly Interface: A clean and intuitive user interface makes it easy to navigate and use the app.
- An iOS device running iOS 17.0 or later.
- Xcode 15.4 or later for building the app from source.
-
Clone this repository:
git clone https://github.com/natccc/rn-receipt-scanner.git cd rn-receipt-scanner
-
Install the dependencies:
npm install
-
Start the Metro Bundler:
npx react-native start
-
Run the iOS app:
npx react-native run-ios
-
Inside Xcode, navigate to
File → Open
and browse to the project directory. In theiOS
folder, selectRnReceiptScanner.xcworkspace
. -
Build the app by going to the tab navigator (
Product → Build
) or using the shortcut⌘ + B
.
- Open Camera: Use the in-app camera to take a photo of your Sainsbury's receipt. The VisionKit will extract the text from the image.
- Paste Data: Alternatively, copy the text from your receipt and paste it into the app.
- Categorize Items: The app will parse the receipt and list the items. You can categorize each item as shared or personal.
- Save Data: Save the categorized data for future reference. The data will be stored locally in an SQLite database.
- View History: Navigate to the history tab to view past receipts and their summaries.
- Delete Items: Swipe left on any date in the history to delete all items from that date.
The app handles two types of data formats:
JS STRAWBERRIES 250G
£2.00
JS LARGE ORANGES X 4
£2.00
JS BLUEBERRIES 500G
£4.50
JS FLAT PEACHES
£1.25
2 X Nectar Price Saving
-£0.40
PRINGLES SC&O 185G
PEPSI MAX 2L
JS WHITE SDLSS GRAPE
SO ORG BANANAS X6
ROCKY BAR CHOC 7PCK
HARIBO TANGFASTICS
£1.85
£1.50
£2.20
£2.00
£1.00
£1.50
This project is licensed under the MIT License.
Feel free to reach out if you have any questions or need further assistance! Happy scanning!