Local-first software

Hand-drawn terracotta islands linked by narrow bridges over dense sand and umber herringbone hatching with moss flecks.

Local-first software treats the copy of the data on the user’s own device as the primary copy. Servers hold secondary copies (Kleppmann et al., 2019). The idea comes from a 2019 essay by Kleppmann and colleagues.

Two points are contested. One is whether an app with an authoritative server can be called local-first. The other is whether such apps need conflict-free replicated data types (CRDTs), which merge edits made on different devices.

The 2019 definition and its revision

The original 2019 definition of local-first software turns on which computer holds the primary copy. In a cloud app the server holds the authoritative data and the client holds a subordinate cache. A local-first app swaps those roles (Kleppmann et al., 2019). The authors propose a litmus test: do the apps keep working if all servers shut down (Kleppmann et al., 2019).

The essay lists seven ideals: fast, multi-device, offline, collaboration, longevity, privacy and user control (Kleppmann et al., 2019). It presents them as ideals to strive for, not strict requirements (Kleppmann et al., 2019). It scopes the idea to personal and collaborative document-style apps (Kleppmann et al., 2019). It says its own libraries do not fully realize the ideals (Kleppmann et al., 2019). Its authors advise against replacing a proven product such as Firebase with an experimental CRDT project in production (Kleppmann et al., 2019).

In 2024 Kleppmann revised the definition. At Local-First Conf 2024 he said the seven ideals are not a good definition and are better read as benefits local-first can bring (Hofmeyr, 2024). A conference recap reports the new test: the unavailability of another computer should never prevent you from working (Sitnik & Turner, 2024). Under that test, apps that fail with Wi-Fi off are not local-first, and local-first is a spectrum (Sitnik & Turner, 2024). Kleppmann also described a gray area of systems that are somewhat local-first (Hofmeyr, 2024).

Offline-first and local-first

Sources disagree on where offline-first, which aims at usable apps without a connection, ends and local-first begins. The 2019 essay credits the Offline First movement with better offline support but says web app architecture remains server-centric and offline support is an afterthought in most web apps (Kleppmann et al., 2019). Writers separate the two by which copy is authoritative: one blog says the local store is primary in local-first and the server is primary in offline-first (Pramanik, n.d.). Kleppmann, as quoted by PowerSync, said offline-first is part of local-first (Hofmeyr, 2024). How Progressive Web Apps and service workers provide offline operation is covered in Offline web apps.

Sync engines

Two families of tools keep device and server data in step. Server-authoritative sync engines copy parts of a backend database to the device. Writes go back through the developer’s own backend.

Electric syncs Postgres data to clients over HTTP and sends writes through the developer’s API (Electric, n.d.a). PowerSync keeps client SQLite databases in sync with a backend source database (PowerSync, n.d.a). In Zero, a mutation first runs on the client and then on the server in a transaction against the developer’s database (Rocicorp, n.d.). Replicache’s documentation states that the server is authoritative (Rocicorp LLC, n.d.).

The second family is CRDT libraries. A CRDT is designed so that replicas of a shared object converge without foreground synchronisation (Shapiro et al., 2011). Automerge is a CRDT library designed for local-first software that also works with a central server (Automerge contributors, 2026). Yjs makes no assumption about the network and needs no central source of truth (Yjs contributors, n.d.). How CRDTs and the alternatives merge edits, and what each costs, is the subject of Merging concurrent edits.

Production designs

Four collaborative apps have published their designs. Figma treats the server as the final authority and resolves conflicts per property, with the last value sent winning. It says it does not use true CRDTs because a central server removes the need for their overhead. It still allows offline editing for any length of time (Wallace, 2019). tldraw keeps the authoritative copy of a document on the server (tldraw, n.d.).

Excalidraw relays encrypted messages through a server and merges elements by version number (idlewinn, 2020). Notion caches records locally in SQLite and migrates pages marked available offline to a CRDT data model (Xu, 2025a).

Does a server-authoritative app count as local-first?

The label is contested. Several systems call themselves local-first despite a server-authoritative design (Hofmeyr, 2024). Convex argues its authoritative-server design is easier to build with (Convex, n.d.). The 2019 essay contrasts cloud apps, where server data is authoritative, with local-first apps, where the local copy is primary (Kleppmann et al., 2019).

A second dispute concerns whether such apps need CRDTs. Weidner argues that with a central server CRDTs are likely overkill (Weidner, 2024). The argument is set out in Merging concurrent edits.

