A Clean-MVVM Android application for splitting bills using AI-powered receipt parsing.
This app was created as a demo for the talk:
AI-Accelerated Mobile Development - From idea to build, faster than ever. Even when you are the whole team.
By Gio Scalzo at the Londroid event, NewDay, 29-5-2025.Every git commit message in this repo is the prompt used for that commit.
The detailed steps followed to build this app are documented in
project_steps.md.
Split Bill is a showcase Android app that leverages AI to make splitting restaurant bills effortless. Snap a photo of a UK receipt, let AI parse the items, edit as needed, assign costs, track payments, and keep a history of events—all in a beautiful, modern UI.
- 📷 Camera and gallery integration for receipt capture
- 🤖 AI-powered receipt parsing using OpenAI gpt-4o-mini
- 🎨 Material Design 3 UI with Jetpack Compose
- 🇬🇧 UK receipt format support with quantity handling
- ✏️ Inline editing of item names, quantities, and costs
- 🛡️ Secure API key management via environment variables
- ⚡ Loading spinner during API calls
- 🧪 Mock service for testing without API calls
- 👥 Participant management and local persistence
- ➗ Flexible split modes: equal or manual assignment
- ✅ Payment tracking and event history
-
Copy the example environment file:
cp .env.example .env
-
Edit
.envand add your OpenAI API key:OPENAI_API_KEY=sk-your-actual-openai-api-key-here -
Get your OpenAI API key from OpenAI Platform
./gradlew assembleDebug- Capture or select a receipt photo using the FAB.
- AI parses the receipt (via OpenAI gpt-4o-mini) and extracts items, prices, service charge, and total.
- Edit the parsed list if needed—change item names, costs, or quantities.
- Add/select participants and assign items (split equally or manually).
- Track payments—each person marks their share as paid, with optional notes.
- View event history—see settled/unsettled bills.
- UI Layer: Jetpack Compose, Material Design 3
- Business Logic: ViewModels, Use Cases
- Data Layer: Repository pattern, mockable services
- AI Integration: OpenAI API, structured JSON output
- Network: Retrofit, OkHttp
- Persistence: Local storage for participants and event history
- API keys are stored in
.envfiles (excluded from git) - Images are compressed (not resized) to balance quality and API token usage
- All network calls are asynchronous with robust error handling
- Use the mock service for rapid development:
// In MainActivity.kt, change to: val receiptService: ReceiptParsingService = remember { OpenAIService(useMock = true) }
- Loading spinner and error handling are built-in for all API calls.
- All features are unit tested and follow Clean-MVVM best practices.
- The full step-by-step process used to build this app is in
project_steps.md. - Every git commit message is the prompt used for that commit.
MIT License. See LICENSE for details.