Stabilize, Modularize, Modernize: Scaling Slack’s Mobile Codebases
Slack chose to refactor its iOS and Android codebases in place through Project Duplo, a cross-platform effort in three phases: Stabilization, Modularization and Modernization. A full rewrite and shared cross-platform code (React Native, Flutter, C++, Kotlin Multiplatform) were rejected because of risk, performance and tooling costs. The six-month Stabilization phase used a dedicated core team to finish stalled migrations. On iOS that meant porting about 80,000 lines of Objective-C to Swift and fully adopting internal data-access and networking libraries. On Android it meant splitting the monolithic SlackApi and database interfaces, moving queries to SQLDelight, standardizing on the repository pattern and removing Otto bus events.
Related posts
- Scaling Slack’s Mobile Codebases: Modernization
Slack Engineering mediumAdeptSlack's year-and-a-half Duplo initiative concluded by modernizing its iOS and Android codebases: iOS moved to a custom VIPER-style feature architecture, stricter SwiftLint rules banning singletons and NotificationCenter, Combine (via CombineX until iOS 12 was dropped), and broader SlackKit adoption, while Android replaced Gson with Moshi, Android Priority Job Queue with WorkManager, and handwritten API calls with an internal Retrofit-based library, and introduced coroutines and Compose incrementally. iOS ended 68% modernized and 81% modularized with CI stability rising from 77% to 90% and average time-to-merge down 64%, Android reached 92% modularization, and local builds later dropped nearly 50% with Bazel and M1 Macs. Follow-up work includes layered module dependency rules to stop circular dependencies, possibly adopting Needle for dependency injection, and splitting Android modules into API/implementation pairs for build parallelism.
- Scaling Slack’s Mobile Codebases: Modularization
Slack Engineering mediumAdeptSlack split its monolithic iOS and Android app targets into owned Feature, Service and Library modules with strict linking rules, such as interface/implementation pairs on iOS, to cut build times, untangle dependencies and clarify code ownership. On iOS, adopting Bazel made module creation easy, eliminated project-file merge conflicts, enabled static linking that improved pre-main launch time, and powered code generation for modules, CoreData models and feature flags. On Android, Slack abandoned a per-module Dagger 'graph of graphs' in favor of Square's Anvil, cut KAPT usage by moving to KSP, Moshi and Kotlin data classes, and enabled Gradle configuration caching, saving 20-45s on builds after configuration changes.
- How we rebuilt the Shopify app in 12 weeks
Shopify Engineering mediumAdeptThirty engineers rebuilt the 300+ screen Shopify mobile app from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code. The key work was building a system around the agents: a shared Reflex architecture for iOS and Android that lets ViewModels run headless from a CLI in milliseconds, CI checks that fail on cross-platform drift, and Helix verifying small checkpoints against the legacy app, which served as the spec instead of written documents. As code generation got faster, the bottlenecks moved to laptops, code review, merging and coordination. Shopify answered with remote dev environments, agent-first adversarial review on small dual-platform PRs, a daily loop that turns review comments into rules, agent-driven merge queues, and pod ownership by product area. Launch time dropped about 50% on Android and 14% on iOS, and the Android binary shrank by 40%.
- The evolution of Facebook’s iOS app architecture
Meta Engineering mediumAdeptFacebook's iOS app grew over ten years into a C++/Objective-C++/Swift codebase built around in-house abstractions, dynamically loaded libraries, and Buck-driven code generation. Mutable Core Data models and MVC's bidirectional data flow led to the React-inspired ComponentKit, which brought a 50% performance gain. Startup times of nearly 30 seconds drove product code into lazily loaded dylibs, whose runtime failures were later turned into build-time errors by a plugin system generated from Buck dependency-graph queries. The recurring tradeoff is user experience and reliability against idiomatic iOS development, with the Swift-era language guidance of keeping C++ out of product-facing APIs giving developer efficiency more weight.
- Kotlin Multiplatform in Production: Two Real-World Use Cases from Booking.com
Booking.com Engineering mediumAdeptBooking.com applied Kotlin Multiplatform in two production cases: a shared experimentation library replacing drifting Java/Kotlin and Objective-C implementations, and a Compose Multiplatform (Kotlin/JS) web playground that renders the real Android BUI design-system components in a browser. The experimentation library ships as a Gradle dependency on Android and an XCFramework via CocoaPods on iOS, and was validated by running old and new implementations side by side behind experiment flags. During that parallel phase iOS saw roughly +140 ms p90 startup and +2.5 MB download size, but startup improved once the legacy code was removed, which shows migration-time performance data can mislead. iOS engineers were brought on board through an evaluation framework with an explicit exit ramp, and some later became contributors, though Xcode's lack of Kotlin support remains a tooling gap.