Mutable state is used in this project instead of Flows.
Download:
$ git clone https://github.com/SyedAmmarSohail/CarApp.git
Import Project by Android Studio Menu > File > Import Project.
Release:
This app is production ready, only need to add your keystore path, password and alias in build.gradle file located under the app folder.
AppModule:
Used layer-based clean architecture in which include data, domain and presentation layer.
-
Data layer - Manages application data eg. retrieve data from the network, manage local data cache
-
Domain layer - Contains business logic with separate usecases
-
Presentation layer - Presents data to a screen and handle user interactions
BuildSrc:
Puts every dependencies in one place with respect to its classes, and use it by calling the dependency with its class.
.
├── CarApp
├── app
├── carapp
├── carSelect
├── data
├── di
├── CarDataModule
├── intercepter
├── QueryInterceptor
├── mapper
├── CarMapper.kt
├── remote
├── dto
├── CarResponse
├── CarApi
├── repository
├── CarRepositoryImp
├── domain
├── di
├── CarDomainModule
├── model
├── Type
├── repository
├── CarRepository
├── usecase
├── BuiltDataUsecase
├── CarUseCase
├── MainTypeUsecase
├── ManufacturerUsecase
├── presentation
├── component
├── ActionAppBar.kt
├── ComposeBorderText.kt
├── ComposeButton.kt
├── ComposeTextWithBackground.kt
├── ComposeVerticalList.kt
├── DummyList.kt
├── LinePlaceHolder.kt
├── SearchTextField.kt
├── ShimmerAnimation.kt
├── CarEvent.kt
├── CarScreen.kt
├── CarSummaryScreen.kt
├── carUiState
├── CarViewModel
├── sheetContentScreen.kt
├── utils
├── DefaultPaginator
├── Paginator
├── UiEvent
├── UiText
├── ui
├── theme
├── Color.kt
├── Dimensions.kt
├── FontSize.kt
├── Shape.kt
├── Theme.kt
├── Type.kt
├── CarApp
├── MainActivity
├── buildSrc
├── AndroidX
├── Build
├── Compose
├── Coroutines
├── DaggerHilt
├── Google
├── Kotlin
├── Moshi
├── ProjectConfig
├── Retrofit
├── Testing
└── .gitignore
Unit Test:
To run the unit tests for repository go to the CarRepositoryImpTest class under the test folder and run the tests.
End to End UI Test:
To run the end to end ui tests for the app go to the CarE2ETest class under the androidTest folder and run the tests.
Syed Ammar Sohail - ammarsohail321@gmail.com