It's an app built using the MVVM, Repository pattern and Clean Architecture with JetPack Compose for UI Presentation,that show user registration.
- Separation of Concerns: The app is built using Uncle Bob's clean architecture (see architecture below)
- Reusable feature modules: Modern feature module design pattern is used so that in future the same module is used other apps also.
- Scalable navigation architecture: Feature modules are independent of app-level implementation detail. Navigation architecture can be changed at anhy time without effecting the features
The app is built with scalability in mind. to maintain the separation of concerns, Clean Architecture by Robert C. Martin, is used. The diagram below shows how the clean architecture is mapped to this android application.
The design pattern for this app is a Unidirectional data flow (UDF) where state flows down and events flow up. Flow of control is one directional only. Any inner layer doesn't know about any layer outside of it. If an inner layer needs to communicate to an outer layer, it is done via Dependency Inversion. To maintain this separation over the course of time, separate android/kotlin modules can be used for each layer for bigger features.
The app has mainly following modules
- Domain - module provides a bridge between data layer and UI layer.Domain layer is Platform independent. It gets the data from remote or local datasource to UI layer.
- Network - module is responsible for getting data from remote datasource and provide it to Domain layer.
It will contain the general methods and classes that will need in all our feature modules and app module like theming,components,utility functions.
- Sign - contains the login and registration of rider and user. Feature modules are unaware of each other. Hence, they can be used independently in any app
The feature modules are unaware of the app-level navigation. App controls the navigation between each module. Currently, it uses Jetpack Navigation. But this can be changed at any time without affecting any feature module.
This is implemented as per Google's recommendation for multi-module navigation. This allows us to have an independent navigation architecture in each feature module.
- UI Design - Compose UI
- AndroidX - Fragments, ViewModel
- KotlinX - Coroutines, Flow, SharedFlow, Serialization
- Hilt - Dependency Injection
- Navigation Component - User navigation
- Retrofit - API Calls
- DataStore - Cache token using Preference Datastore and users data using Proto DataStore
These are the enhancements that are important but were left because of time constraints:
- Testing Strategy (testing using JUnit4,Mockk,Google Truth,Turbine libraries).
- Google place api for pickup and dropoff location. Also get user location using Camera Center of google map
- Google map implementation.
- Payment api implementation.
- send driver location to server using Workmanager
- Push Notification
- Implement Room database behind the
LocalDataSource
for real caching. - Implement a cache strategy to refresh the cache data at regular intervals