On this page
Five friends, one Goa trip and a pile of receipts: this brief turns that mess into a short list of who owes whom. It works best as a native Android app first, with an iPhone build after it (iPhone builds need a Mac with Xcode). The first release proves one loop only: add a trip, log three expenses paid by different people, include a tip on dinner, and read a settle-up plan whose amounts add back to exactly what was spent. Moving money is out of scope; the app records debts and marks them settled when people say so.
Screens
- Trips: Start a trip or night out, name it and pick the currency everyone agreed on
- Add expense: Enter the amount, the payer, the people included and an optional tip
- Split options: Choose equal shares, exact amounts or weighted shares for one expense
- Balances: See each person's running total as owed, owing or square
- Settle up: Read the shortest list of payments that clears every balance and tick them off
Data model
| Table | Key fields | Purpose |
|---|---|---|
| trips | id (uuid), name (text), currency (text), created_at (timestamptz) | One group of shared spending with a single agreed currency |
| members | id (uuid), trip_id (uuid), display_name (text) | The people who can pay or share, scoped to one trip |
| expenses | id (uuid), trip_id (uuid), payer_id (uuid), amount_minor (int), tip_minor (int), split_mode (text) | What was paid, by whom, stored in minor units to avoid rounding drift |
| expense_shares | expense_id (uuid), member_id (uuid), share_minor (int) | Each person's exact portion, which must sum to the expense total |
Keep the whole ledger on one phone for the first version: the organiser types in everyone's spending and sends the summary. A shared trip that several phones edit needs accounts, so connect your own Supabase and protect trips, members and expenses with row-level security tied to trip membership. Settlements should be stored as their own rows rather than by editing old expenses, so the history still explains how a balance reached zero. Store integer minor units everywhere and decide in one place who absorbs the leftover paisa or cent when a total does not divide evenly.
Native features
The useful native pieces are a share sheet for sending each person their summary, an offline database so the ledger works on a beach with no signal, and a little haptic feedback when a debt is marked settled. No contact upload is needed: names are typed, not scraped from the address book.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Share a summary | Android Sharesheet with ACTION_SEND text | ShareLink with a plain-text summary | Send readable text such as 'You owe Riya 840'; no hidden tracking links. |
| Offline ledger | Room database with a Flow of balances | SwiftData model container | Expenses save locally first; balances recompute from shares, never from a cached total. |
| Settle feedback | HapticFeedbackConstants on confirm | sensoryFeedback modifier | A tap confirms one settlement; it never triggers a payment or opens a payment app automatically. |
Android notes (Kotlin and Jetpack Compose)
Show expenses in a LazyColumn keyed by expense ID and members as Material 3 FilterChips inside the add-expense sheet. Hold the in-progress expense in a ViewModel so rotating halfway through choosing participants keeps every selection.
- Parse amounts with the trip currency's fraction digits and convert to minor units before saving. Reject a weighted split whose weights are all zero, and show the per-person preview before the save button becomes active.
- Compute balances in a repository function from expense_shares and settlements, then run a greedy creditor-debtor match to produce the settle-up list. Unit-test that the suggested payments always sum to zero for every member.
- On an Android phone, add a dinner of 2,450 with a 10 percent tip split four ways, rotate during entry, then switch to airplane mode and add a taxi fare. Reopen the app and confirm both expenses and a matching settle-up plan survived.
iPhone notes (Swift and SwiftUI)
Use a NavigationStack from the trip list to a trip detail with segmented Expenses and Balances views. The add-expense form can sit in a sheet with a Picker for the payer and a multi-select list for who shared.
- Use Decimal for typed input and Int minor units for storage; never accumulate Double amounts. Format with the trip's currency code so a rupee trip and a euro trip on the same phone display correctly.
- Recalculate balances as a derived value from SwiftData queries rather than storing a number per member. When someone deletes an expense, the balances and settle-up list must update without a manual refresh.
- On an iPhone, create a trip, add an uneven three-way split with exact amounts that do not match the total, and confirm the form explains the gap instead of saving. Then share the summary to Notes and check the wording reads naturally.
Copy-paste prompt
Build me a bill splitter for our Goa trip: who paid what, tip included, and everyone gets their share. Make it a native Android app with these screens: Trips, Add expense, Split options, Balances and Settle up. Save trips, members, expenses and per-person shares locally, storing money as integer minor units in one currency per trip. Support equal, exact and weighted splits, an optional tip on any expense, and a clear rule for leftover rounding. Balances must always be recalculated from saved shares and settlements, never kept as a separate running total. Settle up should suggest the fewest payments that clear everyone and let me mark each one settled with a record I can undo. Do not move money, connect a payment app or ask for contacts. Add a share button that sends each person a plain text summary. Show empty, invalid amount and shares-do-not-add-up states. For acceptance, log three expenses from different payers with a tip, reopen the app, and prove the settle-up payments add back to the trip total.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Create a trip called Goa in rupees with four members and confirm the empty Balances view says nothing has been spent yet.
- Add a dinner of 2,450 paid by one person with a 10 percent tip split equally, and check each share and the leftover paisa follow the declared rounding rule.
- Add a scooter rental with exact amounts and a hotel deposit with weighted shares, then confirm every balance across members sums to zero.
- Open Settle up, mark one suggested payment settled, close and reopen the app, and verify the balances and remaining payments persisted.
- Undo that settlement and delete the scooter expense; confirm the balances recompute from records and no stale total remains on any screen.
Also test odd numbers on purpose: split 100 three ways, 1 between seven people, and a tip that produces fractions. The sum of the shares must equal the expense exactly every time, and the person who absorbs the extra minor unit should be predictable rather than random. A trip with one member should explain that splitting needs at least two people instead of producing a meaningless settle-up screen.
Frequently asked questions
Can people pay each other inside the app?
Not in this brief. It records who owes what and lets you mark a debt settled after the money moved elsewhere. Adding real payments is a separate project with its own provider, compliance and refund rules.
How is this different from the expense tracker blueprint?
The expense tracker is an ongoing personal or couple ledger organised by category. This splitter is built around one trip or event with several payers, uneven shares and a final settle-up list.
What about a trip in two currencies?
Keep one currency per trip for the first release. Mixed currencies need a dated exchange rate source and a decision about whose rate counts, so add that only after the single-currency flow passes its tests.
Build this blueprint
The blueprint prompt, ready for your platform. Edit anything before you send it.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.