Skip to content
/ Recipes Public

Recipes Reference App - This app conflates Meal and Code Recipes, creating a UX to demonstrate the techniques it describes.

License

Notifications You must be signed in to change notification settings

balch/Recipes

Repository files navigation

Recipes Reference App

⚠️ COOKING IN PROGRESS

🥖🥖This app is still baking under the hood🥖🥖

WHAT IS THIS?

Keeping up with the latest Android trends is always a challenge. One of the techniques I use is to always have a reference app handy. These apps should showcase the latest Android architecture and patterns for the following areas:

  • UI and Biz Logic Separation
  • Navigation UX and Theme
  • Data and Image Retrieval
  • Threading
  • Dependency Injection
  • Testing

The latest incarnation of my reference app is called Recipes.

Since I love a good double entendre, this app conflates Meal and Code Recipes, creating a UX to demonstrate the techniques it describes.

One data source for this app is from the excellent (and free) TheMealDB which has nice amount of categorized data with textual and visual information describing a semi-complex process (aka, a Meal Recipe). The other data source was my 🧠 and describes the code used to build the app in the form of Code Recipes (sprinkled in amongst the Meal Recipes)

Code Recipes: 👉👉 assets/code-recipes 👈👈

The goal was to brush up on the the latest Android tech stack components and pack as many features as I could into an app created in 3 ??? weekends of watching sports on the couch. Junie and Claude (and Gem3) actually did a lot of work, and once again came through in frontend design and impl, dependency management, and kicking off new features. This time the data model was a huge AI win as I prompted Junie with the TheMealDB API url, a reference to Ktor, and in less than 5 minutes the API layer materialized in my git status staged log.

Another reason this app came together so nicely is due to the plethora of free and easy to use Android Tools and Libraries supplied by both Big-Biz (hello GOOGLE and JETBRAINS), and the Android Community ICs toiling away on GitHub and Medium. The Code Recipes mostly originate from these sources and describe the wiring and plumbing used to create a visually compelling Android Application.

😋🌮 Bon App...😋🌮

Mobile Tablet
recipes_category recipes_code
recipes_agent recipes_detail

Koog AI Agent Integration

Recipe Maestro is the in-app chatbot that answers questions about meal and coding recipes. The agent configuration provides randomized mood prompts for more intesting engagement.

The agent was built using Koog and integrates with the Gemini models. Multiple tools were created to provide access to remote and local data sources and allow for AI recipe creation and navigation. The Agent Screen also displays token and tool usage metrics.

API Key Configuration

To use the AI features, you need a Google Gemini API key:

  1. Obtain a Gemini API key from Google AI Studio
  2. Create a local.properties file in the project root (if it doesn't exist)
  3. Add your API key to the file:
    GEMINI_API_KEY=your_api_key_here
  4. The key will be automatically loaded into BuildConfig during build

Note: The local.properties file is gitignored and should never be committed to version control.

Dependencies

Dependency Description
android-youtube-player YouTube Player library for Android
Coil Image Loader for Jetpack Compose
Compose Adaptive Adaptive Layouts for Jetpack Compose for mutliple screensize and form factor detection
Compose Adaptive Navigation Suite Adaptive Navigation Suite for Material 3 for Navigation widget screensize support
Compose Material3 Material Design Components for Jetpack Compose
Compose Material3 Expressive Expressive APIs for Material 3 for new widets and dynamic motions
Compose Navigation3 Navigation Component for Jetpack Compose
Haze Chris Banes 'glassmorphism' blur library for Compose.
Metro Compile-time Dependency Injection for Kotlin by Zac Sweers
KmLogging Kotlin Multiplatform logging library.
Koog AI Agents AI Agent framework with Gemini integration
Ktor HTTP Client for Android
Markdown Renderer Mike Penz Multiplatform Markdown Renderer
TheMealDB Free, easy to use, API for Food Recipes
Truth Google Assertion Library used for Testing
Turbine Coroutine Flow Testing Library from CashApp

About

Recipes Reference App - This app conflates Meal and Code Recipes, creating a UX to demonstrate the techniques it describes.

Topics

Resources

License

Stars

Watchers

Forks

Languages