Evolving Mercari's iOS codebase into a multi-product monorepo
Article Summary
Shingt from Mercari reveals how they transformed a single-product iOS codebase into a monorepo supporting multiple apps—without halting work for 50+ active engineers. The result? A 38.8MB binary despite 900+ modules.
Mercari evolved from building each iOS app in separate repos with different tech stacks (native, React Native, Flutter) to a unified monorepo approach. For their new Global App, they restructured their existing Mercari Japan repository using Bazel to support multiple products while maintaining the foundation that powers their marketplace.
Key Takeaways
- Monorepo now contains 900+ modules shared between products using Bazel micro-modular architecture
- Global App ships at 38.8MB despite massive shared codebase through strict dependency management
- Migration happened gradually while 50+ engineers continued daily development without disruption
- Strict policy: feature components never shared between products to avoid wrong abstractions
- Unexpected AI benefit: shared modules help AI agents generate more consistent code
Critical Insight
Mercari successfully migrated their iOS codebase to a multi-product monorepo, enabling rapid Global App development while maintaining build efficiency and code quality across 900+ modules.