Kmp-ddpclient — a Kotlin Multiplatform DDP client, now open source

I’ve open-sourced the DDP client we’ve been running in production for the last two years in our Android + iOS app.

Repo: GitHub - bordoio/kmp-ddpclient: Kotlin Multiplatform client for Meteor's DDP protocol — websocket connection management, subscriptions with an in-memory minimongo mirror, and method calls as coroutine Flows. · GitHub

Subscriptions feed a local minimongo mirror you observe as coroutine Flows, so collections stay in sync the way they do on the client. Method calls are Flows too, plus automatic reconnect and randomSeed id prediction that matches Meteor’s PRNG so you can do optimistic inserts. The mirror is swappable if you want to persist it instead of keeping it in memory. Android and iOS for now — no JVM target or Swift package yet.

It was originally written by hand with (when) no AI involved, I finally publish it thanks to AI.

Issues and PRs very welcome, especially from anyone using DDP from mobile.

3 Likes