▲ 35 r/KotlinMultiplatform+2 crossposts

I built offline-first sync for Android - Room stays yours, library handles outbox + push/pull.

I've been working on offline-first sync for Android apps that use Room.

Pattern: local write immediately → outbox queue → push/pull when online → handle conflicts if the same row changed on server.

Short demo (GIF): offline add → sync → wipe local DB → pull restores data.

Technical bits:

• Room stays the source of truth for entities

• Separate SQLDelight outbox (survives process death)

• KSP generates sync handlers from Entity/DAO

• Gradle plugin wires KSP + serialization

Stack is Kotlin 2.1, minSdk 24. Apache 2.0, sample + mock server in the repo.

Repo (if useful): https://github.com/Arsenoal/syncforge

Genuinely looking for architecture feedback:

  1. Would you trust a library-owned outbox next to Room, or keep everything in-app?
  2. What's the minimum you'd need before trying this in a non-toy app?

Happy to share Gradle setup in comments if anyone wants to poke at it.

u/Extra_Ninja_8101 — 1 day ago