Duolingo + KMP: A Case Study in Developer Productivity
Article Summary
Duolingo ships weekly to 40M+ daily active users across 176 countries. Their secret weapon for speed? Kotlin Multiplatform.
John Rodriguez and Johnny Ye from Duolingo share how their team evolved from experimenting with React Native and Flutter to making KMP their go-to solution for cross-platform features. This is a candid look at what worked, what didn't, and how they got buy-in across iOS, Android, and backend teams.
Key Takeaways
- First KMP project (experiments library) never shipped but paid crucial explorer's tax
- Adventures took 9 months on Android, 5 months for KMP port, just 1.5 for web
- Math grading library: 1.5 months to build, 1 week each to backport iOS and Android
- Maker project went KMP first, delivered 180+ video variants as JSON instead of MP4s
- Performance on iOS matched native app despite heavy animation and frame-by-frame updates
Duolingo's KMP journey shows that initial projects take longer, but subsequent features ship 5-10x faster once the infrastructure and team knowledge are in place.
About This Article
Duolingo's iOS and Android teams built their core features separately. Experiments infrastructure, in particular, ended up looking different on each platform. This led to inconsistent behavior, missing functionality, and bugs that only showed up on one OS, forcing engineers to debug across two completely different codebases.
Rodriguez and Ye built KMP modules with clear boundaries. They put stable, business-logic-heavy code like experiment management and grading logic into shared modules. KTOR handled networking, OKIO handled file operations, and thin platform-specific interfaces wrapped authentication and user profile dependencies.
The video call KMP library cut websocket implementation time from 9 months on iOS down to 1 month in KMP, then 6 months for Android. The chess project showed what KMP-first development could do. Complex state management took 20 engineering months total across both platforms instead of being built twice.