Problem & approach
A household may have the same product in different locations, with different dates or units. Combining everything into one quantity hides useful information and can make stock updates unreliable.
I separate product identity from individual batches. People can add, use or correct stock, inspect history and review recorded dates locally. Unknown dates stay unknown; a best-before label is not a food-safety guarantee.
- 01
Add food
Create a product and its first batch.
- 02
Manage stock
Add, use or correct a quantity in a specific batch.
- 03
Review
Inspect dates, storage and the saved event history.
Inside the application
- OrganizeEnter food manually, search inventory and filter by storage.
- TrackKeep independent batch units, dates and quantities; record stock changes.
- ReviewInspect date labels and chronological history without network access.
System architecture
Compose + ViewModel
Immutable UI state and lifecycle-aware collection of inventory flows.
Rules + repository
Exact quantities, validation and atomic stock/history commands.
Room + DataStore
Room holds inventory and events; DataStore holds preferences only.
- Kotlin
- Jetpack Compose
- Room
- Jetpack DataStore
Engineering decisions
Represent quantities exactly
I store quantities as integer thousandths and reject excess precision rather than silently rounding. Totals keep incompatible units separate instead of assuming conversions.
Reviewed: Quantity parsing and adjustment rules
Keep product and batch identity separate
Editing a product does not merge its batches. Different storage, units and recorded dates remain attached to the correct stock.
Reviewed: Room schema and inventory repository
Implementation in focus
Two actions consuming the same stock
- Problem
- Separate reads and writes can allow concurrent actions to consume more stock than exists.
- Implementation
- The repository re-reads a batch within a Room transaction, validates the change and writes stock plus history atomically. A failed event insertion rolls the update back.
Verification & status
Inventory rules & device test records
Repository report · 17 November 2026 · Reviewed 18 November
The 17 November report records 4 JVM and 16 physical-device tests. They cover exact quantities, concurrent consumption, rollback, storage reassignment, reopen persistence and isolated Compose workflows.
Historical repository evidence reviewed for this case study, not freshly rerun. Synthetic screen-state captures alone do not prove persistence or all physical fold/accessibility behavior.
Offline-first MVP
The offline-first MVP implements manual entry, independent batches, stock changes, date review, storage management and local history.
No cloud sync or export/restore; uninstalling or losing the device can lose records. Barcode, OCR, reminders and AI suggestions are deferred. No store release is claimed.
Lessons & next steps
Local-first removes a network dependency, but makes data preservation especially important. Clear units, safe deletion and explicit backup limits matter as much as the inventory screen.
Complete broader accessibility/device checks and release preparation; evaluate backup/restore before expanding into convenience features.
Source & evidence access
The repository remains private. This case study shares reviewed implementation summaries and safe application captures, not source code or operational records.
Private source snapshot 4677d1d, inspected 18 November 2026. Published captures contain synthetic fixtures only.




