The Rick And Morty - MVVM with a clean architecture approach using some of the best practices in Android Development.

Overview

Akhilesh StackOverflow Akhilesh LinkedIn

Rick-and-Morty

The Rick And Morty - App consuming a Rick and Morty API to display Characters it has been built with clean architecture principles, Repository Pattern, and MVVM pattern as well as Architecture Components.

This app shows the usage of the new Navigation Architecture Component in collaboration with the Bottom Navigation view with separate back stack history for each tab.

App features:

  • List of Rick and Morty characters
  • Detail of characters
  • Bookmark character
  • Light/ Dark theme.

Screenshots

List

Architecture

Uses concepts of the notorious Uncle Bob's architecture called Clean Architecture.

  • Better separation of concerns. Each module has a clear API., Feature related classes life in different modules and can't be referenced without explicit module dependency.
  • Features can be developed in parallel eg. by different teams
  • Each feature can be developed in isolation, independently from other features
  • faster compile time

Modules:

  • rick-and-morty-ui - It uses all the components and classes releated to Android Framework. It gets the data from presentation layer and shows on UI. (access all the modules)
  • data - The data layer implements the repository interface that the domain layer defines. This layer provide a single source of truth for data. (Kotlin module that can only access domain module)
  • remote - Handles data interacting with the network. (can only access data module)
  • cache - Handles data interacting with the local storing (Room DB). (can only access data module)
  • domain - The domain layer contains the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application. (Kotlin module that cannot access any other module)
  • presentation - MVVM with ViewModels exposing LiveData that the UI consume. The ViewModel does not know anything about it's consumers. (Android module that can only access domain module)

MAD Scorecard

Tech stack - Library:

  • Kotlin
  • Coroutines - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously
  • Flow - Flow is used to pass (send) a stream of data that can be computed asynchronously
  • Dagger-Hilt - for dependency injection.
  • Kotlin-DSL - Used to handle gradle dependencies and config versions
  • JetPack
    • LiveData - For reactive style programming (from VM to UI).
    • Lifecycle - Used get lifecyle event of an activity or fragment and performs some action in response to change
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • Room - Used to create room db and store the data.
    • Navigation - Used to navigate between fragments
    • Data Binding - Used to bind UI components in your XML layouts.
  • Material-Components - Material design components like ripple animation, cardView.
  • Retrofit - Used for REST api communication.
  • OkHttp - HTTP client that's efficient by default: HTTP/2 support allows all requests to the same host to share a socket
  • Moshi - Used to convert Java Objects into their JSON representation and vice versa.
  • Timber - Used for logging.
  • Glide - Glide is a fast and efficient image loading library for Android

TODO

  • CI/CD (Github Actions, Bitrise, CircleCI)
  • Unit test
  • Jacoco for test coverage
  • Ktlint or Detekt
  • Use Jetpack Compose

Reference repository

This repository code is mostly inspired by Android-Clean-Architecture-Boilerplate.

Find this repository useful? ❤️

Support it by joining stargazers for this repository.
And follow me for my next creations! 🤩

Contributions

Please feel free to file an issue for errors, suggestions or feature requests. Pull requests are also encouraged.

You might also like...
Episodie is a TV show time tracker app with unusual design written in kotlin and clean architecture approach. Get to know how much time you spent watching tv shows.
Episodie is a TV show time tracker app with unusual design written in kotlin and clean architecture approach. Get to know how much time you spent watching tv shows.

Episodie Episodie is a TV show time tracker app with unusual design. Get to know how much time you spent watching tv shows. Track easily overall progr

An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & images using best practices
An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & images using best practices

Dog-Playground Kotlin An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads

NewsSpac-MVVM-CleanArch-TDD - The App uses MVVM architecture together with Clean architecture

Aplicativo NewsSpace Arquitetura O App utiliza a arquitetura MVVM em conjunto co

Healthify - An app to track your daily water intake and sleep and boost your work efficiency. Healthify is built using Kotlin and follows all modern android Development practices and hence is a good learning resource for beginners
Healthify - An app to track your daily water intake and sleep and boost your work efficiency. Healthify is built using Kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Healthify Healthify is an app to track your daily water intake and sleep and boost your work efficiency. Video Introduction 📹 This is a small introdu

NoteApp - A note taking app illustrating Android best practices with Jetpack Compose.
NoteApp - A note taking app illustrating Android best practices with Jetpack Compose.

NoteApp - A note taking app illustrating Android best practices with Jetpack Compose.

Samples showing best practices for MIDI on Android.

MIDI Samples This repository contains a set of individual Android Studio projects to help you write apps using MIDI APIs. Android MIDI 2.0 API samples

Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners
Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Taskify Taskify is an app to manage your daily tasks and boost your productivity Video Introduction 📹 This is a small introduction video about Taskif

This is a sample Android project that presents a modern approach to Android application development.

Movies It is a sample app that shows information about movies and series. The goal is build a scalable, maintainable and testable app, implementing go

Chat is a sample project that presents a modern, 2021 approach to Android application development.
Chat is a sample project that presents a modern, 2021 approach to Android application development.

Chat for Android Chat is a sample project that presents a modern, 2021 approach to Android application development. Screenshots 📷

Comments
  • jacoco tasks doesn't run successfully

    jacoco tasks doesn't run successfully

    jacocoFullReport and jacocoReport giving error after run them. For example for result of jacocoFullReport :

    Could not determine the dependencies of task ':remote:jacocoReport'.
    > Task with path 'testDebugUnitTest' not found in project ':remote'.
    

    I am new for implementation for jacoco. Am I doing wrong something on somewhere?

    opened by Narinc 0
Owner
Akhilesh Patil
Senior Android, PhoneGap, Java Developer
Akhilesh Patil
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

Yassin AJDI 189 Nov 26, 2022
Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.

Easy Note Easy Note: Notes app using JetPack Compose and MVVM with a clean architecture approach. This app shows the usage of the new Navigation Archi

Akhilesh Patil 10 Dec 17, 2022
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Jan 3, 2023
Food Recipes - Android application built with Jetpack compose, MVVM and clean architecture approach.

Food Recipes Android application that consuming (https://spoonacular.com/food-api) "Recipes api". It has been built with clean architecture principles

Mahmoud Elshahat 26 Jan 29, 2023
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 8, 2023
AudioNotes 📙 An open source simple audio note taking app built to demonstrate android development best practices.

AudioNotes ?? A simple open source audio note-taking ?? Android application built to describe the use of Modern Android development tools. ?? . Made w

Samson Achiaga 47 Dec 15, 2022
Android app which fetches a sample movies list to display. Built using Kotlin and latest Android tech stack, with an approach to clean architecture.

movies-sample-app This is an Android app which fetches a sample movies list to display. Built using Kotlin and latest Android tech stack, with an appr

Nadeem Ahmed 1 Oct 21, 2021
How to build an Android application using the Uncle Bob's Clean Architecture approach

MVI-Clean-Architecture This is a sample app & basic code that demonstrate how to

Ahmed Shaban  Elhdad 13 Oct 22, 2022
A complete app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

?? Blog taking application utilizing Ktor REST-API and following modern practices: Kotlin, Coroutines, Flows, Channels, Room, Work Manager, Navigation Component, MVI, Clean Architecture, Modularization, Dagger Hilt, Tests...

Haythem Mejerbi 47 Dec 17, 2022
Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, unit conversion, scientific math laws and constants, as well as some mathematical questions that need some intelligence to reach the solution.

Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, unit conversion, scientific math laws and constants, as well as some mathematical questions that need some intelligence to reach the solution.

null 7 Mar 12, 2022