GithubHelp home page GithubHelp logo

akhilesh0707 / rick-and-morty Goto Github PK

View Code? Open in Web Editor NEW
113.0 3.0 31.0 3.92 MB

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

Home Page: https://rickandmortyapi.com/

Kotlin 100.00%
mvvm-clean-architecture kotlin coroutines coroutines-flow dagger-hilt jetpack navigation-component room architecture-components

rick-and-morty's Introduction

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.

rick-and-morty's People

Contributors

akhilesh0707 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rick-and-morty's Issues

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.