Local-first development flips the script: the client becomes the source of truth, the cloud becomes backup. We compare three top approaches — Turso's edge SQLite replication, PocketBase's single-binary backend, and Appwrite's full-stack open-source platform — to help you choose the right local-first database for your next project.
For years, "offline mode" was an afterthought — a cache layer bolted onto a cloud-dependent app. Local-first flips that. The client device becomes the source of truth, and the cloud exists only for backup, sync, and collaboration.1 The result? Zero-millisecond reads, full offline capability, and a user experience that doesn't degrade when the network drops.
The shift is real. SQLite — long the quiet workhorse of embedded databases — is being rediscovered as the ideal local-first foundation.2 And frameworks like PouchDB showed us that local-first isn't about bleeding-edge tech; it's about reimagining existing databases for a world where offline is the norm.3
But "local-first" isn't one product. It's a spectrum. You've got sync engines (like PowerSync or Zero), embedded databases (SQLite, DuckDB), and backend-as-a-service platforms that support local-first patterns. Here's how the top options stack up.
| Dimension | Turso | PocketBase | Appwrite |
|---|---|---|---|
| Architecture | Edge SQLite + replication | Single-binary SQLite backend | Full-stack BaaS |
| Sync model | Embedded libSQL with live sync | REST API over SQLite | Real-time subscriptions + offline SDKs |
| Deploy effort | Cloud-managed edge | Self-hosted (one binary) | Self-hosted or cloud |
| Best for | Latency-sensitive edge apps | Small teams, MVPs, side projects | Full-stack apps needing auth, storage, functions |
Turso takes SQLite and makes it distributed. It's built on libSQL (an open-source fork of SQLite) and adds a replication layer that lets you run databases at the edge — close to your users — while maintaining a single source of truth.1
Why it wins for local-first: Turso's embedded replica model means the client can hold a local copy of the database that syncs in the background. Reads are instant. Writes are queued and reconciled. This is the closest you get to "database as state" without building your own sync engine.
The tradeoff: You're still managing schema and migrations yourself. Turso handles replication, not conflict resolution — you'll need to design for that.
PocketBase is deceptively simple: one binary that gives you a SQLite-backed backend with authentication, file storage, a dashboard UI, and a REST API. It's the fastest way to get a local-first app off the ground.1
Why it wins for local-first: Because the database is SQLite, you can run PocketBase entirely on a local machine during development — no cloud dependency. For production, you deploy the same binary to a server, and your app talks to it over HTTP. It's not "offline-first" in the strict sense (the client still needs the server), but the local development experience is pure local-first.
The tradeoff: No built-in offline sync or CRDT-based conflict resolution. PocketBase is best for apps where the server is always reachable or where you handle offline state yourself.
Appwrite is the most comprehensive option here: databases, authentication, storage, serverless functions, and real-time capabilities — all open-source and self-hostable.1
Why it wins for local-first: Appwrite's real-time API and offline SDKs let you build apps that sync data when connectivity returns. It's less about embedded databases and more about a cloud backend that plays nicely with local state. For teams building full-stack apps that need auth, permissions, and file storage alongside local-first data, Appwrite is the most complete package.
The tradeoff: Heavier than PocketBase or Turso. You're committing to a platform, not just a database.
The local-first landscape breaks into three camps:3
| If you... | Pick |
|---|---|
| Need sub-10ms reads at the edge | Turso |
| Want the simplest possible backend for a side project | PocketBase |
| Are building a full-stack app with auth, storage, and real-time | Appwrite |
| Need multi-user collaboration with conflict resolution | Look at sync engines (PowerSync, Zero) |
Disclosure: Some of the links on this page are affiliate links. If you sign up through them, we may earn a commission at no extra cost to you. We recommend these tools because we believe in the local-first approach, not because of the commission.
This page was written by the engine and the engine is still on the line. The conversation below picks up where the article stops.
Yes — the picks above are the engine's current verdicts. Ask a sharper version of this question below and you'll get a custom answer with the latest pricing.