Mutable state is used in this project instead of Flows.
Download:
$ git clone url
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.
.
├── app
├── di
├── AppModule
├── navigation
├── Route
├── ui
├── theme
├── BlogApp
├── MainActivity
├── blog
├── data
├── di
├── BlogDataModule
├── local
├── entity
├── BlogEntity
├── BlogDao
├── BlogDatabase
├── Converters
├── mapper
├── BlogMapper.kt
├── remote
├── dto
├── Article
├── BlogDto
├── BlogApi
├── repository
├── BlogRepositoryImp
├── domain
├── di
├── BlogDomainModule
├── model
├── BlogModel
├── repository
├── BlogRepository
├── use_case
├── BlogUseCase
├── GetBlog
├── SearchBlog
├── StoreBlogs
├── presentation
├── blog_detail
├── BlogDetailScreen.kt
├── blog_overview
├── components
├── CardItem.kt
├── SearchTextField.kt
├── Blog
├── BlogListScreen.kt
├── BlogOverviewEvent
├── BlogOverviewScreen.kt
├── BlogOverviewState
├── BlogOverviewViewModel
├── TabItem
├── buildSrc
├── AndroidX
├── Build
├── Coil
├── Compose
├── Coroutines
├── DaggerHilt
├── Google
├── Kotlin
├── Modules
├── Moshi
├── ProjectConfig
├── Retrofit
├── Testing
├── ViewPager
├── core
├── data
├── preferences
├── domain
├── model
├── preferences
├── extension
├── URLExtension
├── util
├── Constants
├── core-ui
├── component
├── ActionAppBar.kt
├── ComposeVerticalList.kt
├── ImagePlaceHolder.kt
├── LinePlaceHolder.kt
├── ShimmerAnimation.kt
├── TextWithIcon.kt
├── Color.kt
├── Dimensions.kt
├── FontSize.kt
├── onboarding
├── composables
├── OnBoardingButtons.kt
├── OnboardingContent.kt
├── OnboardingDotsIndicator.kt
├── OnBoardingScreenImage.kt
├── properties
├── OnBoardingProperties
├── state
├── OnBoardingState
├── OnBoardingModel.kt
├── OnBoardingScreen.kt
├── profile
├── profile_presentation
├── ProfileScreen.kt
├── User.kt
└── .gitignore
Unit Test:
To run the unit tests for repository go to the BlogRepositoryImpTest class under the test folder in blog_data module and run the tests. To run the unit tests for view model go to the BlogOverviewViewModelTest class under the test folder in blog_presentation module and run the tests.
End to End UI Test:
To run the end to end ui tests for the app go to the BlogOverviewE2ETest class under the androidTest folder in app module and run the tests.
Syed Ammar Sohail - [email protected]