One magazine article also calls local-first overkill for simple CRUD apps (create, read, update, delete) with no offline or collaboration needs, and a poor fit for strong transactional consistency (Pawar, 2026). A 2025 bachelor’s thesis concludes that local-first cannot replace cloud software for financial transactions or large datasets (Otsamo, 2025).

Limits

Three problems have no settled answer once every device holds a primary copy.

Access control. Permissions beyond secret URLs were an open question in the 2019 essay (Kleppmann et al., 2019). CRDTs have long ignored which peers may update state, and an access control list that is itself a CRDT must resist malicious manipulation (Kleppmann, 2025). Keyhive, an Ink & Switch access control project, was open-sourced as pre-alpha and is not for production (Ink & Switch, 2025). Its authors say back-dating operations is possible in the design and that the system as a whole lacks forward secrecy (Ink & Switch, 2024).

Server-side rules. Inserting items with the same unique value on different replicas needs coordination, because each state is valid but their merge is not. Uniqueness without coordination works if each replica assigns IDs within its own part of the ID space (Bailis et al., 2014). Sync engines handle rejected writes by rolling back the local change: PowerSync rolls a rejected write back on the client (PowerSync, n.d.b). Electric’s guide gives clearing all local state as a baseline and says background syncing complicates rollback (Electric, n.d.b).

Schema evolution. Without a central server there is no authoritative current schema (Kleppmann et al., 2019). Cambria translates data between schemas using lenses, but cannot make incompatible software work together (Litt et al., 2020).

Evidence for the benefits Weak evidence: few or small studies support this

The claimed benefits rest on design arguments and informal tests, not measurement. The 2019 authors tested their prototypes with team use and about ten external usability tests, with no formal method (Kleppmann et al., 2019). They expect near-instant response but say this does not guarantee speed (Kleppmann et al., 2019).

Indirect evidence comes from latency research, where extra delay reduced user activity in visualization experiments but task type can modulate or remove the effect (Liu & Heer, 2014; Battle et al., 2019). Browser timings of service-worker caching are in Offline web apps.

On developer effort, slides from a user study of CRDT libraries state that no known user study had evaluated whether CRDTs help create multi-user apps (Zhang et al., n.d.). One short paper reports that a local-processing variant used up to 38% less total energy than the SaaS version on three of four devices. The local variant lacked collaboration features (Siffre et al., 2025).

Research venues and open problems

Two venues focus on local-first software: Local-First Conf, where Kleppmann spoke in 2024 (Hofmeyr, 2024), and at the Programming Local-first Software (PLF) workshop, held with ISSTA/ECOOP in 2024. The workshop argues that existing local-first solutions are not integrated with application programming languages (PLF 2024 organisers, 2024). It lists networking, schema evolution, security and privacy (whom to trust), indexing and queries beyond what fits in memory, and version control for users as open problem areas (PLF 2024 organisers, 2024).

LoRe’s authors say existing local-first tools leave developers to reason about concurrent interactions without automated safety guarantees. LoRe verifies developer-supplied safety properties and uses coordination only where required (Haas et al., 2023). ConLoc’s authors say enforcing application-level invariants over replicated data is a challenge that developers handle by manual synchronization (Köhler et al., 2025).

Further reading

  • Kleppmann et al. (2019): the essay that defines local-first and lists the seven ideals, with its own account of limits.
  • Hofmeyr (2024): a vendor’s account of Kleppmann’s 2024 revision of the definition.
  • Weidner (2024): the case that a central server makes CRDTs unnecessary.
  • Pawar (2026): a practitioner overview that separates local-first from offline-first and PWAs.
  • Ink & Switch (2024): the design notes of Keyhive, an access control project, including its known weaknesses.

Known gaps

What this article cannot tell you yet.

  1. No peer-reviewed study measures the user or developer benefits of local-first web apps: latency, availability, data loss and development effort were all not found.
  2. The 2024 revision of the definition is documented only in a vendor blog and a conference recap; the keynote slides could not be read.
  3. No peer-reviewed critique of the local-first ideals or label was found, and the disputes over server authority and over CRDTs come only from authors with a stake in a tool.
  4. Linear’s sync engine is not documented first-hand in any text found.
  5. The full results of the 2025 energy study and the talks at Local-First Conf and the PLF workshop were not read.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 33 references