How Mercari evolves its iOS codebase into a multi-product monorepo
Original post 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. The result? 900+ modules, 38.8MB binary size, and zero build time regression.
When Mercari decided to build their Global App, they faced a critical choice: create a new repository or evolve their existing one. After years of experimenting with separate repos for each product (React Native, Flutter, native iOS), they chose a radically different path. This deep dive explains their migration to a Bazel-powered monorepo that now houses both the Japan and Global apps.
Key Takeaways
- Migrated existing app repo to monorepo with 900+ modules using Bazel micro-modular architecture
- Categorized all modules into ready-to-reuse, needs-refactoring, and product-specific buckets
- Strict policy: never reuse feature-level components between products to avoid wrong abstractions
- Remote caching and build execution kept builds fast despite massive shared codebase
- Unexpected win: AI agents generate better code using shared modules as context
Mercari successfully evolved their iOS codebase into a multi-product monorepo that enables rapid new product development while maintaining build efficiency and code quality across 900+ modules.
Continue reading
This page summarizes “Evolving Mercari's iOS codebase into a multi-product monorepo” by Mercari, published Oct 24, 2025. All credit for the original work goes to the authors.