Module structure

June 30, 2024 ยท View on GitHub

The app follows similar modularization strategy as in NowInAndroid. Routine Tracker has the following modules:

NameResponsibility
appServes as an entry point of the app and brings everything together
build-logicContains convention plugins that reduce the gradle boilerplate for declaring dependencies in the modules
core:dataContains repository classes that serve as a single source of truth for accessing data from the offline database and data that comes from the network. Although Routine Tracker doesn't fetch data from the network yet, this layer is implemented to follow the best practices.
core:databaseOn-device local database
core:domainThe heart of the app, which contains logic for determining whether the habit is due or not, computing streaks, etc. It operates on data that comes from the data layer.
core:logicUtilities and helper classes written in raw Kotlin and not dependent on Android SDK.
core:modelKotlin data classes and enums used throughout the app for abstraction
core:testcommonCommon testing logic and fake classes that are used in tests throughout the app.
core:uiJetpack Compose components, theming logic, and helpers for Android.
featureUser interface with View Models, functionality associated with a specific feature or user journey.