Grab Jun 17, 2021

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

Critical Insight

Grab transformed their superapp into 1,000+ independent modules, with the payments division alone containing 200+ modules that build in under 15 seconds.

The article reveals specific trade-offs they encountered that might surprise teams considering this architecture.

About This Article

Problem

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.

Solution

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.

Impact

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.