Local First – Collaboration Beyond Cloud

Bookmark
Rate this content

For years, we’ve defaulted to centralised servers and, more recently, leaned heavily on server-side components to power our web apps. But this dependence has a cost: apps that break without constant internet connectivity, sluggish performance under heavy load, and user frustration when things don’t just work.

This talk challenges the cloud-first status quo and invites developers to explore the power of **local-first**. Imagine building multiplayer, collaborative experiences that thrive offline, sync smoothly when online, and harness the value of localised state. We’ll also tackle the complexities of conflict resolution when shifting from a centralised authority to a sync server as a lightweight mediator. It’s time to rethink collaboration.

This talk has been presented at JSNation US 2025, check out the latest edition of this JavaScript Conference.

FAQ

Apps with collaborative features focus on allowing multiple users to actively create and modify shared content, providing an experience where users work together in real-time, rather than just consuming content.

Examples of apps with collaborative features include Figma, Trello, Miro, Canva, and Google Docs, where users can collaborate in real-time.

A common challenge faced by collaborative apps is their reliance on a centralized server, which can cause disruptions when connectivity is lost, preventing users from continuing their work.

Yjs is a library that enables collaborative features by using conflict-free replicated data types (CRDTs), allowing for offline functionality and seamless synchronization across devices.

IndexedDB is used to store the entire Yjs document locally on the client's device, ensuring data persistence and availability even when the user is offline or closes their browser.

Yjs handles conflicts using CRDTs, which automatically merge concurrent changes without complex conflict resolution, ensuring consistent data across all clients.

Yjs providers connect local Y documents to external systems. For example, Y WebSocket handles real-time synchronization, while y-index-db-provider ensures offline data persistence.

The 'LocalFirst' approach may increase client-side complexity, require careful data migration strategies, and still need server support for initial data and backend services.

Companies like Figma and Jupyter Labs use CRDTs to manage collaborative features in their applications.

The 'LocalFirst' approach allows collaborative apps to function offline by storing data locally on the user's device, ensuring instant responsiveness and ownership of data, while synchronizing changes when back online.

Kritiketan Sharma
Kritiketan Sharma
24 min
20 Nov, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Rethinking collaborative app development for offline and online usage, introducing LocalFirst paradigm. Challenges of offline usage in collaborative app development and potential solutions. Benefits of the local first paradigm for user data control and offline work in collaborative apps. Exploring the local first app demo with Yjs technology for collaborative features and offline functionality. Exploring Yjs for collaborative data management and synchronization in React components, enabling a shift to a local first approach. Exploring the reduced role of the server in synchronization, emphasizing user ownership of data. Using Yjs shared types for familiar CRUD operations, introducing Yjs providers for real-time collaboration, and leveraging IndexedDB for offline data storage. The y-index-db-provider persists the document locally, and the y-web-socket-provider relays updates for collaborative scenarios, ensuring consistent list management. While offline, users make individual additions to a shared document. Upon reconnecting, Yjs ensures consistent ordering of concurrent offline changes, guaranteeing a synchronized state across all clients. What happens when clients edit the same item in Yjs is demonstrated. The last write wins register in Yjs ensures the last operation prevails. CRDTs handle concurrent edits and deletions, favoring removals for definitive operations. Yjs provides an elegant solution with conflict-free replicated data types.

1. Rethinking Collaborative App Development

Short description:

Rethinking collaborative app development for offline and online usage, introducing LocalFirst paradigm.

So, if you're someone building apps with collaborative features in them, hold tight. Today, we're going to fundamentally rethink how we build web apps, especially those where users actively work rather than just consume. Many of the apps we use daily are primarily for consumption. Think of a news site or a streaming service. Their core function is to deliver information to you. But then there are others where multiple people are actively creating and modifying shared content. This is where users are truly working together on a shared item while also getting the benefit of updated information.

While a prime example of this is Figma, where designers and developers collaborate in real-time on a single canvas. Some of the other popular ones are Trello, Miro, Canva, and Google Docs. When we think of these collaborative features in these apps, our default is to lean heavily on a big centralized server to power them. And for good reason, these specialized servers in the cloud offer power and scalability. It's a no-brainer. But this reliance comes with a cost.

