Syncox Brings Fire-and-Forget Offline Sync to Kotlin Multiplatform
Mobile apps that block the UI on every network call feel broken the moment connectivity degrades. An outbox library that requires only an annotation and a data class removes the boilerplate that makes offline-first architecture too expensive for most teams to adopt.
Syncox implements the outbox pattern directly on the client, persisting every user action to a local SQLite database before the network call even begins. The UI updates instantly, and a background daemon handles retries with exponential backoff, erasing records only after a confirmed success.
Integration relies on KSP compile-time code generation. Developers define an action payload and annotate the existing suspend function with `@OfflineSync`; the library builds a reflection-free routing table so the engine can invoke the right endpoint automatically. ViewModel code collapses to a single `Syncox.enqueue()` call, with an optional `Flow` for observing pending sync counts.
The project targets Android and KMP (iOS, Desktop) and is designed to drop into existing Ktor or Retrofit stacks without refactoring network layers.
Client-side outbox implementations are common inside large apps like WeChat but rarely packaged as a standalone library, leaving smaller teams to reinvent retry queues and local persistence for every project.
Making the sync engine annotation-driven rather than requiring a base class or interface hierarchy keeps the network layer untouched, which lowers the risk of adopting the pattern in an existing codebase.
The library's design treats the network call as a pure function of a JSON string, which means the same engine can drive completely different API styles (REST, GraphQL, gRPC) as long as they can be wrapped in a suspend function.