Module Overview
Home
Main screen displaying article list
Launcher
Splash screen and app initialization
Article Detail
Detailed view of individual articles
Home Feature
Module:feature:home
Package: es.mobiledev.feature.home
The home feature displays a list of favorite articles and handles navigation to article details.
HomeScreen
File:feature/home/src/main/java/es/mobiledev/feature/home/screen/HomeScreen.kt:16
Callback function invoked when user taps an article, receives article ID as parameter
- Displays list of favorite articles
- Lifecycle-aware data loading with
LifecycleStartEffect - Loading state management
- Navigation to article detail screen
Usage Example
HomeViewModel
Package:es.mobiledev.feature.home.viewmodel
Extends: BaseViewModel<HomeUiData>
Manages the home screen state and business logic.
Key Methods:
Loads the list of favorite articles from the repository
HomeUiState
List of all articles to display
List of user’s favorite articles
Launcher Feature
Module:feature:launcher
Package: es.mobiledev.feature.launcher
The launcher feature handles the app’s splash screen and initialization logic.
LauncherScreen
File:feature/launcher/src/main/java/es/mobiledev/feature/launcher/screen/LauncherScreen.kt:21
Callback invoked when launcher initialization is complete
- Displays splash screen with branded background
- Performs app initialization tasks
- Automatically navigates to home when complete
- Uses
LaunchedEffectfor side effects
Usage Example
LauncherViewModel
Package:es.mobiledev.feature.launcher.viewmodel
Extends: BaseViewModel<LauncherUiData>
Manages launcher initialization logic and timing.
LauncherUiState
Flag indicating whether launcher initialization has completed
The launcher screen typically saves the last open time and performs any necessary startup checks before transitioning to the main app.
Article Detail Feature
Module:feature:articledetail
Package: es.mobiledev.feature.articledetail
The article detail feature displays comprehensive information about a single article.
ArticleDetailScreen
File:feature/articledetail/src/main/java/es/mobiledev/feature/articledetail/screen/ArticleDetailScreen.kt:18
- Displays full article details including image, title, authors, and content
- Custom bottom bar with article URL for sharing
- Favorite toggle functionality
- Loading state management
- Retrieves article ID from navigation arguments
Key Components
ArticleDetailViewModel
Package:es.mobiledev.feature.articledetail.viewmodel
Extends: BaseViewModel<ArticleDetailUiData>
Key Methods:
Loads article details by ID from the repository
The unique identifier of the article to load
ArticleDetailUiState
The article being displayed, null while loading
Whether the current article is marked as favorite
Article Detail Components
The module includes specialized composables:- ArticleDetailImage - Hero image display
- ArticleDetailBody - Article content and text
- ArticleDetailActionRow - Actions like favorite, share
- ArticleDetailBottomBar - Custom bottom bar with URL
- ArticleDetailScreenContent - Main content wrapper
Feature Module Architecture
All feature modules follow a consistent structure:Feature modules are independent and can be developed, tested, and maintained separately. They depend only on domain and common modules, never on other features.