App Modularisation at Scale
Article Summary
Grab went from one monolithic mobile app to over 1,000 modules. Here's what they learned about scaling a superapp.
The Grab engineering team documented their multi-year journey breaking down a monolithic codebase that housed ride-hailing, food delivery, payments, and financial services. This is their blueprint for modularisation at scale.
Key Takeaways
- Implemented five-phase approach: base, shared library, feature, kit, and app modules
- 95% of modules now build in under 15 seconds with parallel compilation
- Modules convert to reusable SDKs across other Grab applications
- Kit modules act as interface bridges enabling clean inter-module communication
Grab transformed their superapp into 1,000+ independent modules, with the payments division alone containing 200+ modules that build in under 15 seconds.
About This Article
Grab's monolithic codebase made scaling difficult. Code conflicts piled up because everything was tightly coupled, development slowed down, releases took longer, and teams struggled to work together.
Grab set up dependency injection using an app module hub that organized code into five layers: base/core, shared library, feature, kit, and app. This gave teams clear ownership and let them work independently.
Build times improved significantly because Gradle could compile only the modules that changed in parallel. The payments division got 95% of its modules building in under 15 seconds, which reduced infrastructure strain.