Next Life is an application designed to help users find rental rooms based on criteria such as location, price, and amenities. The application adopts the MVVM (Model-View-ViewModel) architecture to ensure clean code organization, ease of maintenance, and efficient data handling from the backend to the user interface.
Min API Level Supported : 21
Before running the project check your gradle version matches the required.
package-name: com.fatherofapps.androidbase
compileSdkVersion = 21
targetSdkVersion = 33
minSdkVersion = 21
To ensure a smooth deployment process and a clear separation of concerns, the project is configured to support three distinct environments: Development, Staging, and Live. Below are the details for setting up each environment.
βββ dev/
βββ staging/
βββ live/
The Application is split into a three layer architecture inorder to provide clean separation of concerns - making the code easier to navigate and maintain.
- Data - Layer that holds APIs, Database, Cache
- Domain - Layer that holds Use Cases, and Model Objects. Business logic happens here.
- Application - Layer that holds presentation, Android components, Viewmodels, Dagger components/modules handles Dependency Injection, etc. MVVM exists at this layer.
The three layered architectural approach is majorly guided by clean architecture which provides a clear separation of concerns with its Abstraction Principle.
MVVM Implementation:
- Fragment (View): Displays the user interface and handles user interactions.
- ViewModel: Manages the stateful data, handles business logic, and communicates with the Repository.
- Repository: Acts as a mediator, aggregating data from both the RemoteService (API) and LocalService (Room Database).
- RemoteService: Uses Retrofit to call APIs and retrieve data from the backend.
- LocalService: Manages local data storage with Room Database.
- Users can filter and search for rental rooms by district, price range, and available amenities.
- Displays detailed information about each room, such as rental price, size, and contact information.
- Connects to the backend to provide the latest updates on available rooms.
- Support running ads for user posts.
- Offline Storage ( Scheduled repo remote controller syncing, App will sync with backend server in every 2hrs )
Following are the Libraries used:
- Material Design - Google material design UIs.
- Dagger2 - Dependency Injection lib with large community support.
- Retrofit - Network Http Client
- Jetpack
- Viewmodel - Channel between use cases and UI
- Data Binding - For binding of UI components in layouts to data sources, and coroutines support.
- Moshi - Data, Model & Entity JSON Parser that understands Kotlin non-nullable and default parameters
- okhttp-logging-interceptor - logs HTTP request and response data.
- Mockito - Mocking framework used in unit tests.
- kotlinx.coroutines - Library Support for coroutines, provides
runBlockingcoroutine builder used in tests - MockWebServer - web server for testing HTTP clients.
- Leak Canary - Leak Detection Library
- Espresso - Test framework to write UI Tests
- recyclerview-animators - Recycler View Animations
- Room Persistence Library - Robust database access while harnessing the full power of SQLite
- Robolectric - Android Unit Tests framework.
- Truth - Provides fluent assertions for Java and Android
- dependencies.gradle - Centralized versioning of gradle dependencies in a global file
- Version.properties - App version details
- Fonts
- Dimension & String Values
- Themes & Styles
- Network Config














