Recipes is a simple demo app based on modern Android application tech-stacks and CLEAN architecture.
- ViewBinding - Allows to more easily write code that interacts with views.
- ViewModel - State Holder. Responsible for the production of UI state, contains the necessary logic for that task.
- Lifecycle - Lifecycle-aware components.
- Navigation - In-app navigation.
- SafeArgs - Passing data while navigating between fragments.
- Room - Database.
- Kotlin Coroutines - A concurrency design pattern to simplify code that executes asynchronously.
- Kotlin Flows - In coroutines, a flow is a type that can emit multiple values sequentially, as opposed to suspend functions that return only a single value. For example, you can use a flow to receive live updates from a database.
- Dagger-Hilt - Dependency injection.
- Glide - Image loading.
- Retrofit2 & Gson - REST API consumption.
- MockWebServer - A scriptable web server for testing HTTP clients.
- OkHttp Idling Resource - An Espresso IdlingResource for OkHttp.
- Google Play Services Location - Fused location provider.
- Timber - A logger with a small, extensible API which provides utility on top of Android's normal Log class.
- SpinKit - Loading animations.
- Shimer - To add a shimmering effect to any view.
- Material-Components Modular and customizable Material Design UI components for Android.
- Mockito - Mocking framework for unit tests.
- Leakcanary - A memory leak detection library.
- ViewPager2 TabLayout
- Fragment 1 - Bookmarked recipes.
- Fragment 2 - Search recipes by name.
- Fragment 3 - Search recipes by country if ACCESS_COARSE_LOCATION permission granted.
- Single source of truth (Room)
- Unidirectional Data Flow
- Error handling (Result)
- Offline mode
- User events in ItemUIState
- Fragment constructor injection with FragmentFactory Hilt
- CollapsingToolbarLayout
- Day/Night theme
- Orientation changes support
- Multi-module project. One module per CLEAN Architecture layer.
- Unit Tests with Flow
- UI Tests
- Navigation
- Drawable changes
- Fragments with FragmentFactory Hilt
TheMealDB is an open, crowd-sourced database of Recipes from around the world. They also offer a free JSON API for anyone wanting to use it, with additional features for subscribers. Recipes uses the TheMealDB API. Obtain your API_KEY TheMealDB and paste it to the gradle.properties file to try the app.