Have you ever experienced a collaborative app that stops working when you lose connectivity, leaving you unable to continue your work? Well, the purpose of this talk today is to explore an extension to our collaborative apps such that they can deliver amazing experiences without being held back by connectivity and the synchronization challenges that come with not being connected to a server. I'm here to introduce a paradigm that allows us to build multiplayer experiences that thrive offline, sync smoothly when online, and harness the value of localized state, allowing the users to own their own data. I'm here to introduce LocalFirst. Well, before we get into solution mode, let me show you how a normal app would behave under unpredictable network conditions.

2. Challenges of Offline Usage

Short description:

Challenges of offline usage in collaborative app development and potential solutions.

I'll take the example of Trello, a great product that I love and I personally use regularly. And on this board is my plan for the conference. With normal internet, as you can see, I can switch between swim lanes and cards are just moving fine. But say I'm working on my way in a cab and I go through a tunnel, which means patchy internet or slow for that matter. And I hit refresh. It takes a minute, but it ends up loading and it's fine. I'm still able to work.

But say I lose connectivity completely. What happens then? As you can see, as I go off, you can see the little toast message on the left bottom that tells me that I cannot work anymore. And you might have already noticed my ability to make any changes is hindered. But nothing an offline mode cannot fix, right? Just make the app a progressive web app to make it available offline and let the work continue. But then what about drift?

The longer I keep working offline, there is a high chance that the colleague who has been helping me prepare would have made some changes to the board. While I take the example of this board, a more realistic scenario is that of Git, where we inherently keep a local copy of our code and then have to resolve conflicts manually as they appear. Simply put, it's not quite that straightforward. Well, primarily because for the last couple of decades, we've built our apps around a simple premise.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
Thinking Like an Architect
Node Congress 2025Node Congress 2025
31 min
Thinking Like an Architect
Top Content
In modern software development, architecture is more than just selecting the right tech stack; it involves decision-making, trade-offs, and considering the context of the business and organization. Understanding the problem space and focusing on users' needs are essential. Architectural flexibility is key, adapting the level of granularity and choosing between different approaches. Holistic thinking, long-term vision, and domain understanding are crucial for making better decisions. Effective communication, inclusion, and documentation are core skills for architects. Democratizing communication, prioritizing value, and embracing adaptive architectures are key to success.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
The Eternal Sunshine of the Zero Build Pipeline
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
The Dark Side of Micro-Frontends
React Advanced 2025React Advanced 2025
29 min
The Dark Side of Micro-Frontends
In the Talk, various key points were discussed regarding micro-front-end architecture. These included challenges with micro-intents, common mistakes in system design, the differences between micro-intents and components, granularity in software architecture, optimizing micro-front-end architecture, efficient routing and deployment strategies, edge computing strategies, global state and data sharing optimization, managing data context, governance and fitness functions, architectural testing, adaptive growth, value of micro-frontends, repository selection, repo structures, and web component usage.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.
Model Context Protocol (MCP) Deep Dive: 2-Hour Interactive Workshop
AI Coding SummitAI Coding Summit
86 min
Model Context Protocol (MCP) Deep Dive: 2-Hour Interactive Workshop
Workshop
Stepan Suvorov
Stepan Suvorov
Join a focused 2-hour session covering MCP's purpose, architecture, hands-on server implementation, and future directions. Designed for developers and system architects aiming to integrate contextual data with ML models effectively. Agenda:- Introduction & Why MCP? Key challenges MCP solves and core benefits.- Architecture Deep Dive: components, interactions, scalability principles. - Building Your Own MCP Server: guided walkthrough with code snippets and best practices; live demo or code review.- Future of MCP Developments: potential enhancements, emerging trends, real-world scenarios.
Key Takeaways:- Clear understanding of MCP's rationale.- Insight into design patterns and scaling considerations.- Practical steps to implement a prototype server.- Awareness of upcoming trends and how to apply MCP in projects.