SkillAgentSearch skills...

Praxis

Example Android project using MVVM, DaggerAndroid, Jetpack Compose, Retrofit, Coroutines and Multi module architecture โœŒ๐Ÿฝ

Install / Use

/learn @mutualmobile/Praxis

README

Praxis

2022 Hit Refresh! Praxis now loves โค๏ธ Jetpack Compose

<div align="left"> <a href = "https://developer.android.com/jetpack/androidx/versions/all-channel#may_5_2021"> <img src = "https://img.shields.io/badge/Jetpack%20Compose-1.0.0%20beta08-brightgreen" /> </a> </div> <br>

This is a sample app written in Kotlin following clean architecture principles which uses slack app features as an example.

The purpose of this app to showcase:

  • Implementation of Jetpack Android Architecture components with Dagger Hilt and Data Binding to minimize boilerplate code.
  • Implementation of an architecture that will support both XML and the new Compose.
  • Implementation of Modular Multi Module Navigation Architecture.
  • Performing background task with Kotlin Coroutines

Requirements

  1. Android Studio : Arctic Fox | 2020.3.1 3.1 or higher
  2. Android Emulator or Physical android device

Built With ๐Ÿ—

| Tools | Link | | :--- | :---: | | ๐Ÿค– Kotlin | Kotlin | | ๐Ÿ› Architecture Components | Android Architecture Components | | โ›“ Data Binding | Android Data Binding | | ๐Ÿ’‰ Dagger Hilt | Dagger Hilt | | ๐ŸŒ Retrofit | Retrofit | | ๐Ÿšฆ OkHttp | OkHttp | | ๐Ÿ“„ Gson Parsing | Gson | | ๐ŸŒŠ Coroutines | Kotlin Coroutines | | ๐Ÿ„๐Ÿผโ€โ™€๏ธ Flows | Flows |

Architecture

Praxis follows the principles of Clean Architecture with Android Architecture Components.

Architecture's layers & boundaries:

<img src="art/architecture.jpeg" />

Presentation Layer contains UI (Activities & Fragments) that are coordinated by ViewModels which execute 1 or multiple UseCases. Presentation Layer depends on Domain Layer.

Domain Layer is the most INNER part of the circle (no dependencies with other layers) and it contains Entities, Use cases & Repository Interfaces. Use cases combine data from 1 or multiple Repository Interfaces.

Data Layer contains Repository Implementations and 1 or multiple Data Sources. Repositories are responsible to coordinate data from the different Data Sources. Data Layer depends on Domain Layer.

Notes: Mapping between response models and transformed models will happen via extension functions defined in transformed model file

Conventions:

Files are suffixed with be defined Class types.

  • ViewModels are suffixed with VM. Ex: LoginVM
  • UseCases are suffixed with UseCase. Ex: LoginUseCase
  • Sources are suffixed with Source. Ex: LoginRemoteSource, LoginLocalSource
  • Repositories are suffixed with Repo. Ex: LoginRepo

Conclusion

This project can be used as a template for new apps. This project is continually evolving to integrate other libraries and techniques to keep it up to date.

Related Skills

View on GitHub
GitHub Stars371
CategoryDevelopment
Updated15d ago
Forks48

Languages

Kotlin

Security Score

100/100

Audited on Mar 18, 2026

No findings