GithubHelp home page GithubHelp logo

kiwi's Introduction

Kiwi android project

3rd-Party Libraries

  • Used material for designing layouts and UI.

  • Used viewmodel-ktx for keeping the state of fragments during configuration changes.

  • Used StateFlow as a data holder for observing the screen's state changes.

  • Used retrofit2 for networking and API calls.

  • Used okhttp3 as a client agent and also defined interceptors.

  • Used moshi-kotlin as a JSON parser and also defined custom adapters.

  • Used glide for loading images.

  • Used navigation for navigating through fragments.

  • Used hilt for using dependency injection all over the app.

  • Used kotlinx-coroutines for using the concurrency design pattern and doing asynchronous jobs.

  • Used timber for logging within the app.

  • Used junit for writing unit tests.

  • Used truth for easy assertion in tests.

  • Used mockk for mocking.

  • Used turbine for testing flows.

  • Used kotlinx-coroutines-test for testing coroutines.

  • Used kotlinx-datetime for dealing with date and time (please check out AppRepositoryImpl for more information)

  • Used Kotlin-DSL for implementing Gradle configurations.

Optional features:

  • Night/Day mode: On HomeFragment, there is a button in the toolbar to change the theme to night and day mode. The composition of SharedPreferences and Flow has been used to implement this feature. Learn more about the implementation on AppPreferences.

Architecture:

I decided to develop this app by using MVVM clean architecture. And here are my top 3 reasons for using it:

  1. Low coupling: Build things in a distributed manner. It's all about the separation of concerns. You can also use multiple view models inside a single view.

  2. Test Friendly: ViewModel has no reference to the View (Activity/Fragment) and can be tested easier than MVP for instance.

  3. Understand the app easier: Domain layer tells you everything! what this app is all about and also what it can do for the user!

Modules:

  • core: This module is responsible for keeping all settings and basic classes used in many modules.

  • buildSrc: This module is responsible for holding all dependency definitions and Gradle configurations. It has been implemented all with Kotlin-DSL.

  • data: This module holds all classes and files, including utils, APIs, Caches, etc.

  • domain: I believe that the domain is the app's language; it speaks about all the services it provides. So you can find all use-cases used within the app here. Note that the UI and Data layers depend on this module according to clean architecture concepts.

  • ui-common: You can find any base and utils classes about UI here.

  • ui-resource: You can find any resources, including theme, dimens, string, etc., shared within the app here.

  • test-common: You can find all shared classes for test implementation in other modules here.

  • feature: All the features related to the app's user interface are accessible in this module.

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.