Inside Reddit’s Mobile Engineering Modernization: Lessons from a Massive Mobile Codebase Overhaul
Reddit’s mobile applications—both iOS and Android—are often taken for granted as simple Reddit feeds, but the reality is far more complex. Behind the scenes, Reddit’s mobile engineering teams manage millions of lines of code, hundreds of screens, and an intricate web of modules and infrastructure that power the app experience for tens of millions of users worldwide.
In a recent deep dive discussion with Reddit’s mobile platform team members Lauren Darcy, Brandon Kobalinsky, and Eric, we get a rare glimpse into the scale, challenges, and modernization journey of Reddit’s native mobile apps. Here’s what we learned about building and evolving one of the largest native mobile codebases, and how Reddit’s mobile teams have transformed their development experience and user experience through thoughtful modernization.
The Immense Scale of Reddit’s Mobile Codebases
- Lines of Code & Modules: Both Android and iOS codebases contain approximately 2.5 million lines of code each, with Android having around 800 modules.
- Screens: The Android app alone contains roughly 580 distinct screens, far more than the typical feed and post detail screens many users imagine.
- Team Size: To maintain such large and complex apps, Reddit employs about 200 mobile engineers spread across roughly 20 feature teams. In addition, dedicated platform teams of around 10-11 engineers each on Android and iOS support these feature teams by focusing on platform-level improvements.
Build Times and Developer Experience (DevX)
- Build Times: Clean builds on Android take about 8-9 minutes with heavy use of remote build caching. Incremental builds are much faster, often under a minute for small targets. On iOS, full builds can take up to 30 minutes, which prompted the team to encourage focusing on smaller targets to improve productivity.
- Developer Support: Platform teams emphasize improving developer experience by reducing build times, providing tooling, and setting “golden paths” or recommended workflows to help feature teams ship faster and with less frustration.
Testing Strategy and Its Evolution
- Growth in Testing: A few years ago, Reddit’s mobile apps had almost no test coverage (~2%). Today, they maintain a balanced pyramid of unit tests, integration tests, and end-to-end tests, including accessibility assertions and memory leak detection.
- Challenges: Introducing tests was difficult due to legacy code, slow builds, and flaky tests written by engineers new to testing. However, the team invested heavily in test infrastructure and culture, including enforcing test coverage ratchets.
- Benefits: Improved test coverage dramatically reduced production incidents, decreased manual QA bottlenecks, and increased confidence in shipping changes. The team sees this investment as critical despite the maintenance overhead.
The 2021 Mobile Modernization: Why and How
- Context: Around 2021, Reddit’s growth and international expansion pushed mobile usage to the forefront. The engineering org doubled down on mobile by tripling the number of mobile engineers and establishing dedicated platform teams.
- Pain Points: At that time, build times were painfully long (up to 2.5 hours on CI!), onboarding was difficult, and app performance and stability metrics were poor.
- Core Stack Initiative: Reddit launched “Corestack,” a comprehensive modernization that included:
- Moving to a monorepo per platform, modularized by feature.
- Adopting modern languages (Kotlin on Android, Swift on iOS).
- Transitioning from REST APIs to GraphQL for better type safety and flexibility.
- Shifting architecture from MVP (Model-View-Presenter) to MVVM (Model-View-ViewModel) to better support reactive UI frameworks.
- Introducing a new design system to reduce UI inconsistencies and duplicated components.
Architectural Choices: MVVM, Compose, and SliceKit
- Android: Adopted Jetpack Compose, a reactive UI framework, even while it was still in alpha. This allowed building new features with modern patterns and improved testability.
- iOS: Initially built an internal UI framework called SliceKit layered on top of UIKit collection views to handle dynamic and accessible UI components. SwiftUI was considered too immature in 2021 but is now being incrementally adopted to eventually replace SliceKit.
- Why MVVM?: Compose’s reactive nature made imperative MVP architecture unsuitable. MVVM better fits reactive UI patterns by separating UI logic and state management.
The GraphQL Migration: A Painful but Worthwhile Transition
- Moving from REST to GraphQL was a multi-year effort involving close collaboration between backend and mobile teams.
- Early GraphQL implementations had latency issues and initially mirrored REST endpoints 1:1, losing some GraphQL benefits like efficient data fetching.
- Despite initial setbacks, the transition enabled stronger API contracts, reduced client-side logic complexity, and improved maintainability.
- The centralized GraphQL layer allowed for better tooling, code generation, and clearer observability.
Server-Driven UI: Experiments and Learnings
- Reddit experimented with server-driven UI to offload UI logic to backend configurations.
- Some limited use cases worked well, such as the content reporting flow, where UI complexity was low.
- However, attempts to implement server-driven UI in critical areas like the feed introduced complexity, double-fetching, bugs, and poor user experience.
- The team concluded that server-driven UI is promising but requires mature infrastructure, versioning, and cross-team alignment to succeed.
- They remain open to exploring it further, especially leveraging modern declarative UI frameworks like Compose and SwiftUI.
Impact of Modernization on Developer and User Experience
- Developer Experience: Developer satisfaction has improved significantly, with easier onboarding, faster builds, and standardized tooling and architecture.
- User Experience: Stability and performance metrics, including crash rates and app startup times, have improved noticeably.
- Productivity Gains: Feature teams deliver faster and with fewer engineers compared to the past.
- Observability and Support: Better tooling and modularization allow platform teams to diagnose and fix issues more efficiently.
What Reddit Looks for in Mobile Platform Engineers
- Strong ownership mentality: Platform engineers must "sit in the consequences" of their decisions and maintain systems long-term.
- Experience across multiple domains: Build systems, UI performance, testing, and backend integration.
- Desire to serve and support other engineers rather than just design in isolation.
- Practical problem-solving skills and a focus on developer productivity.
- Many platform team members come from internal transfers who were feature team leaders or contributors frustrated with existing pain points.
- Startups provide a good learning ground to develop skills required for platform roles.
Future Directions and Philosophy
- Reddit sees platform work as a service role aimed at eliminating developer friction to allow more focus on creativity and features.
- They advocate for continuous improvement and flexibility, knowing that technology choices and architecture will evolve over time.
- They emphasize psychological safety for platform teams to experiment, fail, and learn.
- The ongoing transition to SwiftUI and further improvements in testing, automation, and observability are key areas of focus.
Final Thoughts
Reddit’s mobile modernization journey is a compelling case study in managing complexity at scale. It highlights the importance of:
- Investing in developer experience as a foundational pillar.
- Making thoughtful architectural choices aligned with modern frameworks.
- Collaborating closely across frontend, backend, and platform teams.
- Embracing change and iteration rather than seeking one-time silver bullets.
- Prioritizing service to internal users (developers) to ultimately deliver better experiences for end users.
For mobile engineers and leaders facing similar scaling challenges, Reddit’s story offers valuable insights on balancing innovation, stability, and developer happiness in large-scale mobile app development.
If you want to dive deeper, check out Reddit’s engineering blogs and consider listening to the full podcast episode featuring Lauren Darcy, Brandon Kobalinsky, and Eric, linked in the show notes.
Author’s Note: This overview is based on an in-depth conversation with Reddit’s mobile platform team, shedding light on the real-world challenges and triumphs behind one of the world’s most widely used mobile apps.