Skip to content
pubscout

serverpod_offline_sync

0.0.12, released 2 weeks ago by serverpod.dev

Offline-first sync engine for Serverpod using Conflict-free Replicated Data Types.

$ flutter pub add serverpod_offline_sync
Source repository

What it does

Turns an ordinary Serverpod backend into an offline-first, collaborative system using delta-CRDTs. It automatically handles data synchronization between client and server databases while maintaining relational integrity and unique constraints.

AI-written summary of version 0.0.12, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Serverpod application that needs to work fully offline.
  • You want automatic conflict resolution and space-based data sharing without writing custom merge logic.

Skip it when

  • You are not using Serverpod as your backend.
  • Your project cannot adhere to the package's specific data modeling limitations and reserved values.

Strengths

  • Runs the exact same CRDT merge code on both client SQLite and server Postgres.
  • Preserves foreign-key actions and relational integrity automatically during merges.
  • Provides both one-shot sync and continuous real-time streaming sync.

Weaknesses

  • Imposes strict data modeling limitations and reserved values on database schemas.
  • Tight coupling to the Serverpod ecosystem.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
5

Requires adding client and server packages, configuring the offline_sync module in generator.yaml, and enabling experimental database sync.

final session = await client.createSyncSession(databasePath);
await client.offlineSync.syncOnce(session);

Works with

Packages commonly used together with serverpod_offline_sync: ones it builds on, ones built on it, and its own family.