Native SDKs for iOS, Android, and React Native. These are not JavaScript wrappers — they are native implementations using platform-standard database libraries (GRDB for Swift, Room/SQLiteOpenHelper for Kotlin). Each SDK embeds a full sync engine that handles registration, schema management, CDC-based change tracking, push/pull, conflict resolution, and snapshot recovery.
Layer 1 (Native): Swift wraps GRDB, Kotlin wraps Android SQLiteOpenHelper. Each contains a full sync engine — schema manager, change tracker, push/pull processors, HTTP client, and retry logic.
Layer 2 (React Native): A TurboModule bridge wraps both native SDKs. SQL strings go down, JSON rows come back up. React hooks provide reactive bindings on top.
All SDKs expose the same logical API. Method names and signatures are consistent across platforms, differing only in language idioms (async/await in Swift, suspend in Kotlin, Promise in TypeScript).
SQLite triggers automatically track all writes to synced tables. There is no special write API — standard SQL INSERT, UPDATE, and DELETE statements work. The CDC system intercepts changes transparently.
graph LR
A[client.execute] --> B[SQLite Write]
B --> C[CDC Trigger]
C --> D[_synchro_pending_changes]
D --> E[Push to Server]
E --> F[Server Accepts]
F --> G[Drain from Queue]
The server schema uses PostgreSQL types. Each column is assigned a logical type that determines how values are stored in SQLite and serialized over the wire.