GithubHelp home page GithubHelp logo

mina-mikhail / kotlin-base-mvvm Goto Github PK

View Code? Open in Web Editor NEW
120.0 6.0 26.0 1.12 MB

๐Ÿ’Ž Android Base Project with Kotlin and MVVM applying clean architecture

Kotlin 99.86% Shell 0.14%
mvvm-architecture mvvm-android android-architecture clean-architecture android kotlin hilt mvvvm-android retrofit2 databinding

kotlin-base-mvvm's Introduction

Android Clean Architecture

๐Ÿ‘‰ Clean Architecture:

๐Ÿ‘‰ Domain & Data Layer:

๐Ÿ‘‰ Presentation Layer:

๐Ÿ‘‰ Architecture:

  • Following Clean Architecture.
  • MVVM Architecture.
  • Repository pattern.
  • Use Cases.
  • Applying SOLID principles, each class has a single job with separation of concerns by making classes independent of each other and communicating with interfaces.
  • Using Kotlin-KTS & buildSrc to handle project dependencies.

๐Ÿ‘‰ Tech Stack & Libraries:

  • Navigation component - navigation graph for navigating and replacing screens/fragments
  • DataBinding - allows to more easily write code that interacts with views and replaces findViewById.
  • ViewModel - UI related data holder, lifecycle aware.
  • Flow & StateFlow - Build data objects that notify views when the underlying database changes.
  • Dagger-Hilt for dependency injection. Object creation and scoping is handled by Hilt.
  • Kotlin Coroutines - for managing background threads with simplified code and reducing needs for callbacks
  • Retrofit2 & OkHttp3 - to make REST requests to the web service integrated.
  • Coil - for image loading.
  • Material Bottom Navigation - to handle bottom tabs with support for multiple backStack.

๐Ÿ‘‰ Project Structure:

  • Sample includes some basic features required in each project like :
    • Splash.
    • App Tutorial.
    • Login - (With Business Logic).
    • Sign Up - (Blank Screens).
    • Forgot Password -(Blanck Screens).
    • Home Screen - (Contains 3 Tabs with 3 NavGraphs).

๐Ÿ‘‰ Extra Modules:

  • You will find extra modules also developed by me like :
    • AppTutorial - (To handle onBoarding tutorial screens).
    • ActionChooser - (A customized pop up with recyclerView of single selection).
    • PrettyPopUp (A customized pop up to display message to user with two actions (positive & negative buttons)).
    • ImagesSlider (An images slider supports auto scrolling for images from url and support GIF images).

๐Ÿ‘‰ Code Style:

  • Following official kotlin code style

๐Ÿ‘‰ Apply Git Hooks:

  • To apply git hooks in order to automate process of styling and checking your code, just follow this steps:
    • Copy pre-commit file depending on your OS from myGitHooks.
    • Paste it into .git/hooks in your project.
  • Now each time you commit your changes, ktlintFormat and ktlintCheck will automatically run

๐Ÿ‘‰ Local Development:

  • Here are some useful Gradle commands for executing this example:
    • ./gradlew clean - Deletes build directory.

๐Ÿ‘‰ TO DO:

  • Apply ktlint for checking code style.
  • Use git hooks to automate code checking and styling before any new commit.
  • Use Flow in Domain layer.
  • Use StateFlow in Presentation layer.
  • Use UseCases.
  • Handle Different Build Variants.
  • Use Ktor as network client instead of Retrofit & OKHTTP.
  • Use Data Store instead of Shared Preferences.
  • Explore full MVI implementation.
  • Add some unit tests.

๐Ÿ‘‰ Contributing to Project:

  • Just fork this repository and contribute back using pull requests.
  • Any contributions, large or small, major features, bug fixes, are welcomed and appreciated but will be thoroughly reviewed .

๐Ÿ‘‰ Find this project useful ? โค๏ธ

  • Support it by clicking the โญ button on the upper right of this page. โœŒ๏ธ

๐Ÿ‘‰ Stargazers: โญ

Stargazers repo roster for @sadanandpai/javascript-code-challenges

๐Ÿ‘‰ Forkers: โš’๏ธ

Forkers repo roster for @sadanandpai/javascript-code-challenges

๐Ÿ‘‰ Donation:

If this project help you reduce time to develop, you can give me a cup of coffee :)

Buy Me A Coffee

โš ๏ธ License:

   Copyright (C) 2021 MINA MIKHAIL PRIVATE LIMITED

   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.

kotlin-base-mvvm's People

Contributors

mina-mikhail 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  avatar  avatar  avatar

kotlin-base-mvvm's Issues

build error

The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.

build issue

The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.

Gradel issue

The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found
Screenshot (23)
.

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.