GitComposeApp is a modern sample project that demonstrates how to build scalable and maintainable Android applications by leveraging Jetpack Compose and Kotlin's latest features. It integrates Compose with MVI architecture and highlights the use of key Android tools like Kotlin Flow and Hilt for dependency injection.
The app serves as an example of clean Android development, focusing on how to structure an app efficiently using the latest frameworks and libraries.
-
UI Components
- Built entirely with Jetpack Compose, Android's native declarative UI toolkit.
- Styled with Material Design guidelines for consistent and engaging user interfaces.
-
Technologies
-
Architecture
- Single Activity design utilizing Jetpack Navigation.
- MVI (Model-View-Intent) architecture for unidirectional data flow and clear separation of concerns.
- Android Architecture Components (ViewModel, LiveData) to handle state and lifecycle-aware components.
- KTX Extensions for simplified Kotlin code in Jetpack.
The app follows the MVI architectural pattern, separating concerns into distinct layers for better maintainability and scalability. Each screen is driven by states, actions, and effects.
Architecture layers:
- View: Compose-based UI that listens for state updates and user events.
- ViewModel: Handles logic, processes user actions, and updates the view state.
- Model: Responsible for fetching and providing data, encapsulating business logic in repositories.
- State - A data class representing the UI's state (e.g., loading status, data to display).
- Event - A user-triggered action passed from the UI to the ViewModel (e.g., button clicks).
- Effect - One-off events like navigation actions, displaying a SnackBar, or showing a Toast.
These components work together to implement a clear, unidirectional data flow. The ViewModel mediates between the view and model, ensuring separation of concerns and predictable behavior.
Below are the previews of both dark and light modes, giving users a seamless experience across themes:
Dark Theme UI | Light Theme UI |
---|---|
If you enjoy this project or find it helpful, please give it a star ⭐!