My-Recipe

Screenshot_20220405_143752

Android project written in Kotlin which demonstrates MVVM/MVI design architecture.

  • Retrieve data from an api with Retrofit
  • Display data in UI.

Design Pattern The project used MVI and Repository design pattern approach. State in app is defined by user’s action which is called intent (not the android Intent class) which the ViewModel will get and decide the state to be reflected to the View. Intent represents an intention or a desire to perform an action, either by the user or the app itself. For every action, a View receives an Intent. The Presenter observes the Intent, and Models translate it into a new state.

Libraries

  • Jetpack Hilt – Dependency injection
  • Retrofit – API http network requests.
  • OkHttp – Use as http client for logging interceptor.
  • Jackson – JSON serialization.
  • Timber – Logging and crash reports.
  • Glide – Image loader to views.
  • Material Design – Google’s material design ui.

Setup

Run the following command to build the project

./gradlew assembleDevDebug

or

./gradlew assembleProdRelease Installation Installing apk to device can be done with the following commands. Note that debug apk is used in the commands.

via Gradle

./gradlew installDevDebug

via adb tool adb install build/outputs/apk/debug/MyRecipe_dev_debug_1.0.apk Linting Lint issues or warnings can be checked by running

./gradlew lint

Future Updates:

  • Room Database for data caching
  • Jetpack compose for UI

GitHub

View Github