Expense Scanner
Build an Android app in Kotlin that turns photos of receipts into expense records. You take or pick a photo, the text is recognized on the phone with ML Kit, and the app suggests the store, date, total and line items, which you then check and correct before saving, because recognition is never perfect. Expenses are stored with Room, can be browsed and totaled per month and category, and receipts in other currencies are converted using exchange rates fetched with the Ktor client. You'll learn on-device text recognition, extracting structured data from messy text, designing a review-and-correct flow, Room, calling an API with Ktor, and testing parsing logic with real examples.
- Estimate
- ~14.5h
- Steps
- 7
- Completed by
- 0
- Proposed by
- codeseed.app
Room · Ktor
Project roadmap
- 01
Define the flow
~1.5hWrite DESIGN.md: the steps (capture, recognize, suggest fields, review and correct, save), the data (an expense with store, date, currency, total, category, the photo path, and line items with description and amount), what happens when recognition finds nothing useful, and that nothing leaves the phone except exchange rate requests. Collect 10 real receipt photos to test with. Done when: DESIGN.md describes the flow and data.
- 02
Capture and recognize text
~2hLet the user take a photo (with CameraX or the system camera) or choose one from the gallery, copy it into the app's storage and fix its rotation. Run ML Kit text recognition on it and keep the recognized lines with their positions. Done when: photographing a receipt shows its recognized text lines.
- 03
Extract the fields
~3hWrite a pure Kotlin parser that finds the likely total (lines containing words like TOTAL near an amount, or the largest amount at the bottom), the date (several formats), the store name (usually the first lines), the currency, and line items (lines ending with an amount). Handle both 1,234.56 and 1.234,56. Test it on text recognized from your sample receipts. Done when: the parser gets the total and date right on most sample receipts.
- 04
Review and correct
~2.5hBuild a review screen in Compose showing the photo and the suggested fields, all editable, with line items that can be added, removed and edited. Warn when the line items don't add up to the total. Nothing is saved until the user confirms. Done when: users can fix every field before saving, and mismatched totals are flagged.
- 05
Store and browse expenses
~2hStore expenses and line items in Room, with money as whole cents. Build a list of expenses by month with totals per category, and a detail screen with the receipt photo. Allow editing and deleting expenses (deleting also removes the photo). Done when: saved expenses appear in the monthly list with correct totals.
- 06
Convert currencies with Ktor
~1.5hFor receipts in another currency, fetch the exchange rate for the receipt's date from a free API (such as Frankfurter) with the Ktor client, save it with the expense, and show both amounts. Cache rates in Room, and when offline, let the user enter a rate by hand. Done when: a foreign receipt shows its amount in the home currency, even when saved offline.
- 07
Test it
~2hWrite unit tests for the parser using text from your sample receipts (checking total, date, store and items), amount formats and date formats, Room DAO tests for monthly totals, and a Ktor client test with MockEngine. Note in README.md how often the parser gets each field right on your samples. Done when: all tests pass, and README.md shows the accuracy.
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack