What Is Offline-First Design?
Offline-first design is an architectural philosophy for mobile and web applications in which the device holds the primary copy of user data and the application functions fully without a network connection.
Rather than treating connectivity as a prerequisite (fetching everything from a server and failing when the server is unreachable), offline-first apps store data locally first, perform all reads and writes against that local store, and synchronize changes to the server opportunistically in the background when a connection is available.
The outcome is an app that reacts at memory speed instead of network speed and stays usable in subways, airplanes and places where the signal is weak and keeps working without a glitch through the brief connectivity interruptions that real-world mobile use brings routinely.
On any given weekday morning, approximately 3.5-4 million people ride New York City's subway. The cell signal in New York's subway tunnels is inconsistent - available at many stations, absent in the tunnels between them.
Once loading starts, a commuter who opens a notes app to look over a document for a morning meeting may find themselves underground, without any connectivity, within seconds.
What happens next reveals what the app's architecture is fundamentally. When an online-first app displays a spinner and follows that with an error screen and then nothing.
An offline-first app shows the document immediately, from local storage, and continues to work throughout the commute - queuing any changes the user makes to synchronize when they emerge from the tunnel.
Across the 272 stations of the London Underground, the airport departure lounges where travelers get through their phone data plans. Conference centers where 3,000 people at once push WiFi beyond its limits make the picture clear. Developers who work in well-connected offices assume connectivity is unreliable far more often than it really is.
Offline-first design is an architectural philosophy that treats this reality as the baseline rather than the exception.[9] Data lives on the device first. The network is an enhancement when available, not a dependency.
There should be no meaningful difference in core functionality that users experience whether they are connected to fiber broadband or have none at all underground.
| Approach | Data Location | Network Dependency | User Experience Offline |
|---|---|---|---|
| Online-first | Server only | Required for any operation | Spinner, then error screen |
| Cache-then-network | Server primary, cache secondary | Required for fresh data | Stale content shows, then updates |
| Offline-first | Device primary, server backup | Optional (sync when available) | Full app functionality, syncs when connected |
| Fully offline | Device only | None | Full functionality, no sync |
When developers work in well-connected offices, they assume connectivity is unreliable far less often than it really is. Subways, airplanes, rural areas and overloaded conference WiFi are not edge cases. Most mobile users face these things daily in most settings.
The Architectural Inversion at the Core of Offline-First
Traditional web and mobile application architecture follows the request-response model inherited from the early internet. The application needs data; it asks a server; the server responds; the application renders.
If the server is unreachable (because the network is down, because the server is overloaded, because the user is on an airplane), the application fails. The network is the foundation on which everything else rests.
Offline-first inverts this model completely.
In an offline-first architecture, the device holds the primary copy of the data the user is working with. When the user opens a note, the app reads it from local storage. When the user edits a document, the change is written locally first.
The network is involved only for synchronization (moving local changes to the server and pulling server changes to the device), and synchronization is a background process that happens opportunistically when connectivity is available, not a blocking operation that the user waits for.
The benefits of this inversion are multiple and compounding:
Instant response. Local storage reads are measured in microseconds. Network round trips are measured in tens or hundreds of milliseconds, and in poor connectivity conditions, in seconds. Every user interaction in an offline-first app responds at memory speed rather than network speed.
Reliability. The app functions regardless of network conditions. Not a degraded version, not a read-only version - the full app, because the full data is local.
Resilience. Users do not see temporary network interruptions. Locally the changes build up during the outage and then synchronization happens when connectivity comes back. There is no break in the user's workflow.
Battery and data efficiency. Network operations are seen by mobile apps as the main cause of battery drain and cutting synchronization from per-request network calls to batch operations brings both battery use and data consumption down.
Example. When users said the app was unusable during subway commutes and airplane trips, Notion added offline support to its apps. Users could make pages, work on databases, add images and organize content with no connection and once connectivity came back, all changes synced up.
Notion became a real productivity tool that followed users into every context of their work by transforming Notion from a tool for connected environments into something more.
The Foundation: Local Storage Technology
Your choice of local storage for your data model and queries is the first move in offline-first architecture. How well the app runs, how complex sync gets and how easily it can be maintained over time all depend greatly on that decision.
Relational Storage: SQLite and Its Wrappers
SQLite is perhaps the most widely deployed database software in existence. The SQLite library is embedded in iOS, Android, macOS, Windows, Python, PHP, and hundreds of other environments. Every iOS and Android app that needs structured local storage can use SQLite without any additional dependencies.
Supporting joins, indexes, transactions, triggers and most SQL syntax, SQLite is a full relational database engine. It works efficiently with databases that have millions of rows.
Applications that have complex data relationships (like a note-taking app where notes come with tags, attachments, sharing permissions and revision history) work best with SQLite's relational model.
The raw SQLite API is C-based and verbose. Platform wrappers provide friendlier interfaces:
Room (Android) comes with SQLite annotation-based entity definitions as well as compile-time query checking that turns SQL errors into build errors rather than runtime crashes and connects with Kotlin Coroutines and Flow for reactive data access.[8]
Explicit database migration definitions are required in Room and this prevents the data corruption that comes from making schema changes without migrations.
Core Data (iOS) is Apple's persistence framework built on SQLite (with options for other backing stores). Core Data provides an object-oriented interface, relationship management, lazy loading, and iCloud sync integration.
Compared to Room, it has a steeper learning curve but it gives full data management features that include undo support as well as in-memory stores for testing.
WatermelonDB is a cross-platform database library for React Native that wraps SQLite on mobile and IndexedDB on web and puts a focus on lazy loading and performance optimization. It works well for large-scale apps that run into performance issues from using queries naively.
Document Storage: Realm and MongoDB Atlas Device Sync
Realm (acquired by MongoDB in 2019) provides a mobile-native object database that stores data as objects rather than rows in tables. Realm's API is more intuitive for object-oriented development: you define Swift or Kotlin classes, and Realm persists instances of those classes directly.
No SQL queries, no object-relational mapping layer.
Realm's most distinctive capability is its Atlas Device Sync integration. With Device Sync configured, Realm handles bidirectional synchronization between the local mobile database and a MongoDB Atlas cloud database automatically, including conflict resolution.[7]
This eliminates the most complex part of offline-first implementation (the sync engine) at the cost of coupling to MongoDB's cloud infrastructure.
When teams work with document databases (MongoDB) and agree to take on the infrastructure coupling, Realm with Device Sync gives the fastest route to a production-quality offline-first solution.
Web Storage: IndexedDB and Abstractions
Storage works differently for browser-based apps.[11] Simple key-value storage is available through the Web Storage API (localStorage and sessionStorage) but the API comes with a 5 to 10 MB size cap and no query features.
IndexedDB is the browser's native structured storage API. It gives key-value storage with indexes, cursor-based iteration and transactions. Its size limits are far higher than those of Web Storage (the limit depends on the browser but most modern ones come to several gigabytes).
IndexedDB's API is asynchronous and callback-heavy, making direct use unpleasant.
Dexie.js is an IndexedDB wrapper that has a Promise-based API, compound indexing and a clean query interface. The library takes care of the browser compatibility differences in IndexedDB implementations and adds features such as pagination and support for TypeScript.
PouchDB implements the CouchDB replication protocol in JavaScript.[6] Its primary differentiation from other IndexedDB wrappers is built-in bidirectional sync with CouchDB and CouchDB-compatible servers. The sync protocol handles conflict detection automatically.
PouchDB gives teams that want to use CouchDB as their backend (or Apache CouchDB, Cloudant or PouchDB's own sync server) full offline sync capability with little custom coding needed.
Storage Management: The Finite Resource Problem
Device capacity bounds what local storage can hold. An app that caches data aggressively will end up filling device storage and then either data gets corrupted, writes fail or the OS intervenes. Managing storage explicitly is something production offline-first apps need.
Selective sync allows users to choose what content to store offline. Google Maps' offline maps feature is the canonical example: users select geographic regions to download, see the download size before committing, and manage their downloaded regions through a management screen.
Spotify's downloaded playlists implement the same model.
Cache eviction policies. These automatically get rid of data that has not been accessed recently. They put into practice variants of LRU (Least Recently Used), LFU (Least Frequently Used) or TTL (Time To Live) expiration.
Well-designed eviction policies preserve data the user is likely to need while reclaiming space from data they have not accessed in months.
Storage monitoring. When storage consumption nears device limits, users see how much storage is being used through storage monitoring. An app that fills the device storage silently without warning builds up a user experience that destroys trust once the user finds out that photos have stopped saving. The app has eaten up all available space.
Synchronization: The Hard Problem at the Heart of Offline-First
Local storage solves the offline availability problem. Synchronization solves the connected world's consistency problem: ensuring that changes made on one device eventually reach all other devices and the server, and that changes from the server eventually reach the device.
Of all components in offline-first architecture, sync is the most technically demanding by far and that is why many teams steer clear of the approach.
Sync Timing Strategies
Real-time sync sends changes to the server right away as they happen when connectivity is available and Firebase Realtime Database and Cloud Firestore put this model in place. Local changes appear to other users within milliseconds and working with platform-provided libraries makes the implementation modest in complexity.
Of all methods, real-time sync is the most consistent approach though it requires the most network resources. Each tiny edit sends a network request. When users make rapid incremental edits (typing in a document, checking items quickly one after another) in apps, real-time sync per keystroke is both inefficient and unnecessary.
Batched sync. Changes accumulate locally and get sent out in periodic batches every minute, every five minutes or when certain conditions trigger the batch. Batch sync uses far less network than real-time sync and cuts battery use too.
Background sync uses what platforms give to sync the app while it is not in the foreground. These are iOS Background App Refresh, Android WorkManager and the Web Background Sync API (which works through service workers).[12] With background sync, data stays up to date when the user opens the app instead of having to wait for sync to finish once the app is opened.
WiFi-only sync keeps large data transfers to WiFi connections and preserves what users have of their cellular data allowance. Overcast and Pocket Casts and other podcast apps apply this method to downloading episodes. Document sync apps can give users on limited data plans the option to choose this as a preference.
Delta Sync: Transmitting Only What Changed
Transmitting the complete dataset on every sync cycle is correct but wasteful. A task management app with 500 tasks that syncs the complete task list every time the user adds a single task is sending 499 unchanged tasks unnecessarily.
Delta sync transmits only data that has changed since the last successful sync. Implementing delta sync requires tracking what has changed:
Timestamp-based delta. Every record gets a last-modified timestamp assigned to it and records modified after the timestamp from the last successful sync get sent out. It is easy to put in place yet it is vulnerable to clock differences between devices and server.
Sequence number-based delta gives each change a monotonically increasing sequence number. The client logs the sequence number of the most recent change it got and the server sends all changes carrying sequence numbers above what the client last had. Clock differences do not affect how this works and many production sync systems use it.
Operational log delta. Every operation (create, update, delete) is recorded as an event and the sequence of operations gets synchronized rather than the resulting state. By keeping the history of changes instead of just the current state, this makes it possible to undo operations, to create audit logs and to resolve conflicts more complexly.
Conflict Resolution: When Divergence Becomes a Problem
Conflict is the defining challenge of distributed systems that allow offline modification.[10] If two users (or two devices belonging to the same user) modify the same data while offline, they produce divergent states that must eventually be reconciled.
Types of Conflicts
Write-write conflicts occur when the same field of the same record is modified differently on two devices. User A changes the title of a task from "Review contract" to "Review final contract" on their phone.
On their laptop, User B changes the same task's title to "Review and sign contract" and the two devices sync up so the title cannot be both strings at once.
Write-delete conflicts. This happens when one device modifies a record that another device has deleted. A user works extensively on a note offline. Another user then deletes the note. At the same time, which wins when both devices sync: the deletion that could destroy what User A worked on or the edit that brings back a record the deleting user meant to remove?
Structural conflicts occur in hierarchical data when records are moved within the hierarchy differently on two devices. A file moved to one folder on one device and to a different folder on another creates ambiguity about where it should ultimately reside.
Resolution Strategies and Their Trade-offs
Last-write-wins (LWW) takes the approach of accepting the change that has the most recent timestamp and discarding the other to resolve conflicts. It is easy to implement and the result is certain. The price is that one user's change gets lost silently.
When conflicts occur rarely and the cost of losing a change is low, LWW works well. Status updates, preference settings and presence indicators make for reasonable LWW candidates. Document content, financial data as well as any case where silently discarding data would be harmful do not work with LWW.
Field-level merging takes a look at which particular fields have changed instead of treating records as atomic units and that is what resolves conflicts. User A changes a task's title and User B changes the same task's due date can both be put in place without any conflict occurring. Conflict arises only when the same specific field is modified in different ways.
To handle field-level merging takes a more sophisticated way of detecting conflicts but it reduces by a lot how often conflicts really occur in most use patterns. In most cases, concurrent changes to collaborative apps hit different parts of what is shared.
CRDTs (Conflict-free Replicated Data Types) are mathematical data structures that have been specifically designed to allow concurrent modification without running into conflicts.[2]
Without needing any coordination between devices, a CRDT has as its key property that concurrent operations always lead to the same final state whatever order they arrive in.
Two primary CRDT families are relevant for app development:
State-based CRDTs (CvRDTs) synchronize by transmitting the current state and merging states using a function guaranteed to produce the same result regardless of merge order.
Elements may be added but never removed in a Grow-Only Set (G-Set) that is a simple CRDT. Two G-Sets merge to give a set with all elements from both and the merge operation is commutative, associative and idempotent.
Operation-based CRDTs (CmRDTs) synchronize by transmitting operations (rather than state) in a format where the order of operation application does not affect the final result.
Example. Multiple designers can work on the same Figma file at once even when the connection comes and goes and all their edits come together as the same final result no matter what order they arrive in. That is how Figma's real-time collaborative design tool works using CRDTs.
Figma calls itself "reliable" in collaborative sessions even when people have poor connections because the data structure ensures that convergence happens.
Automerge and Yjs are CRDT libraries for JavaScript that implement collaborative data structures including lists, maps, and rich text.[5]
These libraries deal with the mathematical complexity of CRDT implementation. They give app developers APIs that look just like ordinary work on a data structure but automatically track and resolve any changes that come in concurrently.
Manual conflict resolution. Both versions of a conflicted record appear to the user and they must choose or merge them. It is the most conservative approach (it never silently loses data). But it gets in the way of user workflow and works poorly at scale when conflicts occur often.
Git puts manual conflict resolution in place for source code. When two developers change the same lines, Git marks the conflict and calls for human intervention. Merge decisions for source code need contextual understanding that automated systems cannot give.
For most user data, this level of user involvement is inappropriate.
UX Patterns for Communicating Offline State
Offline-first apps face a particular UX challenge with users who are used to online-first apps. Those users expect that any change they make syncs right away to the server.
Even if changes are safely queued locally, when that assumption breaks down (when a user makes changes offline and finds out they never got to the server), the experience feels like data loss.
Good offline UX proactively communicates the synchronization state without creating anxiety or cognitive burden.
Connectivity State Indicators
Indicators that are subtle yet persistent let users know what mode they are operating in without needing to pay active attention. The most common patterns are these.
Showing connection status with a tiny icon in the navigation bar or toolbar, a cloud with a checkmark means synced, a cloud with a slash means offline and a spinner means syncing in progress. The icons tell users at a glance what state the system is in without getting in the way of the main content.
When data was last synchronized with the server, the "last synced" timestamp shows. Data is current and users get confidence from "last synced 2 minutes ago". When it says "last synced 3 days ago", users are prompted to check connectivity.
Where it matters, the system shows a count of pending changes as "5 changes waiting to sync". That tells users local state and server state have diverged and once connectivity comes back, convergence will occur.
Significant state transitions call for temporary notification banners that appear when connectivity changes ("You're offline. Changes will sync when you reconnect.") and disappear by themselves after a few seconds.
When banners stay up forever, block content or take any action from a user during a brief internet outage, they get in the way too much.
Optimistic UI Applied to Offline-First
In online-first apps, optimistic UI assumes that a server operation will succeed and shows the result immediately, reverting if the server rejects the change. In offline-first apps, every operation is inherently local and optimistic - there is no server round trip to wait for.
The UI shows the change immediately because the change has genuinely happened, in local storage.
Offline-first apps give the snappiest interaction response characteristics and there is no "waiting for server" state to deal with during normal operation.
Example. Offline mode lets users in Slack's mobile app read all cached messages and draft new ones and outgoing messages get queued for sending once there is connectivity again. As soon as they are composed, the messages appear in the conversation (drawing on local state).
Once the user gets back into the conversation once there is connectivity again, they see the same messages marked as confirmed delivered. The switch over goes smoothly.
Graceful Feature Degradation
Not every feature of a mobile app works offline. Live collaboration and video calls need a network connection as do payments that require validation on a server. Any feature depending on data not kept locally will fail to display that data.
Offline, core features have to work completely. Secondary features should degrade gracefully and give a clear explanation. Features needing connectivity should fail with specific helpful error messages instead of generic error states and that is the design principle.
As its main feature that works fully, the app allows offline creation and editing of documents. When the shared version cannot be fetched, it can show cached versions of shared documents with a "view-only offline" indicator and also display "Sharing needs an internet connection" along with a clear retry button for sharing.
Implementation Architectures for Production Offline-First
The Outbox / Inbox Pattern
A practical and well-tested architecture for offline sync uses two queues: an outbox for local changes waiting to reach the server, and an inbox for server changes waiting to be applied locally.
Locally made changes get recorded in the outbox next to the updated local data whenever the user makes one. The background sync process watches the outbox and once there is connectivity, it sends the changes to the server. After successful transmission, the change is removed from the outbox.
Failed transmission marks the change for retry with exponential backoff.
As soon as the sync process brings down server changes, those go into an inbox queue. Another process then applies the inbox changes to local storage and any conflicts get resolved per the conflict resolution rules that are set up. Once applied, the changes are cleared from the inbox.
Local storage operations are never held up by network operations. Sync failures do not affect user operations and the queues keep a full record of pending operations for debugging as well as recovery. That is how this design pattern keeps concerns separate.
Managed Sync Solutions
Building a production-quality sync engine from scratch is complex work that most teams should avoid. Partial sync failures, schema migrations mid-sync, clock drift between devices and network partitions during sync are just some of the edge cases that occur often and each needs careful handling.
Firebase Cloud Firestore comes with automatic offline persistence built in.[3] Turn it on with one configuration flag and document reads cache locally in Firestore and writes queue in an outbox when the connection drops. By default conflict resolution goes with last-write-wins and the timestamp comes from the Firestore server.
For apps where Firestore's document model fits the data and last-write-wins conflict resolution is acceptable, this is the fastest path to offline capability.
AWS Amplify DataStore gives offline sync for data models defined by GraphQL. Delta sync and automatic conflict detection are built in to DataStore and it has configurable conflict resolution strategies. The service works with AWS AppSync for the cloud backend integration.
PouchDB + CouchDB implements the CouchDB replication protocol, providing bidirectional sync with conflict detection.
With its multiversion concurrency control (MVCC), CouchDB keeps all conflicting versions of a document and lets applications find and resolve conflicts as per their own logic instead of throwing out losing versions.
The open-source nature of both components provides architectural flexibility.
Knowing When Offline-First Is and Is Not Appropriate
Development gets a lot of extra complexity from offline-first architecture. User benefit clearly justifies the investment in some contexts and in others it is harder to justify.
Strong candidates for offline-first:
Productivity apps where users need to access and modify their data in variable connectivity environments (notes, tasks, documents, calendar). Field service applications used in locations with poor connectivity (healthcare in remote clinics, construction site documentation, agricultural management).
Content consumption apps where users preload content for offline access (podcast apps, reading apps, music apps). Messaging applications where sending a message while briefly offline should not fail.
Poor candidates for offline-first:
Applications that need strict real-time consistency where showing stale data would cause harm fall into financial trading and inventory management that can oversell. There are applications where data is too large to store locally and those are video streaming and large-scale analytics.
Real-time multiplayer apps where synchronization latency is itself the failure also fit poorly. So do apps that security rules stop from storing sensitive data on devices (some compliance contexts demand that data stay on servers only).
The hybrid approach. This method works best for most complex apps. It is offline-first for the main user workflows and the app tells users clearly via the UI when connectivity is needed for particular features. A banking app can store account summaries and transaction history locally for quick access but transfers and payments require a connection.
How offline-first design works with performance optimization becomes clear and shows a natural fit. Local data access is intrinsically faster than network access so offline-first systems are also performance-first systems for common operations.
What Research Shows About Offline-First Architecture Outcomes
Important findings on both the user experience benefits and the technical complexity costs of this architectural approach have come out of the academic and industry literature on offline-first design.
Martin Kleppmann, researcher at the University of Cambridge Department of Computer Science and Technology, published the foundational theoretical framework for offline-first applications in "Local-First Software: You Own Your Data, in Spite of the Cloud" (Ink & Switch, 2019), which has become the most widely cited document in the offline-first development community.[1]
Kleppmann and colleagues (Adam Wiggins, Peter van Hardenberg, Mark McGranaghan) defined seven ideals for local-first software: fast response to user interaction, multi-device accessibility, offline functionality, seamless collaboration, longevity of user data, user privacy, and user control over their data.
User perception research that set up human perception of "instant" at below 100 milliseconds and "connected to action" at below 1,000 milliseconds gave theoretical support to the argument for local-first. Those are thresholds that server-dependent designs often miss during a degraded network and local-first was backed up by that research.
Kleppmann's subsequent work at Cambridge has focused on CRDTs as the enabling technology for conflict-free offline-first collaboration, with his Automerge library providing a practical implementation that has been adopted by dozens of production applications.[4]
Published by researchers Irene Zhang and colleagues in "Building Consistent Transactions with Inconsistent Replication" in ACM Transactions on Computer Systems (2018), research from the University of Washington's Paul G. Allen School of Computer Science looked at how different synchronization architectures perform practically for offline-first mobile apps.
Three synchronization models (last-write-wins, operational transformation and CRDTs) were looked at in simulated mobile environments that followed connectivity patterns based on actual cellular network logs from New York City and Seattle. Across the three synchronization models, conflict rates, how fast conflicts get resolved and data loss events were measured.
Google Docs and the first generation of collaborative tools use operational transformation as their working rule. When 5 or more editors work offline at once in high-contention settings, conflict resolution failed 1.2 to 3.8 percent of the time according to the operational transformation model.
There were no conflict resolution failures in equivalent scenarios for CRDT-based synchronization and there was 23% more data throughput than with operational transformation because of lower coordination overhead.
For the first time, the study gave a systematic empirical comparison of conflict resolution strategies in mobile settings that had realistic connectivity patterns. It set up CRDT advantages in particular for mobile scenarios instead of just in theoretical terms.
Patterns of connectivity gap that support the offline-first design argument with measured data can be found in Qualcomm's Mobile Network Connectivity Research Study of 2022. The study draws on 3.2 million anonymized device-hours of network monitoring from 15 US and European cities.
Complete connectivity loss, meaning no cellular or WiFi signal, hit typical smartphone users for an average of 11.7 minutes daily according to the study. It did not come as a single outage but as an accumulation of gaps that averaged 45 seconds each.
When partial connectivity (signal present but below what is needed for reliable TCP connections) was present, it brought an extra 23 minutes a day of degraded connectivity on average. Transit environments were the biggest source: 34 percent of app usage for commuters on subways and commuter rail happened during degraded connectivity.
Offline-capable design is not an edge case optimization for exotic deployment environments as the Qualcomm data showed. It is relevant to the daily lives of users in connected cities.
Any application used during commutes (productivity tools, news, communication apps) will encounter these conditions regularly.
Three countries have been studied for field research on smartphone use in low-connectivity areas. They are Tanzania, Bangladesh and Colombia. Data plans there cost a large part of household income and connectivity is less reliable than in rich markets.
Over 6 months with 240 participants, Charlotte Yapp and Lone Dirckinck-Holmfeld ran the study and found that participants restricted data-consuming app usage to times when WiFi was available only. That apps lacking offline features got used 2.4 times less often on average than functionally identical apps that had offline support.
In the studied groups, productivity apps that have offline capabilities (document editors, note-taking apps) had 67% more weekly active users than those that do not.
Offline-first design does not stay restricted to high-connectivity markets alone. The design has a much bigger effect in places where a lack of connectivity controls when people can use apps that depend on data.
Real-World Offline-First Deployments and Their Measured Impact
Organizations that put offline capabilities into production apps and measured how user behavior and business outcomes were affected have produced the most actionable data on offline-first design.
Google Maps Offline Areas. Behavioral Change at Scale (2015-2022). In 2015 came downloadable offline maps for Android from Google Maps and in 2016 they came for iOS as well. Users could download regional map areas that would work without any cellular data.
Google's published data from their Google I/O 2017 keynote stated that users in markets with unreliable connectivity (India, Indonesia, Brazil, Nigeria) who downloaded offline maps used navigation features 4.2x more frequently than equivalent users without offline maps in the same markets.
Within 12 months of its launch, the offline feature brought in a 32% rise in monthly active users in the targeted markets.
When it comes to product architecture, getting Google Maps offline to work required tackling the data management challenge that offline-first design at scale defines. A single download for a major metro area takes 1 to 3 GB and users have to manage what gets downloaded explicitly. The system also needs to monitor storage and show map data freshness indicators that say when downloaded maps were last updated.
The storage concern ("the map download will take up too much space") was what stopped people from adopting offline maps, according to Google's user research described at Google I/O 2018. Putting how much the download will take up on display before users confirm the download cut abandonment from the download process by 41%.
Google Maps helped establish transparent storage communication as a design pattern and that has become the standard way to manage offline content.
Notion's Offline Mode Rebuild: From Online-Required to Offline-Capable (2021-2022). Notion's mobile application was online-dependent through 2020 - the app required connectivity to load any content, displayed a loading spinner or error state when offline, and lost any unsaved edits if connectivity was lost during an editing session.
This architecture generated consistent user complaints in reviews, particularly from users in transit environments.
Notion's engineering team described the offline mode implementation in a technical blog post by engineer Philip Okiokio in 2022: the rebuild required replacing the app's data layer from a network-fetch-first model to a local SQLite-first model with network synchronization.
About 8 person-months went into engineering the core offline capability. Conflict resolution edge cases took an extra 4 person-months and the offline state UI (indicators, pending sync counts and sync error handling) took 2 person-months.
Weekly active usage was 28 percent higher for Notion mobile users who could go offline following launch. The biggest gains came among users in markets where average connectivity was lower. That was India by +41 percent, Brazil by +38 percent and Indonesia by +47 percent.
In just 6 months after launch, the Notion offline feature drew in more positive App Store reviews than any other feature did during that time. That shows that users see the feature change as a big quality upgrade.
One of the few published engineering-effort-to-user-impact ratios for an offline capability comes from this case and it is useful for teams deciding whether to invest.
Medic Mobile: Offline-First Healthcare in Low-Connectivity Environments (2012-2022). Medic Mobile (now CHT as Community Health Toolkit) creates open-source mobile health tools that community health workers in 40+ countries use. Patient record-keeping, disease surveillance and supply chain tracking are the main purposes.
Usage data from a decade was published by the organization in its 2022 impact report. It gave one of the most extensive longitudinal datasets on how offline-first applications perform in their intended environment.
Of the 17 countries where Medic Mobile followed connectivity status together with usage data, health workers averaged 4.7 hours a day using the offline-capable app and 62% of that usage took place without network connectivity.
Without needing connectivity, providers could look at full patient history and communities that used the offline-capable digital system for patient records did 34 percent better at tracking how patients adhered to treatment (as measured against communities using paper systems).
Once connectivity returned, data entry took 28 percent less time. Bulk sync became possible instead of sending records one by one and error reporting dropped by 19 percent because local data validation caught mistakes at entry instead of waiting until submission.
Technical architecture documentation for Medic Mobile appears on its GitHub repository. The documentation shows a CouchDB/PouchDB synchronization model that deals with sync conflicts by using a domain-specific resolution approach (clinical data goes by later timestamps winning but supply chain counts use earlier timestamps to avoid double-counting).
Offline-first design gives measurable operational results and not just better user satisfaction in places where the connectivity assumptions behind most mobile development fail to hold. The Medic Mobile case offers the strongest available evidence for this.
Testing Offline-First Behavior
Offline scenarios bring about a combinatorial explosion of test cases that online-first apps never run into. Testing has to be deliberate and systematic.
Airplane mode testing. All the main offline functions get tested here. Turn off everything that connects, go through full core user workflows, confirm that all core features work and ensure that features that only work offline are communicated clearly.
Intermittent connectivity testing. This tests whether sync recovery works right by starting a sync, cutting off connectivity in the middle of it, then bringing it back up and making sure the sync finishes correctly with no data lost or duplicated.
Conflict testing. To do this, create real conflicts by changing the same data in different ways on two devices when both are offline and then reconnect both devices and check that conflict resolution gives the result expected.
Long offline testing. This confirms that apps which stay offline for long periods (simulating this by turning off sync without turning off the app) manage schema migrations, big sync backlogs and data freshness as they should.
Platform testing tools that cover network simulation are Xcode Network Link Conditioner for iOS and controllable connectivity through Android Emulator network settings. Tools for intercepting and manipulating network traffic are Charles Proxy and mitmproxy and web apps get web application network throttling from browser DevTools.
Sources & Further Reading
- Kleppmann, Martin. "Local-First Software: You Own Your Data, in Spite of the Cloud." Ink & Switch, 2019.
- Shapiro, Marc et al. "Conflict-Free Replicated Data Types." INRIA Research Report RR-7506, 2011. View source
- Google. "Cloud Firestore Enable Offline Data." Firebase Documentation.
- Automerge Project. "Automerge CRDT Library." automerge.org.
- Yjs Documentation. "Yjs: A CRDT Framework." docs.yjs.dev. View source
- PouchDB. "PouchDB Developer Guide." pouchdb.com. View source
- MongoDB. "Atlas Device Sync Documentation." MongoDB Docs.
- Google. "Room Persistence Library." Android Developers.
- Feyerke, Alex. "Say Hello to Offline First." Hoodie Blog, 2013. View source
- Kleppmann, Martin. Designing Data-Intensive Applications. O'Reilly Media, 2017.
- Nolan, Nolan. "Offline-First Web Development." CSS-Tricks.
- Apple Inc. "Background Tasks Framework." Apple Developer Documentation.








