> [!tldr] **Local-First** is a [[Principles (index)|principle]] and paradigm shift that's happening in software & app development right now. Local first is not a rejection of the cloud, but a redistribution of work responsibilities. Processing & data should exist **locally**, on your devices. **Distributed, not centralized.** ![[Local-First 2026-02-01 22.56.58.excalidraw.svg]] %%[[Local-First 2026-02-01 22.56.58.excalidraw.md|🖋 Edit in Excalidraw]]%% Local-first is: - **Fast** - your app doesn't round trip to the cloud for everything, it's *fast* - **More durable** - your app doesn't die when the servers are shut down - **More consistent** - your app doesn't choke when the network is spotty - **Secure** - you don't have to send anything off-premises if you don't want Local-first is like having an army full of capable squadrons, each independently capable of action. The centralized model is like having to have the general involved in every little decision. A controlled distribution of power & authority wins. ## Generally-Applicable Principles Local-first is the name being given to a paradigm for app creation, but the principles it extols can be used *today*. - Avoid software that doesn't work offline (e.g. [[Notion]]) - Avoid workflows that cannot be merged ## Technical Implementation This is based on the notion of *conflict-free replicated data types* (CRDT), which is a data structure that features: 1. Any replica can be updated independently, concurrently, and without coordination 2. An algorithm that resolves any inconsistencies 3. A guaranteed convergence on merge These features can be accomplished using a couple of different approaches. 1. *State-based (aka CvRDT*) - you send the data & the actions 1. Larger, but more durable 2. *Operation-based (aka CmRDT)* - you send only actions taken 1. Smaller, but slightly more prone to breaking Libraries and frameworks have implemented these concepts. You don't have to build them yourselves when you're writing code. **** # More ## Source - https://youtu.be/10d8HxS4y_g?si=NJUplW_vc9HOxIdu - https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type