An application designed to help users easily discover recipes using The Meal Database, while also allowing them to create, manage, and store their own recipes.
The project focuses on delivering a simple, intuitive, and responsive recipe search experience. Although the number of recipes available through the REST API is limited, users can enhance their experience by:
-
Creating and storing custom recipes.
-
Saving their favorite API-sourced recipes for offline access.
-
Managing a personalized recipe collection within the app.
-
Offline access to certain features, even when there's no internet connection.
-
Save favorite recipes retrieved from the API to a local database for quick, offline access.
-
Create your own recipes, with the option to add photos from your device's camera or gallery.
-
Built-in search function for easy recipe finding.
-
Light, dark, and dynamic themes adapt the app's appearance based on system settings or user preferences. On devices running Android 12 or higher, Material You is used to apply dynamic colors based on the system wallpaper.
Note
No prerequisites or API key are required. Only the latest version of Android Studio.
-
Kotlin
-
Jetpack Compose
-
Material 3
-
Jetpack libraries
- Data Store
- Splash screen
- Navigation
- Paging 3
- Room database
-
Hilt
-
Coil image library
-
Kotlin serialization
-
Kotlin coroutines
-
OkHttp/Retrofit
-
Rest Api
This project uses the MVVM (Model-View-ViewModel) architectural pattern, a widely adopted structure in modern Android development. MVVM encourages separation of concerns, improves scalability, enables easier testing, and promotes better maintainability of the codebase.
The architecture is divided into three main components:
The Model represents the data layer and business logic. Its responsibilities include:
-
Fetching, storing, and processing data.
-
Interacting with external data sources, such as local databases (e.g., Room) or web services (REST APIs).
-
Containing elements such as:
-
Data classes
-
Repositories
-
Data sources (remote or local)
The View, implemented using Jetpack Compose, is responsible for rendering the user interface. Key characteristics:
-
Built using composable functions that define the UI declaratively.
-
Reactively updates when the underlying observed data changes.
-
Does not include business logic or directly access the data layer.
The ViewModel serves as a bridge between the Model and the View. Its primary role is to:
-
Expose UI-ready data using
StateFlow,LiveData, or other observable mechanisms. -
Handle user interactions and UI events.
-
Be lifecycle-aware, allowing it to survive configuration changes such as screen rotations.
-
Clear separation of responsibilities: improves code readability, maintainability, and scalability.
-
Reactive, decoupled UI: the View observes data without knowing its source.
-
Improved testability: ViewModels and Models can be tested independently.
-
Composable-friendly: aligns naturally with Jetpack Compose’s declarative and reactive approach.