-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture & Tech choices
Fabrice Rakotonarivo edited this page Apr 18, 2025
·
7 revisions
The application is developed using a modular architecture that follows the Android Architecture Components principles. This structure ensures the scalability of the app when new features need to be added.
The implemented modules are:
- App module: the main entry point of the application. It also contains the Splash and SignIn/SignUp screens.
- One module per Dynamic Feature, such as:
- Dashboard: the news feed where all transactions from the user’s friends (and the user) appear.
- SearchFriends: the feature for finding friends.
- MyFriends: the feature to browse your friend list and view detailed one-to-one transaction history.
- MyProfile: the user’s profile feature.
- NewPost: the feature to create and share new posts.
- CoreUI module: contains shared Compose Views, resources, and utilities used across feature modules.
All UI modules follow the MVVM design pattern, with ViewModels exposing state objects. All screens are implemented using Jetpack Compose. All Features contain one Activity accessible from the other Features. The Navigation inside each feature (module) is made with the Compose Navigation.
Additional layers include:
- Domain module, containing:
- Repository interfaces
- Model Entities
- Note : Choice was made not to implement UseCases and to call the Repositories directly from the ViewModels. Indeed, introducing UseCases would add unnecessary complexity and boilerplate in a context where the features are relatively simple.
- Data module, containing:
- Request interfaces
- Repository implementations
- Api module: introduced to separate networking logic from the rest of the data layer. It includes:
- The HTTP client and API services
- API request implementations
- Database module: separates local persistence logic (implemented with Room) from the rest of the data layer.
- Tracking module: allows integration of third-party libraries for analytics and user tracking. The goal is to monitor feature usage and leverage this data to make meaningful decisions about future app evolution. All Presentation modules implement the Tracking module.
The application is built using the following libraries:
- Kotlin as the language for all layers
- Jetpack Compose for the UI and ViewModel for the UI-related data storage and logic handle
- Material3 and AndroidX for design components, views, icons, and lifecycle management
- Coroutines and Flow to handle the data flow from the data-api-database modules to the ViewModels and UI subscriptions
- Compose Navigation for all navigation between Compose Screens inside a Feature
- Flow (StateFlow and SharedFlow) to expose states and events from ViewModels to screens
- Coil for image loading
- Koin for dependency injection
- SquareUp Retrofit & OkHttp3 & Moshi for remote API calls and JSON parsing
- Room for local database implementation
- JUnit, Mockito, Koin-Test, and Espresso for testing