Giter Club home page Giter Club logo

swami-manickam / composemvvmcleanarichtecture Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.72 MB

CryptoCurrency android app to show the coins list and its details using Coinpaprika API. This repository contains a detailed sample app that implements MVVM with Clean architecture using Compose, HiltViewModel, Room, Retrofit, Coil, Coroutine, Flow and so on

Kotlin 100.00%
coroutines-android coroutines-flow jetpack-components jetpack-compose mvvm-clean-architecture retrofit2-kotlin

composemvvmcleanarichtecture's Introduction

Compose-MVVM-CleanArch-Kotlin

CryptoCurrency android app to show the coins list and its details using Coinpaprika API.

The following diagram shows the structure of this project with 3 layers:

  1. UI
  2. Domain
  3. Data
  • ui - It uses all the components and classes related to Android Framework. It gets the data from presentation layer and shows on UI. (access all the modules)
  • data - The data layer implements the repository interface that the domain layer defines. This layer provide a single source of truth for data. (Kotlin module that can only access domain module)
  • remote - Handles data interacting with the network. (can only access data module)
  • cache - Handles data interacting with the local storing (Room DB). (can only access data module)
  • domain - The domain layer contains the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application. (Kotlin module that cannot access any other module)
  • presentation - MVVM with ViewModels exposing LiveData that the UI consume. The ViewModel does not know anything about it's consumers. (Android module that can only access domain module)

Technologies & Methodologies which used:

  • MVVM with CleanArchitecture
  • Android Architecture Components
  • Compose - Jetpack Compose is Android’s recommended modern toolkit for building native UI.
  • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
  • Room - Used to create room db and store the data.
  • Navigation - Used to navigate between fragments.
  • Coroutines - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously
  • Flow - Flow is used to pass (send) a stream of data that can be computed asynchronously
  • Dependency Injection
    • Hilt - Easier way to incorporate Dagger DI into Android application.
    • Retrofit - A type-safe HTTP client for Android and Java.

app_architecture.png architecture (1).png

The app has the following base packages:

  • app: Contains Application and AppConstant classes
  • database: Models to work with Room database
  • di: Hilt classes to work with Network and Database
  • network: Services and network models
  • repository: Contains all repositories
  • usecase: to reduce the burden of ViewModel classes and reduce code duplication and complexity
  • utils: Utility class
  • presentation: View classes along with their corresponding ViewModel.

Supported Android Versions

  • Android Versions targeted: 34
  • Android 7.0 Nougat(API level 24)

Used libraries

  1. GitHub - retrofit
  2. Gson is another popular choice and being a smaller library than Jackson, you might prefer it to avoid 65k methods limitation. Also, if you are using

composemvvmcleanarichtecture's People

Contributors

swami-disys avatar swami-manickam avatar

Watchers

 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.