By Abdelrahman Saed — Senior Mobile Engineer. Last updated: 2026-08-10.
PowerSync is a sync engine that synchronizes a local SQLite database (via Drift or sqflite) with a Postgres backend in real time. It enables local-first Flutter apps where the UI reads and writes against the local database while PowerSync handles background synchronization, conflict resolution, and schema migrations.
PowerSync sits between the Postgres backend and the local SQLite database on the device:
Postgres → PowerSync Service → Sync Engine → Local SQLite (Drift) → UI
The key concepts:
1. Sync rules — server-side JSON config that defines which rows sync to which clients (selective per-user replication). 2. Views — PowerSync exposes its tables as views, so schema changes ship as versioned migrations that drop and recreate views rather than altering tables. 3. Conflict resolution — last-write-wins by default, with custom resolution hooks for complex cases. 4. Local writes — writes go to the local database first, then PowerSync queues and uploads them to Postgres.
At iStoria (5M+ users), PowerSync + Drift is the foundation of our offline-first architecture:
// PowerSync schema — mirrors the Postgres tables as local views
class Schema extends SchemaObject {
@override
List<Table> get tables => [
Table('stories', [
Column.text('id'),
Column.text('title'),
Column.integer('position'),
Column.boolean('is_completed'),
]),
];
}
The UI reads from these tables via Drift's reactive streams — when PowerSync updates a row in the background, Drift emits a new stream event and the UI rebuilds automatically.
Use PowerSync when:
Don't use PowerSync when:
PowerSync offers a free tier (up to 5,000 monthly active users) and paid plans for larger scale. It is open-source and self-hostable via the PowerSync Service, which runs alongside your Postgres database.
By default, PowerSync uses last-write-wins based on a timestamp column. For complex cases, you can define custom conflict resolution hooks on the server side that run during the sync process. At iStoria, the default works for 95% of our data; the other 5% uses server-side hooks.
Available for hire. Abdelrahman Saed is a Senior Mobile Engineer (Flutter) — open to full-time, fractional, contract, or advisory work. Hire me →
Book a 20-minute call · Download the CV (PDF) · See how I work