---
title: "Comparing local-first frameworks and approaches"
description: "Local-first software keeps data on the user's device and syncs opportunistically, and three representative approaches take different routes to it."
url: "https://swe.quest/articles/comparing-local-first-frameworks-and-approaches-d0bd0fb78a9919b2"
canonical: "https://neon.com/blog/comparing-local-first-frameworks-and-approaches"
source: "Neon"
published: "2024-09-19"
difficulty: "easy"
kind: "Deep dive"
reading_minutes: 6
tags: ["local-first","consistency","replication","postgres"]
---

# Comparing local-first frameworks and approaches

A post on [Neon](https://swe.quest/sources/neon.md), published 2024-09-19, 6 min read, Deep dive. Original: [https://neon.com/blog/comparing-local-first-frameworks-and-approaches](https://neon.com/blog/comparing-local-first-frameworks-and-approaches)

## Summary

Local-first software keeps data on the user's device and syncs opportunistically, and three representative approaches take different routes to it. Automerge uses CRDTs to merge concurrent edits without a coordinating server. PouchDB is a browser-side document database that syncs with CouchDB and resolves conflicts by deterministically picking a winning revision while keeping the losers for manual resolution. ElectricSQL is a server-side sync engine that reads Postgres logical replication and streams subsets of data ("shapes") to clients. Short code samples show each API, framed by the seven ideals of the Ink & Switch local-first manifesto.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Local-first & sync](https://swe.quest/tags/local-first.md) (Architecture & design)
- [Consistency models](https://swe.quest/tags/consistency.md) (Distributed systems)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- JavaScript basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- eventual consistency ([easy posts on Consistency models](https://swe.quest/tags/consistency.md?difficulty=easy))

## Keywords

CRDT, Automerge, PouchDB, CouchDB, ElectricSQL, Postgres logical replication, Ink & Switch

## Related posts

- [Building Local-First Apps: The Complete Guide to Offline-First Database Sync](https://swe.quest/articles/building-local-first-apps-the-complete-guide-to-offline-first-database-sync-047687e423c4421f.md): Turso · 2026-07-27 · Medium · 9 min read · Local-first & sync, SQLite, Replication, Consistency models, TypeScript
  Turso Sync brings local-first behaviour to SQLite-based apps.
- [Turso Sync: Local-First SQLite with Push and Pull](https://swe.quest/articles/turso-sync-local-first-sqlite-with-push-and-pull-8967f9053b2dc6bc.md): Turso · 2026-11-16 · Medium · 10 min read · Local-first & sync, SQLite, Replication, Event-driven architecture, Performance engineering
  Turso Sync replaces libSQL's page-based Embedded Replicas with logical row-level changes captured via CDC in Turso Database, a Rust rewrite of SQLite, so reads and writes stay local and apps call push() and pull() explicitly.
- [pg\_crdt - an experimental CRDT extension for Postgres](https://swe.quest/articles/pg-crdt-an-experimental-crdt-extension-for-postgres-19dd4ebad247eefd.md): Supabase · 2022-12-10 · Easy · 7 min read · PostgreSQL, Consistency models, Local-first & sync, Real-time systems
  pg\_crdt is an experimental, open-source Postgres extension that adds CRDT column types (wrapping the Yjs and Automerge Rust libraries via pgx), so a column like a post's content can be a Yjs Doc whose updates are commutative and idempotent.
- [One Postgres, a database per user, or both?](https://swe.quest/articles/one-postgres-a-database-per-user-or-both-3df8849f282fa457.md): Turso · 2026-11-25 · Easy · 10 min read · Multi-tenancy, Local-first & sync, System design, SQLite, PostgreSQL
  Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users.
- [Introducing Offline Writes for Turso](https://swe.quest/articles/introducing-offline-writes-for-turso-e48bdc4a18b3aae7.md): Turso · 2024-10-25 · Easy · 4 min read · Local-first & sync, SQLite, Replication, Multi-tenancy
  Turso is opening a private beta for Offline Writes, letting applications write to local embedded SQLite replicas while online or offline and sync those changes to the cloud later.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
