/Animatrix

Sample Android app built with Hilt, Ktor, Coil, Kotlin - Coroutines and MVI with clean architecture

Primary LanguageKotlin

Animatrix

Animatrix demonstrates modern Android development with Hilt, Coroutines, Flow, Jetpack Compose, ViewModels, and Material Design based on MVI architecture.


Tech stack & Open-source libraries

  • Minimum SDK level 24.
  • Kotlin based, utilizing Coroutines + Flow for asynchronous operations.
  • Jetpack Libraries:
    • Jetpack Compose: Android’s modern toolkit for declarative UI development.
    • Lifecycle: Observes Android lifecycles and manages UI states upon lifecycle changes.
    • ViewModel: Manages UI-related data and is lifecycle-aware, ensuring data survival through configuration changes.
    • Hilt: Facilitates dependency injection.
  • Architecture:
    • MVI Architecture (Model - View - Intent): Facilitates separation of concerns and promotes maintainability.
    • Repository Pattern: Acts as a mediator between different data sources and the application's business logic.
  • Ktor: Constructs REST APIs and facilitates paging network data retrieval.
  • Kotlinx-Serialisation: A modern JSON parsing library.
  • Coil-Compose: A highly optimized Jetpack Compose and Kotlin Multiplatform image loading library that fetches and displays network images.


Architecture

Animatrix adheres to the Clean MVI architecture and implements the Repository pattern.

  • Each layer adheres to the principles of unidirectional event/data flow: the UI layer sends user events to the data layer, and the data layer provides data streams to other layers.

  • The data layer operates autonomously from other layers, maintaining purity without dependencies on external layers.

  • This loosely coupled architecture enhances component reusability and app scalability, facilitating seamless development and maintenance.

Rest Api

Animatrix is using the Nekos.best for constructing RESTful API