Linear sent me down a local-first rabbit hole

https://news.ycombinator.com/rss Hits: 6
Summary

I started using Linear a couple of months ago and using it made me go down a technical rabbit hole that changed how I think about web applications. For the uninitiated, Linear is a project management tool that feels impossibly fast. Click an issue, it opens instantly. Update a status and watch in a second browser, it updates almost as fast as the source. No loading states, no page refreshes - just instant, interactions. After building traditional web apps for years, this felt wrong. Where’s the network latency? How are they handling conflicts? What happens when you go offline? If you’re still unsure what local-first looks like, I think LiveStore’s demo is the best. Down the Rabbit Hole Armed with a rainy weekend and too much coffee I was determined to learn this wizardry. What I found was a goldmine of engineering deep-dives: The short version: they built their own sync engine that treats your browser’s IndexedDB as a real database. Every change happens locally first, then in the background uses GraphQL for mutations and Websockets for sync. I also found the term “local-first” kept popping up, which depending on the content you read is either a UX strategy for apps that feel local (instant updates, etc.) or a philosophy about keeping your data local and syncing across devices. In most instances the concept is beautifully simple: instead of your app being a fancy form that sends data to a server, it has it’s own local database. Sometimes the server is just another client to sync with. It can be a fundamental inversion of how we typically build web applications. In a traditional web app, the server is the only source of truth: Client → HTTP Request → Server → Database → Response → Client In a local-first/sync approach, each client may have its own (nearly) complete database: Client → Local Database → UI Update ↓ (async) Sync Engine → Server → Other Clients The key point for me was that by moving the database to the client, you eliminate network latency from the user i...

First seen: 2025-08-08 07:27

Last seen: 2025-08-08 12:28