All Projects → HamdiBoumaiza → ApolloRickAndMorty

HamdiBoumaiza / ApolloRickAndMorty

Licence: other
just a side project to try out GraphQL and Dagger Hilt with Clean architecture and MVVM

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to ApolloRickAndMorty

iOS-Clean-Architecture-Example
An iOS app designed using clean architecture and MVVM.
Stars: ✭ 50 (+78.57%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Superhero-App
🦸🏻‍♂️🦹🏻‍♀️Superhero app built with Kotlin, ViewModel, LiveData, ViewBinding, Room, and Hilt
Stars: ✭ 27 (-3.57%)
Mutual labels:  viewmodel, viewbinding, hilt
Ios Clean Architecture Mvvm
Template iOS app using Clean Architecture and MVVM. Includes DIContainer, FlowCoordinator, DTO, Response Caching and one of the views in SwiftUI
Stars: ✭ 753 (+2589.29%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Kotlinjetpackinaction
🔥🔥 Kotlin Jetpack zero to hero. 新手到高手
Stars: ✭ 264 (+842.86%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Jetpack-Compose-MVI-Demo
Demo / Sample Android Project created with Jetpack Compose and MVI Architecture Pattern
Stars: ✭ 114 (+307.14%)
Mutual labels:  viewmodel, hilt, hilt-android
Weatherapp
5 Day Forecast app that works on Android and uses latest tools (Kotlin, Navigation, Room, LiveData, Databinding, Dagger 2)
Stars: ✭ 426 (+1421.43%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Sample Code Movies
This repository contains sample code. Its purpose being, to quickly demonstrate Android and software development in general, clean code, best practices, testing and all those other must know goodies.
Stars: ✭ 81 (+189.29%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (+96.43%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (+450%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Foodium
It simply loads Posts data from API and stores it in persistence storage (i.e. SQLite Database). Posts will be always loaded from local database. Remote data (from API) and Local data is always synchronized.
Stars: ✭ 1,940 (+6828.57%)
Mutual labels:  mvvm, viewbinding, hilt-android
Imomoe
樱花动漫第三方安卓Android客户端,不含广告,免费开源,目的是学习Android开发。Discord:https://discord.gg/MyaRtRGEzr
Stars: ✭ 996 (+3457.14%)
Mutual labels:  viewmodel, viewbinding, hilt
Compose-ToDo
A fully functional Android TODO app built entirely with Kotlin and Jetpack Compose
Stars: ✭ 130 (+364.29%)
Mutual labels:  viewmodel, hilt, hilt-android
modern-android
Modern Android Project Skeleton
Stars: ✭ 17 (-39.29%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Theatre
Pet project using Clean Architecture + MVVM + Reactive Extensions + Android Architecture Components. The data are fetched from LondonTheatreDirect API. 🎭
Stars: ✭ 577 (+1960.71%)
Mutual labels:  mvvm, clean-architecture, viewmodel
Movieapp Clean Architecture
Learning Project (Movie App) For Applying Android Architecture Components And Clean Architecture Using MVVM With Kotlin
Stars: ✭ 123 (+339.29%)
Mutual labels:  mvvm, clean-architecture, viewmodel
roove
Dating app based on firebase services and facebook login. MVVM-Kotlin-RxJava-Dagger-Databinding
Stars: ✭ 55 (+96.43%)
Mutual labels:  clean-architecture, viewmodel, hilt
Newsster
Android App using Paging3, Hilt, Coroutines, Flow, Jetpack, MVVM architecture.
Stars: ✭ 147 (+425%)
Mutual labels:  viewmodel, viewbinding, hilt
GithubApp-android-architecture
Let's learn a deep look at the Android architecture
Stars: ✭ 16 (-42.86%)
Mutual labels:  clean-architecture, viewmodel
RickAndMorty
No description or website provided.
Stars: ✭ 63 (+125%)
Mutual labels:  mvvm, hilt
Transact
A transaction management android app which allows you to verify records from both parties before addition.
Stars: ✭ 21 (-25%)
Mutual labels:  clean-architecture, hilt-android

About ApolloRickAndMorty

Hello there , In this project I tried showcasing how to build an Android Application with clean architecture and MVVM using some of the jetpack libraries with Kotlin Coroutines & Dagger Hilt. This App is using the Rick and Morty GraphQl as a remote data source.

This app is based on the Guide to app architecture article, Kotlin 1.4, and coroutine. I also used some android architecture components like LiveData, ViewModel.

I wrote a medium article to talk about GraphQL and how to implement it in an android application, feel free to check it out.

Project Architecture

Communication between layers

  1. UI calls method from ViewModel.
  2. ViewModel executes Use case.
  3. Use case executes one or multiple Repositorie function.
  4. The Repository returns data from one or multiple Data Sources(Remote-Rick and morty GraphQL , Local-Room DB). the repository is the single source of truth
  5. Information flows back to the UI where we display the data fetched from data sources.

I made a diagram to show the flow of the data between the three layers(data, domain , presentation) data flow diagram

Project Structure

  • Data
    • This is my data layer and consists of the Repository implementation class as well as the remote and local data sources and mappers
  • Domain
    • This is the domain layer and consists of the domain models as well as the usecases.
  • UI
    • This is the presentation layer. I have set up packages by feature here. This consists of the view related code.
  • DI
    • This is where Dagger related code lives , I wanted to try out Hilt and see what it can deliver.
  • Utils
    • This is where most extension functions and constants.

Libraries Used

  • ViewModel - store and manage UI-related data in a lifecycle conscious way
  • LiveData - notify the view when data changes .
  • ViewBinding - easily write code that interacts with view
  • Material - Material Components.
  • Coroutine - performs background tasks
  • Flows - for asynchronous data streams
  • Coil - An image loading library for Android backed by Kotlin Coroutines
  • Gson - JSON Parser
  • Apollo- GraphQL client for the JVM, Android and Kotlin multiplatform
  • Dagger Hilt - dependency injector
  • Room - Save data in a local database
  • Espresso // UI test
  • Barsita -UI tests Built on top of Espresso
  • Junit // unit tests
  • Truth // Makes your test assertions and failure messages more readable

Screenshots

CharactersActivity DetailsActivity

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].