kslakhani / todo-mvp

Todo Lite app following MVP Architecture in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ToDo Lite Android MVP example

Build Status Android API Code Coverage

Todo Lite app, is a wokring(production ready) sample that showcases the MVP Pattern Implementation.

Screenshots:

App features

  • Login/Register
  • Add Task
  • Update Task
  • Delete/Complete Task by swiping the card left/right
  • Set Reminder on the Task. User will be notified by notification.

Project structure

data: Implementation of the Repository pattern, contains all the data accessing.
di: Contains the classes that provide dependencies using Dagger2.
ui: MVP structure, all Activities, Fragments and UI elements in this package.
util: Utility classes.

Libraries Used

  • Authentication
  • Database
  • Schedule Reminder
  • Communication b/w data and Ui layer
    • RxJava 2 and RxAndroid 2 for interacting b/w data and UI by wrapping Firebase database callbacks into Observables.
  • Dependency Injection
    • Dagger 2 to manage App, Service, Data, Utils module dependencies.
  • Logging
    • Timber to perform logging through out the app.
  • Other

Code quality

  • For maintaining code quality findbugs, pmd and lint is integrated. It's important to have these checks. Because later these tools will helps us to maintain less buggy code. You can perform all of them at once by executing ./gradlew check

  • Circle CI with Firebase Test Lab is used for automating continuous integration and run Android test quickly.

  • The project aims to maintain high test coverage (in-progress).

  • Libraries used for testing

    • Junit
    • Mockito

Setup

  1. Clone or download this repo.
  2. This app runs off a Firebase backend. You will need to generate your firebase backend. To do this, navigate to https://firebase.google.com/ and sign up. Create a project called "Todo Lite" (or what ever you want to call it).
  3. Generate your own google-services.json file to use with the app. Navigate to the Firebase project settings dashboard. You should see an option to download the google-services.json file. This must then be placed into the app folder of this project.
  4. Create an account on Fabric for Crashlytics. To do this, navigate to https://fabric.io/sign_up and Signup and get fabric_api_key
  5. Rename the gradle.sample.properties to gradle.poperties and put the values accordingly and you are good to go.

Future work

Todo

  • Write Unit and instrumentation tests
  • Convert the project to kotlin.

License

Copyright 2018 Waleed Sarwar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Todo Lite app following MVP Architecture in Java


Languages

Language:Java 100.0%