BestieBites is an Android app that lets you capture or pick a meal photo, send it to the BestieBites backend for AI-powered nutrition analysis, and review your macro trends over time.
- Meal scanning – Capture a photo with the camera or pick one from the gallery, then upload it to the
/analyzeendpoint for a markdown-formatted nutrition breakdown. - History management – View the list of past analyses fetched from
/history, and swipe left to delete entries on the server. - Macro insights – Plot protein, carb, and fat trends from the history API using MPAndroidChart.
- Smooth UI – Uses Material components, Shimmer loading, and markdown rendering via Markwon.
- Kotlin, MVVM fragments, and Jetpack Navigation hosted by
MainActivity. ScanFragmenthandles media selection, base64 encoding, and uploads via OkHttp.HistoryFragmentshows a RecyclerView backed by OkHttp network calls and swipe-to-delete.InsightFragmentvisualizes aggregated macros with MPAndroidChart fed byInsightViewModel.
- Android Studio Jellyfish (or later) with JDK 11.
- Android SDK 35; minSdk 24.
- Network access to the BestieBites backend (default:
http://35.209.224.132:4000).
- Clone the repository and open it in Android Studio.
- Let Gradle download dependencies (OkHttp, Markwon, Shimmer, MPAndroidChart, Jetpack libraries).
- Create or update
local.propertiesto point to your Android SDK (usually handled automatically by Android Studio). - Connect a device or start an emulator, then run the app configuration.
The app expects the BestieBites backend to expose:
POST /analyzethat accepts a JSON body withimageBase64and returns aresultstring (markdown supported).GET /historythat returns an array of past meals withprotein,carbs, andfatfields (plusidandMealIdentifiedAs).DELETE /history/{id}to remove a history entry.
Update the URLs in ScanFragment and HistoryFragment if you host the backend elsewhere.
You can run unit tests from Android Studio or via Gradle:
./gradlew testInstrumented tests can be run on a device or emulator:
./gradlew connectedAndroidTest