Skip to content

Android MVVM Starter with Kotlin, Hilt, Coroutines, Retrofit2, Kotlin Flow, MockK, Espresso, JUnit4, and Jetpack Compose

Notifications You must be signed in to change notification settings

chayan2024/MVVM-CleanArchitecture-Pattern-jetpackCompose-Android

Repository files navigation

About

Android MVVM Starter with Kotlin, Hilt, Coroutines, Retrofit2, Kotlin Flow, MockK, Espresso, JUnit4, and Jetpack Compose

Features:

  • MVVM Architecture: Follows the Model-View-ViewModel architectural pattern for separation of concerns and maintainability.
  • Kotlin Programming Language: Written entirely in Kotlin, taking advantage of its concise syntax and modern features.
  • Hilt for Dependency Injection: Utilizes Hilt, the recommended dependency injection library by Google, for managing dependencies and facilitating testing.
  • Coroutines and Kotlin Flow: Employs Coroutines for asynchronous programming, enabling smooth and non-blocking execution of tasks. Kotlin Flow is used for reactive streams.
  • Retrofit2 for Network Requests: Uses Retrofit2 for making HTTP requests to a RESTful API, handling network communication efficiently.
  • MockK for Mocking: Implements MockK for creating mocks in unit tests, simplifying the testing process and improving code coverage.
  • Espresso for UI Testing: Integrates Espresso for UI testing, ensuring the correctness and robustness of the user interface.
  • JUnit4 for Unit Testing: Employs JUnit4 for unit testing, validating individual units of code in isolation and promoting test-driven development.
  • Jetpack Compose for UI Development: Adopts Jetpack Compose for building modern and declarative UIs, enabling faster and more flexible UI development.

Modules:

  • app: Contains the main application code, including UI components, ViewModels, and business logic.
  • data: Includes data-related components such as data sources, repositories, and network service implementations.
  • domain: Defines the domain layer entities, use cases, and business logic.
  • presentation: Contains presentation-related components like ViewModels, UI state management, and Jetpack Compose UI elements.
  • test: Houses unit tests and UI tests for various modules.

Architecture Diagram:

MVVM Architecture Diagram