One Codebase, Three Platforms: X's Experience with Kotlin Multiplatform
Article Summary
X (Twitter) rebuilt their encrypted DMs for millions of users with a team of just 5 Android engineers. Their secret? Kotlin Multiplatform.
Engineers from X share their real-world experience adopting KMP to rebuild direct messages as an end-to-end encrypted feature across Android, iOS, and Web. They moved from Circuit to Decompose while keeping native UI on each platform.
Key Takeaways
- Shared encryption logic, database layer, and business logic across three platforms
- Unified logging and SQLite database made debugging consistent across platforms
- Switched from Circuit to Decompose to share business logic beyond Android
- Web required custom SQLite driver to persist encrypted messages across tabs
- Swift and JavaScript interop still has rough edges for small teams
Critical Insight
KMP enabled a tiny team to ship encrypted messaging faster by writing core logic once, fixing bugs once, and maintaining consistent behavior across platforms.