Skip to content

Project modules

Khoi edited this page Mar 13, 2023 · 2 revisions

plantuml

Main module descriptions

:app

  • Android application module

:feature:x

  • Library modules.
  • Modules of features that are separated from app module.
    Ex: :features:profile, :feature:registration …
  • Presentation layer for the feature
  • Dependencies: Android-related: Activity, Fragment, Composable UI, Service…

:data:api

  • Library module.
  • Contracts of all data modules: Repository, Datasource interfaces, Model classes.
    Ex: activity feed, user profile, user’s recent location…
  • Dependencies: only Kotlin, Java code.

:domain

  • Library module.
  • Business logic: Use cases. Use interfaces in :data:api and doesn't care about concrete implementation.
  • Dependencies: Ideally to have only Kotlin, Java code. Minimum on implement details.
    (Thinking of :domain And :data:api like modules that can be shared in a KMM project)

:data:x

  • Library modules.
  • Implementations of :data:api contract interfaces. They are about how to store data (local/remote), which libraries to use...
  • Dependencies: OkHttp, Retrofit, Firebase, Room, DataStore…
Clone this wiki locally