ahmedalaishat / jetstore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JetStore

JetStore is a Jetpack Compose demo with modern Android development using Hilt, Coroutines, Flow, Jetpack (Compose, ViewModel), and Material Design based on MVVM architecture.


📲 Download APK

Download the APK from this Link.

🛠 Tech stack & Open-source libraries

  • Minimum SDK level 21
  • Kotlin based, Coroutines + Flow for asynchronous.
  • Jetpack:
    • Compose: Android’s modern toolkit for building native UI.
    • ViewModel: UI related data holder and lifecycle aware.
    • App Startup: Provides a straightforward, performant way to initialize components at application startup.
    • Hilt Navigation: For navigating screens and injecting dependencies.
    • Hilt: for dependency injection.
  • Material-Components: Material design components for building ripple animation, and CardView.
  • Accompanist: A group of libraries that supplement Jetpack Compose with features that are commonly required by developers but not yet available..
  • WhatIf: Check nullable objects and empty collections more fluently.
  • Timber: A logger with a small, extensible API.

Architecture

JetStore is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.

drawing

The overall architecture of JetStore is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:

JetStore was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.

Architecture Overview

drawing

  • Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
  • The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

drawing

The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configuration changes.

Data Layer

drawing

The data Layer consists of repositories, which include business logic, it should query data from the local database and requesting remote data from the network, but it now has fake data without using local or remote data sources. It is implemented following the single source of truth principle.

About


Languages

Language:Kotlin 100.0%