Code Monkey home page Code Monkey logo

rick-and-morty's Introduction

Rick & Morty

This app consumes data from the Rick & Morty API. The app is built using Kotlin and encompasses the Clean Architecture principle with MVVM approach and Jetpack libraries.

You can download the test apk here - Rick & Morty.

Wubalubadubdubbb!! 🀘🏾🀟🏾

Table of Contents

Project Setup

To setup the project in your machine

  • Clone the repo
foo@bar:~$ git clone https://github.com/tirgei/rick-and-morty.git
  • Set the BASE_URL in the local.properties file.

You can then import the project to your Android Studio

Architecture

The app is divided into 3 modules, namely:

  • Presentation (app)
  • Data
  • Domain

This approach is guided by the clean architecture approach which advocates for clear abstraction of the flow of data from the business logic to the presentation framework dealing with displaying data to the user.

Presentation

The app module contains the UI and navigation frameworks and also deals with instantiation of DI components for the app. DataBinding is used to render data to the UI while the ViewModel provides a link to the data module via the respective UseCase s.

Data

The data module deals with loading data from the sample response server. The app is persisted to local cache using Room.

  • cache package - contains classes dealing with offline persistence
  • remote package - contains classes dealing with fetching data from the API.

Domain

The domain module mainly deals with the model classes which presents the data being used across both the presentation module and the data module.

It defines the UseCase(s) which handle the flow of data from the Repository layer to the ViewModel. It also defines the Repository interfaces which the data module implements to provide data access.

Libraries

Libraries used in the app include:

For testing, the following libraries are included:

  • JUnit - Framework to write tests
  • Mockito - Testing mocking framework
  • Truth - Assertions library by Google
  • Espresso - Framework to write UI tests

Screenshots

Characters Character Details

Licence

MIT License

Copyright (c) 2021 Vincent Tirgei

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

rick-and-morty's People

Contributors

tirgei avatar

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.