Skip to content

souravk29/FoodRecipe_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍲 Food Recipe App

An Android app that lets users browse and explore various food recipes. Built with Kotlin, MVVM architecture, and uses Retrofit to fetch data from TheMealDB API in JSON format.

Kotlin


📱 Features

  • 🍽️ Browse random and category-based meals
  • 📋 View detailed recipes with ingredients and instructions
  • 🔄 Load meals dynamically from JSON API using Retrofit
  • 🧠 MVVM pattern with ViewModel and LiveData / StateFlow
  • 🎨 Simple and responsive UI using Jetpack Compose or XML

🛠️ Tech Stack

Layer Technology
UI Jetpack Compose / XML Layout
Architecture MVVM (Model-View-ViewModel)
Networking Retrofit2, GSON
Language Kotlin
API Source TheMealDB

📦 API Details

  • Base URL: https://www.themealdb.com/api/json/v1/1/
  • Example Endpoint: categories.php
  • Response format: application/json
  • No authentication needed for basic endpoints

📁 Project Structure

├── AndroidManifest.xml # App manifest and permissions

├── ApiService.kt # Retrofit API service definition

├── Category.kt # Data class representing a recipe category

├── CategoryDetailScreen.kt # UI for showing category details

├── MainActivity.kt # Entry activity hosting the navigation

├── MainViewModel.kt # ViewModel containing app logic and API calls

├── RecipeApp.kt # Application root with NavHost setup

├── RecipeScreen.kt # Home screen showing list of categories

├── Screen.kt # Navigation route definitions


🚀 How to Run

Clone this repository.

Open the project in Android Studio.

Make sure you have the following:

Internet access

Correct API base URL in ApiService.kt

Android SDK version configured correctly

Run the app on an emulator or physical device.


🔗 Retrofit Integration

interface ApiService { @GET("categories.php") suspend fun getCategories(): Response }


✅ Future Improvements

🔍 Add search and filter capabilities

🌐 Add localization support

💾 Add offline caching using Room

💡 Add error and loading states


📄 License

This project is open-source and available under the MIT License


🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to fork the repo and submit a pull request. Let’s build something delicious together! 😋

About

Food recipe application built by data fetching from an API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages