GSoC'24 Final Report - The Mifos Initiative | Functional Enhancements to Mobile Wallet for G2P Use Cases
Mobile Wallet is an Android-based framework for mobile wallets based on top of Fineract. The app follows clean architecture and contains a core library module that can be used as a dependency in any other wallet based project. It is developed at MIFOS together with a global community.
In the period leading up to the official GSoC program, I immersed myself deeply in the Mifos Wallet project, demonstrating a proactive approach to open-source contribution. My involvement was multifaceted and impactful:
-
Issue Resolution: I took the initiative to thoroughly examine the GitHub repository, identifying and addressing documented issues. My efforts resulted in the successful resolution of several existing bugs within the project's codebase, contributing to improved stability and functionality.
-
UI Modernization: A significant achievement during this phase was the successful migration of three screens to Jetpack Compose. This early adoption of modern Android UI development practices showcased my technical skills and forward-thinking approach.
-
Bug Fixing: In addition to the UI migrations, I successfully diagnosed and resolved a critical bug, further enhancing the app's reliability.
-
Community Engagement: Recognizing the importance of fostering a supportive open-source community, I took on a mentorship role and gave some pr reviews too. I provided guidance and support to newcomers, helping them navigate their first contributions to open-source projects. This experience not only helped others but also deepened my understanding of the project and improved my communication skills.
-
Project Familiarization: Through these consistent contributions, I gained an in-depth understanding of the Mifos Wallet project's architecture, coding standards, and development processes. This hands-on experience proved invaluable, providing me with a solid foundation for the upcoming GSoC period.
-
We successfully migrated the entire user interface of the Mobile Wallet application to Jetpack Compose, Google's modern, declarative UI toolkit for Android. This migration involved rewriting several key screens and components in Jetpack Compose, such as 'CardsFragment', 'KYCDescriptionFragment', 'SIFragment', and various others. The move to Jetpack Compose has resulted in a more performant and responsive application, with a more streamlined and maintainable codebase. Jetpack Compose enabled us building complex UIs with less code and more powerful tools like previews, making development faster and more efficient. It also allows for better integration with Kotlin, bringing a more cohesive development experience.
-
Performance Improvements: Jetpack Compose eliminates many performance pitfalls associated with traditional XML-based Android views, such as deep view hierarchies and frequent invalidations. The migrated UI components are now more performant due to Compose's efficient rendering system.
-
Better Developer Experience: Developers can now utilize Compose's intuitive Kotlin-based syntax, which greatly reduces boilerplate code. The live previews in Android Studio have made it easier to iterate on UI changes without needing to rebuild the entire app.
I have implemented them in the below PRs:
-
1. PR #1562: Migrated CardsFragment from XML to Jetpack Compose.
2. PR #1565: Migrated KYCDescriptionFragment to Jetpack Compose.
3. PR #1570: Migrated SIFragment to Jetpack Compose.
4. PR #1589: Migrated KycLevel1 to Jetpack Compose.
5. PR #1606: Refactored and migrated KYCLevel2 to Jetpack Compose.
6. PR #1611: Migrated KycLevel3 fragment to Jetpack Compose.
7. PR #1618: Migrated ReceiptActivity to Jetpack Compose.
8. PR #1630: Migrated MakeTransferFragment to Jetpack Compose.
9. PR #1634: Migrated SearchActivity to Jetpack Compose.
10. PR #1648: Migrated setUpUpi fragments to compose screen.
11. PR #1677: Migrate MerchantTransferActivity to Compose
12. PR #1678: Read qr activity migration compose
-
Separation of Concerns: The codebase was reorganized to distinctly separate concerns, such as UI, business logic, and data management. This restructuring enhances maintainability by allowing developers to easily locate and modify code specific to a particular feature or layer of the application. Each module now has its distinct folder structure, preventing tight coupling between different layers of the application.
-
Modular Design: Implemented a modular design by segmenting the codebase into feature-based modules. This modular approach supports independent feature development, easier testing, and the ability to independently deploy and scale parts of the application as needed. This design also reduces build times and enhances code reusability.
-
Improved Dependency Management: The restructuring also included a better management of dependencies. Each module now only includes the dependencies it needs, reducing the risk of conflicts and promoting a more stable application environment. The transition to a feature module structure further isolates dependencies and reduces the chances of version conflicts.
-
Future Extensibility: The newly adopted package structure lays a strong foundation for future extensibility. Adding new features or integrating additional services has become more straightforward, promoting faster development cycles and quicker time-to-market for new functionalities.
This is our new package structure for features:
mobilewallet/
|-- feature/
|-- accounts/
|-- auth/
|-- editpassword/
|-- faq/
and so on...
I have implemented them in the below PRs:
-
1.PR #1654: Move editpassword to feature module
2.PR #1655: moved notification to feature module
3.PR #1658: Move receipt to feature module
4.PR #1659: moved kyc to feature module
5.PR #1660: moved savedcards to feature module
6.PR #1662: Moved history to feature module
7.PR #1663: moved invoice to feature module
8.PR #1664: moved profile and editprofile to feature module
9PR #1665: moved settings to feature module
10.PR #1668: Move finance to feature module
11.PR #1669: Move Merchants to feature module
12.PR #1670: Moved Accounts to feature module
13.PR #1671: Moved standingInstruction to feature module
14.PR #1672: Moved payments to feature module
15.PR #1674: Moved ReadQr and home to feature module
-
This lead to following advantages:
Easier maintenance and bug fixing. Improved code readability, leading to faster onboarding of new developers. Reduced likelihood of introducing new bugs when making changes. Better performance and resource utilization. Easier addition of new features in the future.
- Code Readability
The refactoring process has significantly improved the readability and maintainability of the codebase, making it easier for the development team to understand and work with the code by doing following things:
Removed dead code and unused resources.
Simplified complex methods by breaking them down into smaller, more focused functions.
Standardized coding style and enforced consistency across the codebase.
Improved variable and function naming for better clarity.
Eliminated code duplication by extracting common functionality into shared utilities.
Updated deprecated code usage to modern alternatives.
Enhanced error handling and logging for better debugging.
Improved code documentation and adding inline comments for complex logic.
-
Technical Debt Reduction
By addressing technical debt and improving code quality, we laid the groundwork for a more sustainable and scalable application in the long run.
-
1.PR #1684: Removed unused imports from MifosNavHost
2.PR #1680: Cleaned settings package
3.PR #1681: Cleaned profile and editprofile package
4.PR #1682: Refactor: SavedCards Package Cleanup
5.PR #1683: Refactor: Receipt Package Cleanup
6.PR #1688: Invoice package cleaned
7.PR #1689: Kyc package cleanup
8.PR #1690: refactor: newsi to compose
9.PR #1694: Refactor: Home Package Cleanup
10.PR #1695: cleaned bank package
11.PR #1696: cleaned finance package
12.PR #1701: refactor: Standing Instructions cleanup
Easier maintenance and bug fixing.
Improved code readability, leading to faster onboarding of new developers.
Reduced likelihood of introducing new bugs when making changes.
Better performance and resource utilization.
Easier addition of new features in the future.
We have streamlined the navigation system, making it more intuitive and user-friendly. This includes reducing the number of nested screens and simplifying the overall information architecture. we have made significant improvements to the app's navigation system, focusing on simplification, user-friendliness, and overall performance. This upgrade encompasses several key aspects:
-
Navigation Simplification: Streamlined the navigation flow, making it more intuitive for users. Reduced the number of nested screens, creating a flatter, more accessible hierarchy. Simplified the overall information architecture, improving user orientation within the app.
-
Improved Navigation Logic: Implemented type-safe argument passing between destinations, reducing the likelihood of runtime errors. Enhanced deep linking capabilities, allowing for more direct access to specific app sections from external sources. Laid the groundwork for a single-activity architecture, which can improve app performance and simplify the overall structure.
-
Seamless Transitions: Introduced smooth and visually appealing transitions between screens. Enhanced the overall user experience by creating a more polished and professional look and feel. Implemented consistent animation patterns throughout the app for a cohesive navigation experience. We have implemented smooth and seamless transitions between screens, enhancing the overall user experience and creating a more polished and professional-looking application.
-
These are some of the PRs I implemented related to Navigation System Upgrade:
-
1.PR #1703: Refactor: Use compose Nav in faq
2.PR #1704: Refactor: Use compose Nav in InvoiceDetail
3.PR #1705: Refactor: Use compose Nav in ReadQR
4.PR #1706: Refactor: Use compose Nav in SpecificTransactions
5.PR #1707: Refactor: Use compose Nav in ReceiptScreen
6.PR #1708: Fix edit profile nav compose
7.PR #1709: Refactor : Use Compose nav in accounts and setupUpi
8.PR #1710: Refactor : Add Compose Nav in auth feature
-
Addressing crashes, bugs, and making general improvements is crucial for maintaining a high-quality application. This process typically involved:
Reproducing reported issues in a controlled environment.
Using debugging tools to identify the root causes of crashes and bugs.
Implementing fixes while ensuring no regression in other parts of the app.
Enhancing error handling and providing more informative error messages to users.
Improving app stability across different devices and Android versions.
Addressing edge cases and unusual user scenarios that may lead to unexpected behavior.
-
These are some of the PRs I implemented :
1.PR #1713: Fixing crashes on clicking bank acc details and editprofile
2.PR #1714: Fix : Error screen and added previewparameters
3.PR #1739: Fix gradle build error due to cardscreen
4.PR #1648: setUpUpi fragments to compose screen fix
5.PR #1564: Fixed a crash related to the EditProfile button.
6.PR #1626: Fixed an issue where the app was crashing when clicking on the EditProfile button.
7.PR #1625 : Add PermissionBox to EditProfile
8.PR #1648: Fixed a issue related to setting up UPI fragments for composing the screen.
-
The impact of these fixes and improvements includes:
Easier maintenance and future development
-
Setting up a multiplatform project using Compose Multiplatform (CMP) is a forward-thinking approach that brought significant benefits to our wallet app:
Code sharing between platforms (Android, iOS, desktop, web) reduces duplication and inconsistencies. Faster development of features across multiple platforms. Unified business and UI logic in a single, shared codebase. Ability to use platform-specific UI frameworks for optimal user experience on each platform. Gradual adoption possibility, allowing incremental migration to a multiplatform architecture.
-
The setup process involved:
Configuring the project structure to support multiple platforms. Setting up shared modules for common code. Implementing expect/actual declarations for platform-specific implementations. Configuring build systems (Gradle for Android/JVM, Xcode for iOS) to work with the multiplatform project.
-
These are some of the PRs I implemented :
1.PR #1716: Implement Desktop app setup for ComposeMultiplatform
2.PR #1749: Initial koin setup for dependency injection
The work accomplished during this GSoC project has had a significant impact on the Mobile Wallet application:
-
Enhanced User Experience: The migration to Jetpack Compose has resulted in a more modern, responsive UI. Improved navigation system has made the app more intuitive and easier to use. Faster performance and reduced crashes have increased overall app's readiness for playstore deployment.
-
Code Quality and Maintainability: Package restructuring and code cleanup have made the codebase more organized and easier to maintain. Reduced technical debt will allow for faster feature development in the future. Improved code modularity enhances the ability to test and update individual components.
-
Developer Productivity: The new architecture and use of modern tools like Jetpack Compose speed up development processes. Better organized codebase reduces onboarding time for new contributors. Simplified navigation logic makes it easier to add new screens and features.
-
Cross-platform Potential: The multiplatform setup lays the groundwork for expanding the app to other platforms. Shared business logic will ensure consistency across different versions of the app.
-
Community Engagement: The substantial improvements may attract more contributors to the project. Demonstrating the ability to modernize and improve the codebase can increase confidence in the project's longevity.
-
Performance Metrics: Potential improvements in app size, startup time, and overall responsiveness. Reduced number of crashes and ANRs (Application Not Responding) incidents.
While significant progress has been made, there are always opportunities for further improvement:
-
Jetpack Compose: Further optimize Compose UI for better performance.
-
Enhance Multiplatform Support: Extend the shared codebase to cover more functionality. Develop and release versions for iOS, desktop, or web platforms.
-
Implement Advanced Features: Add biometric authentication for improved security. Integrate with more financial services and APIs. Implement offline mode for basic functionality without internet connection.
-
Improve Testing: Increase unit test coverage across the codebase. Implement more comprehensive UI tests using Compose testing tools. Set up automated end-to-end testing for critical user flows.
-
Performance Optimization: Conduct thorough performance profiling to identify and address any remaining bottlenecks. Optimize database queries and data caching strategies.
-
Accessibility Enhancements: Ensure the app is fully accessible, including support for screen readers and other assistive technologies. Implement a high-contrast theme for users with visual impairments.
-
Documentation and Knowledge Sharing: Create comprehensive documentation for the new architecture and navigation system. Develop a style guide for Jetpack Compose UI development within the project.
-
Play Store Deployment: Deploy app on playstore so that user can use it directly.
-
User Feedback Loop: Implement in-app feedback mechanisms to gather user suggestions and bug reports. Set up a beta testing program for early access to new features.
-
This GSoC project has been a transformative journey for both the Mobile Wallet application and myself as a developer. The migration to Jetpack Compose, coupled with significant architectural improvements, has positioned the app for future growth and success.
-
Personally, this project has been an incredible learning experience. It has deepened my understanding of Android development best practices, modern UI frameworks, and the challenges of maintaining and upgrading a complex open-source application. The skills and knowledge gained during this period will undoubtedly prove valuable in my future endeavors as a software developer. I'm grateful for the opportunity to contribute to The Mifos Initiative and work alongside talented mentors and community members. Their guidance and support were instrumental in the success of this project. Moving forward, I'm excited about the potential for further improvements to the Mobile Wallet app and look forward to seeing how it continues to evolve and serve its users. I hope to remain involved with the project and the open-source community, contributing to its ongoing development and success. This GSoC experience has reinforced my passion for open-source development and its power to create meaningful, accessible technology for users worldwide. It's been a rewarding journey of growth, collaboration, and impactful contribution to a project that makes a difference in people's lives.