/android-crypto-app

An Android App that shows Cryptocurrency prices

Primary LanguageKotlin

Android Main CI Android Develop CI Quality Gate Status

⚠️ This project works only with Android Studio Arctic fox and above

Implementation of the clean architecture using:

  • Jetpack compose
  • Dagger Hilt for dependency injection
  • Coroutine/Flow
  • Unit test with junit
  • Instrumentation test with Espresso
  • Github Action

Screenshots 📸

Dark mode 🌚

architecture   architecture

Light mode 🌕

architecture   architecture

Layers

Domain Layer

This module should contain only Java/Kotlin classes and doesn't have any Android framework class. It defines the business aspect of the application. With the use case it combines data from the data layer It doesn't depend on any module. It communicates with the data module through a repository interface declared on the domain layer and implemented on the data layer.

Presentation Layer

This is the platform specific layer, it contains UI coordinated by ViewModels which execute use cases. This layer depends on the Domain Layer. With the DomainModelMappers, domains models are converted to ui models.

Data Layer

Contains remote, stored or in-memory data sources. With the DomainModelMappers, data models like api models or database model are converted to domain models.

Architecture

architecture

Flow

  1. UI (Composable, Fragment, Activity, ...) calls loading method from the ViewModel.
  2. ViewModels execute the use case.
  3. Use case calls the repository.
  4. The repository returns data from local or remote data source.
  5. Information flows back to the UI.

Credit

Data are provided by the awesome CoinGecko API