On this page
This expense tracker build brief is for individuals who need to reconcile everyday spending without bank access. Its first version should prove one concrete loop: add an expense, change its category, and watch the monthly total update exactly once. Keep manual expenses, categories, monthly totals and budgets connected to the same saved records before adding more ambitious integrations.
Screens
- Overview: Read spending totals for the selected month and currency
- Add expense: Enter amount, transaction date, category and optional receipt
- Categories: Maintain labels without losing historical expenses
- Monthly report: Review category totals and individual transactions
- Budgets: Compare recorded spending against category limits
Data model
| Table | Key fields | Purpose |
|---|---|---|
| expenses | id (uuid), category_id (uuid), amount_minor (bigint), currency (text), spent_on (date) | Manual monetary entries without floating-point rounding |
| categories | id (uuid), name (text), archived (boolean) | Reusable classifications that remain available to history |
| budgets | id (uuid), category_id (uuid), month_start (date), limit_minor (bigint), currency (text) | Monthly comparison limits rather than bank balances |
| receipts | id (uuid), expense_id (uuid), local_path (text nullable) | Optional attachment metadata kept separate from amounts |
A local-only spending ledger avoids uploading personal purchases during the initial version. When using a backend, every expense, budget and receipt must resolve to an authenticated owner, with server-side row-level security protecting reads and writes. A receipt storage path is not authorization: private image access needs the same ownership boundary. Never put financial details into public diagnostics or unauthenticated report endpoints.
Native features
Expense capture benefits from receipt photos, a durable offline entry queue and a shareable report for a selected date range. Use the Android photo picker or SwiftUI PhotosPicker for an existing receipt; request camera permission only if direct capture is included. Room or SwiftData should preserve the original amount, currency and expense date, not just a chart total. A receipt image is evidence for the user's records, not an automatic guarantee of accurate extraction. Export should identify filters and currency so a partial report is not mistaken for all spending.
Android notes (Kotlin and Jetpack Compose)
Create the ledger with a LazyColumn keyed by expense ID and Material 3 category chips. A ModalBottomSheet can edit amount, merchant and date while leaving the original receipt reference unchanged until Save. Use rememberLauncherForActivityResult for receipt selection and keep uploads independent from the monetary record so a failed image transfer cannot duplicate an expense. Room should hold pending sync operations with idempotent entry keys; WorkManager can retry eligible attachment uploads. On an Android phone, enter a taxi expense without connectivity, rotate during receipt selection, then reconnect. Verify one ledger entry, the intended category and a clearly resolved upload state.
iPhone notes (Swift and SwiftUI)
Use a NavigationStack from monthly ledger to expense detail, with a List grouped by the expense's recorded date rather than upload date. PhotosPicker should show a removable receipt draft before saving. SwiftData can store local records and pending attachment references; calculated totals should come from the filtered entries instead of another editable balance. Present report dates in a sheet with detents and share the generated file only after generation finishes. On an iPhone, record a purchase just before midnight, change the device time zone, and reopen the monthly report. The expense must stay in the chosen accounting date and currency.
Copy-paste prompt
Build an expense tracker app for Android using native screens and a deliberately small first release. The core scope is manual expenses, categories, monthly totals and budgets. Include these destinations: Overview, Add expense, Categories, Monthly report, Budgets. Use these persisted entities: expenses, categories, budgets, receipts; retain stable identifiers and explicit relationships rather than maintaining independent screen totals. Ask me these owner decisions before implementing ambiguous behavior: the currency and minor-unit scale, whether refunds are supported, and whether receipts stay on the device. Do not invent a policy or add an unrequested external integration. Start local-only unless I explicitly choose account storage; if I choose a backend, enforce ownership on the server with row-level security. Show loading, empty and recoverable error states, plus permission-denied handling wherever a native capability requests access. Keep incomplete input recoverable and distinguish it from saved data. For acceptance, add an expense, change its category, and watch the monthly total update exactly once. Also exercise the invalid-input or denied-permission path and reopen the app to inspect the persisted result. Explain any remaining device-only checks rather than equating a successful build with a passing journey.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Choose USD and add a 12.50 expense dated within the report month under Food.
- Confirm Overview increases by 12.50 and the monthly report contains exactly one row.
- Change Food to Transport and verify the grand total is unchanged while category totals move.
- Close and reopen the app; inspect the edited category and exact amount on the saved expense.
- Attempt an invalid amount and cancel receipt selection; ensure neither action creates a second expense.
Use a month-end purchase to prove transaction dates drive reports: a purchase dated January 31 must not enter February simply because it was typed the next morning. If refunds are permitted, specify whether they are negative expenses or a separate transaction kind, and test that classification against category limits.
An empty month should show no recorded spending, not a claim that the user spent nothing in real life. A failed report query must display an unavailable total rather than a reassuring zero. Define a retention policy for receipt files: deleting an expense should remove its private attachment or explicitly explain any recovery period, and failed attachment cleanup should remain retryable without recreating the expense.
Frequently asked questions
Will this connect to my bank?
No automatic bank synchronization belongs in this manual-entry brief. A bank connection requires an explicitly chosen real provider, credentials handled appropriately and a separate privacy review.
Should receipt images include every detail?
Collect only what the owner actually needs and disclose attachment handling. Sensitive receipt details should not be stored or uploaded merely because a photo field exists.
Are budget warnings financial advice?
They are arithmetic comparisons against limits supplied by the user, not financial advice. Label incomplete periods and avoid implying that the app knows someone’s actual account balance.
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.