r/FlutterDev • u/Heavy-Drummer-420 • Oct 15 '26
Plugin I built an open-source sync engine for offline-first Flutter apps . looking for feedback
Hey everyone! š
I've been working on SyncForge, an open-source synchronization toolkit for Dart and Flutter, and I'd love to get feedback from other developers here.
One of the challenges with offline-first apps is handling what happens when users make changes without a connection, multiple devices edit the same data, or an app needs to recover queued writes after restarting.
SyncForge is my attempt to make that synchronization layer modular and reusable instead of rebuilding it for every project.
The project consists of three packages:
- "sync_engine" ā A pure-Dart core with vector clocks, CRDT primitives, conflict-resolution strategies, and a retryable outbox.
- "sync_engine_drift" ā Persistent storage using Drift/SQLite, including outbox durability and tombstone tracking.
- "sync_engine_generator" ā Code generation for strongly typed synchronization adapters using "build_runner".
The architecture is designed around pluggable storage and transport, with retry backoff, jitter, and dead-letter handling.
š¦ Package: https://pub.dev/packages/sync_engine
š» Source code: https://github.com/Wolfof420Street/flutter_sync_engine
š Architecture and examples: https://billodida.dev/projects/syncforge
It's still early-stage, so I'm not presenting it as a battle-tested production solution. I'm looking for developers who are interested in offline-first architecture and willing to challenge the design, try the examples, or point out gaps.
I'd particularly appreciate feedback on three things:
- Would you use a reusable sync engine like this, or do you prefer implementing synchronization within each application?
- What would you want to see before trusting a library like this with real application data?
- Which conflict-resolution or synchronization scenarios do you think are hardest to get right?
Constructive criticism is very welcome. I'm building this in the open and would love to learn from developers who've dealt with synchronization in real projects.
Thanks for taking a look! š
1
u/codes_astro Oct 15 '26
What tool are you using for debugging and monitoring to improve performance and fix bugs. Iām working with https://github.com/measure-sh/measure if you need help
2
u/No_Boss_1911 Oct 15 '26
yeah offline edits ate me for a bit. i store queued writes so they survive a restart, but hard rule is the same write can never apply twice even when the retry fires after a kill mid flush. are your outbox rows keyed by op id so a crash+retry is idempotent, or do you just replay the payload and hope the server dedupes? also curious when one device was offline for days, do tombstones still win or does the conflict path change?
0
u/[deleted] Oct 15 '26
[removed] ā view removed comment