Skip to content

Multi-module, Kotlin, MVI, Compose, Hilt, Navigation Component, Use-cases, SQL-Delight, Ktor

Notifications You must be signed in to change notification settings

mitchtabian/Dota-Info

Repository files navigation

Description

Multi-module demo app that gets data from a Dota2 api.

List to Detail screen

Filtering

Module Design

Module name Type Description
app Android Application MainActivity, BaseApplication, Theme, Hilt setup.
core Java/Kotlin Library Core business models and classes.
hero-datasource Java/Kotlin Library Data-sources (network and cache) for the hero Module.
hero-datasource-test Java/Kotlin Library Data-source test fakes. These are contained in their own module so they can be used in tests in other modules.
hero-domain Java/Kotlin Library Domain models and classes for the hero Module.
hero-interactors Java/Kotlin Library Use-cases for the hero Module.
ui-heroList Android Library UI components for the HeroList screen.
ui-heroDetail Android Library UI components for the HeroDetail screen.
constants Java/Kotlin Library Random constants.
components Android Library Common Composables.

Architecture

Tests

Unit Tests

I wrote unit tests for every use-case.

  1. GetHerosTest.kt
  2. GetHeroFromCacheTest.kt
  3. FilterHerosTest.kt

Compose UI Tests

UI Tests

build.gradle files

There are 3 types of build.gradle files.

  1. android application (app module)
  2. android-library-build.gradle
    • Android module that contains ui components.
  3. library-build.gradle
    • Pure java/kotlin library.

API

https://docs.opendota.com/

Hero Stats (GET)

https://api.opendota.com/api/heroStats

Known issues

  1. HeroListFilter.kt
    • Changing the filter does not rebuild the dialog with the correct size.

Credits

  1. Hristijan
    • Thanks for the chat and great sample.

About

Multi-module, Kotlin, MVI, Compose, Hilt, Navigation Component, Use-cases, SQL-Delight, Ktor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages