Chirp Messaging Client
A synchronized, real-time messaging application targeting Android, iOS, and Desktop with 100% shared business logic.
The Overview
Chirp is a cross-platform messaging app built entirely in Kotlin. It uses Kotlin Multiplatform (KMP) for shared state management and Compose Multiplatform (CMP) for unified UI rendering across Android, iOS, and Desktop.
The Challenge
Building a messaging app means juggling asynchronous data flows, unstable network connections, and consistent UX across three operating systems.
The engineering goal was to share as much code as possible without losing native performance. That meant standardizing the WebSocket layer, local SQLite persistence (offline-first), and UI components from a single codebase, while still respecting platform-specific APIs for notifications and file systems.
Architecture & Technical Decisions
Chirp is built on a multi-module Clean Architecture. State flows downward and events propagate upward through a strict Unidirectional Data Flow (UDF).
Modules are split into clear layers (feature:auth, feature:chat), keeping domain logic isolated from the UI. Messages are cached locally via Room/SQLite, so the app stays usable through network dropouts and queues outgoing messages in the background until the connection returns. The backend is a Spring Boot service exposing REST endpoints and WebSocket streams, with WebSockets handling live message delivery so there's no polling overhead. Koin provides the multiplatform dependencies to Android, iOS, and desktop targets.
Platform consistency
For UI, I used Compose Multiplatform (CMP). Dynamic typography and RTL support (Arabic/English) are handled through expect/actual bindings connected to a shared design system module.
Impact & Results
- 100% business-logic code sharing across Android, iOS, and Desktop via KMP.
- WebSocket-based delivery (no polling), which cut backend payload and latency.
- Offline-first storage with automatic background sync once the connection returns.