Skip to content

trinitron88/bestiebites-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BestieBites Android

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.

Features

  • Meal scanning – Capture a photo with the camera or pick one from the gallery, then upload it to the /analyze endpoint 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.

Architecture

  • Kotlin, MVVM fragments, and Jetpack Navigation hosted by MainActivity.
  • ScanFragment handles media selection, base64 encoding, and uploads via OkHttp.
  • HistoryFragment shows a RecyclerView backed by OkHttp network calls and swipe-to-delete.
  • InsightFragment visualizes aggregated macros with MPAndroidChart fed by InsightViewModel.

Requirements

  • 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).

Getting started

  1. Clone the repository and open it in Android Studio.
  2. Let Gradle download dependencies (OkHttp, Markwon, Shimmer, MPAndroidChart, Jetpack libraries).
  3. Create or update local.properties to point to your Android SDK (usually handled automatically by Android Studio).
  4. Connect a device or start an emulator, then run the app configuration.

Backend configuration

The app expects the BestieBites backend to expose:

  • POST /analyze that accepts a JSON body with imageBase64 and returns a result string (markdown supported).
  • GET /history that returns an array of past meals with protein, carbs, and fat fields (plus id and MealIdentifiedAs).
  • DELETE /history/{id} to remove a history entry.

Update the URLs in ScanFragment and HistoryFragment if you host the backend elsewhere.

Testing

You can run unit tests from Android Studio or via Gradle:

./gradlew test

Instrumented tests can be run on a device or emulator:

./gradlew connectedAndroidTest

About

Android app for BestieBites

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages