All Projects → catalinghita8 → android-compose-mvvm-foodies

catalinghita8 / android-compose-mvvm-foodies

Licence: other
Android sample app following best practices: Kotlin, Compose, Coroutines and Flow, Hilt, JetPack Navigation, ViewModel, MVVM, Retrofit, Coil

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to android-compose-mvvm-foodies

Android Iconics
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
Stars: ✭ 4,916 (+1214.44%)
Mutual labels:  android-development, google-material, compose, android-compose
Delish
Delish, a Food Recipes App in Jetpack Compose and Hilt based on modern Android tech-stacks and MVI clean architecture.
Stars: ✭ 356 (-4.81%)
Mutual labels:  compose, kotlin-coroutines, hilt
android-pokemon-compose
A simple app demonstrates using Jetpack compose with other Jetpack libraries.
Stars: ✭ 56 (-85.03%)
Mutual labels:  android-development, hilt, hilt-dependency-injection
Einsen
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.
Stars: ✭ 821 (+119.52%)
Mutual labels:  android-development, kotlin-coroutines
Age-Gender Estimation TF-Android
Age + Gender Estimation on Android with TensorFlow Lite
Stars: ✭ 34 (-90.91%)
Mutual labels:  android-development, kotlin-coroutines
permissions-flow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 81 (-78.34%)
Mutual labels:  android-development, kotlin-coroutines
resaca
The right scope for View Models in Android Compose
Stars: ✭ 105 (-71.93%)
Mutual labels:  compose, hilt-dependency-injection
Permissionsflow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 49 (-86.9%)
Mutual labels:  android-development, kotlin-coroutines
Expenso
📊 A Minimal Expense Tracker App built to demonstrate the use of modern android architecture component with MVVM Architecture
Stars: ✭ 325 (-13.1%)
Mutual labels:  android-development, kotlin-coroutines
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (-70.05%)
Mutual labels:  android-development, kotlin-coroutines
Dinocompose
Chrome's Dino T-Rex game developed in Jetpack Compose
Stars: ✭ 170 (-54.55%)
Mutual labels:  android-development, compose
Droid Feed
Aggregated Android news, articles, podcasts and conferences about Android Development
Stars: ✭ 174 (-53.48%)
Mutual labels:  android-development, kotlin-coroutines
MovieCompose
🎞 A demo movie app using Jetpack Compose and Hilt based on modern Android tech stacks.
Stars: ✭ 322 (-13.9%)
Mutual labels:  compose, hilt
Coffeegram
Android app using Jetpack Compose together with StateFlow and MVI
Stars: ✭ 155 (-58.56%)
Mutual labels:  compose, kotlin-coroutines
NYTimes-Compose
An offline-first application in Jetpack Compose with MVVM architecture, representing a minimalistic implementation of Top Stories API.
Stars: ✭ 98 (-73.8%)
Mutual labels:  compose, kotlin-coroutines
StateFlow-MVVM-MVI-demo
Using StateFlow as LiveData | StateFlow instead of LiveData | LiveData to StateFlow | StateFlow MVVM | StateFlow sample | StateFlow demo
Stars: ✭ 144 (-61.5%)
Mutual labels:  kotlin-coroutines, kotlin-flow
Updoot
A reddit client built for android
Stars: ✭ 51 (-86.36%)
Mutual labels:  kotlin-coroutines, hilt
RickAndMorty-AndroidMVVMSample
An android sample project using Jetpack libraries and MVVM design pattern
Stars: ✭ 17 (-95.45%)
Mutual labels:  kotlin-coroutines, hilt
Notzz App
📝 A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (-57.75%)
Mutual labels:  android-development, kotlin-coroutines
Aboutlibraries
AboutLibraries automatically detects all dependencies of a project and collects their information including the license. Optionally visualising it via the provided ui components.
Stars: ✭ 2,777 (+642.51%)
Mutual labels:  android-development, compose

Foodies - Modern Android Architecture

Foodies is a sample project that presents a modern approach to Android app development.

The project tries to combine popular Android tools and to demonstrate best development practices by utilizing up to date tech-stack like Compose, Kotlin Flow and Hilt.

The sample app layers its presentation through MVVM presentation pattern. Additionally, the application features animations like expanding and collapsing row items or other effects like collapsing toolbar.

Description

Presentation patterns layers

  • View - Composable screens that consume state, apply effects and delegate events upstream.
  • ViewModel - AAC ViewModel that manages and set the state of the corresponding screen. Additionally, it intercepts UI events as callbacks and produces side-effects. The ViewModel is scoped to the lifetime of the corresponding screen composable in the backstack.
  • Model - Data source classes that retrieve content. In a Clean architecture context, one could use UseCases or Interactors that tap into repositories or data sources directly.

As the presentation layer is defined with MVVM, there are a two core components described:

  • State - data class that holds the state content of the corresponding screen e.g. list of FoodItem, loading status etc. The state is exposed as a Compose runtime MutableState object from that perfectly matches the use-case of receiving continuous updates with initial value.

  • Effect - plain object that signals one-time side-effect actions that should impact the UI e.g. triggering a navigation action, showing a Toast, SnackBar etc. Effects are exposed as ChannelFlow which behave as in each event is delivered to a single subscriber. An attempt to post an event without subscribers will suspend as soon as the channel buffer becomes full, waiting for a subscriber to appear.

Every screen/flow defines its own contract class that states all corresponding core components described above: state content and effects.

Dependency injection

Hilt is used for Dependency Injection as a wrapper on top of Dagger.

Most of the dependencies are injected with @Singleton scope and are provided within the FoodMenuApiProvider module.

For ViewModels, we use the out-of-the-box @HiltViewModel annotation that injects them with the scope of the navigation graph composables that represent the screens.

Decoupling Compose

Since Compose is a standalone declarative UI framework, one must try to decouple it from the Android framework as much as possible. In order to achieve this, the project uses an EntryPointActivity that defines a navigation graph where every screen is a composable.

The EntryPointActivity also collects state objects and passes them together with the Effect flows to each Screen composable. This way, the Activity is coupled with the navigation component and only screen (root level) composables. This causes the screen composables to only receive and interact with plain objects and Kotlin Flows, therefore trying to be platform agnostic as much as possible.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].