/Qwez

Android Quiz App written with mvvm architecture (Playground App)

Primary LanguageJava

Qwez

Get the app under releases to the right 👉

What is Qwez?

Qwez is a questionare app! Here's the features & what you can do within the app:

  • Create an account
  • Log in and log out
  • Change user password, email, and profile photo.
  • Choose a category & difficulty and get 10 questions. You can now answer these to score points! But hurry up, there is a timer.
  • See a global highscore of all users (incl. your own). You can see how you compare to other players.
  • The app uses Firebase for user authenticaion, storage (user profile photos) and maintaining highscores. When you create an account, log in, log out or delete an account it is all taken care of by Firebase. Photos are uploaded to Firebase storage, and access from there.

Modernisation

This App is currently going through a modernisation process to change outdated components to modern, while still being written in Java (Mostly). Here is a TODO list of changes:

  • ✅ Migrate to Kotlin DSL and library version catalog
  • 🔳 Migrate from Butterknife to Viewbinding
  • 🔳 Migrate from RxPermissions to AndroidX ActivityResult API
  • 🔳 Modularize the application
  • 🔳 Migrate from RxBus
  • 🔳 Redesign the UI elements
  • 🔳 Migrate to Hilt
  • 🔳 Migrate to Datastore

OBS OBS OBS!!

  • Please beware that Interactors (=Use cases) does perform a bit of "server-side" code!! This is because not having access to some of the paid-for features from Firebase (function triggers, etc). I did have to put some of the server side code in the interactors/usecases, solely for having the app work to try out some new things without paying for Firebase. This all was just for fun and learning!! Of course this code would never have a place in a commersial product.

Architecture:

Architecture

  • MVVM: Model-View-Viewmodel
  • Repository: One repository per data type e.g sharedpreferences repository, Firebase repository etc
  • Uses a RxJava Bus for communication between different parts of the application.
  • Interactor's (Aka Use-cases): Single responsibility interactor classes for interacting with repository/repositories, services, etc. This is where the applications "business logic" resides.
  • App is highly extensible. It can easily be modified and added with further behaviour. To add new "UI package", one must:
    • Create Activity (And/or Fragment(s))
    • Create Activity Module (For dependency injection), add module to Dagger Application Component
    • Bind module to activity in "di" package
    • Create Viewmodel
    • Create Viewmodel factory
    • Provide all dependencies via Module, provide dependencies in parameters to factory+viewmodel

Modularization

This app uses modularzation to seperate the different components of the application.

  • app module: Contains all the UI code, repositories, datasources, etc. Modularization into features, core, remote, local etc is in the works.
  • firebasewrapper module: Library for adding reactive extensions (RxJava) to Firebase.

Following libraries are using in this app:

Design

  • Dagger2 for dependency injection.
  • RxJava for composing asynchronous and event-based programs (Observer-Observable pattern).
  • RxAndroid for added RxJava classes/functionality for Android.
  • Butterknife for view binding.
  • Glide for image loading.

Data

UI

Networking

Testing

  • Mocktio for testing. Very powerful testing library.

Logging/Debugging

  • Leak Canary for detecting any memory leaks.
  • Timber for simplified logging.
  • Stetho for debugging of network/local database.

Others

  • Standard libraries: AppCompat, JUnit, Espresso, CardView, RecyclerView, support libraries,Apache Commons Text...

Wrappers

Application have some RxJava wrappers for different parts of the application, to ease reactive programming within the app:

License

MIT License

Copyright 2019 AliAmid93

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 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.