Skip to main content
New Expensify is built with an offline-first architecture, allowing full functionality without an internet connection. All changes sync automatically when connectivity is restored.

Overview

Offline-first means:
  • Full Functionality: Create, edit, and view expenses offline
  • Optimistic Updates: UI updates immediately, syncs later
  • Request Queue: Network requests queued and retried automatically
  • Conflict Resolution: Automatic handling of conflicting changes
  • Cross-Platform: Consistent offline behavior on all platforms
Offline mode is not a “feature” you enable—it’s the foundation of how New Expensify works.

Architecture

Onyx: Offline-First Data Store

New Expensify uses Onyx, a custom state management library built for offline functionality:

Data Persistence

Onyx automatically persists data using:
  • Mobile: SQLite database
  • Web: IndexedDB
  • Desktop: SQLite (Electron)

Network Detection

Monitoring Connection Status

src/libs/NetworkConnection.ts

Network State

Connection Changes Tracking

src/libs/NetworkConnection.ts

Offline Functionality

Creating Expenses Offline

The UI updates immediately with optimistic data, then syncs in the background.

Optimistic Updates

Request Queue

Network requests are automatically queued when offline:
src/libs/Network/NetworkStore.ts
Requests are processed when connection is restored:

Time Synchronization

Server time skew compensation for accurate timestamps:
src/libs/NetworkConnection.ts
Usage:

Pending States

Pending Actions

Indicate what’s being synced:

UI Indicators

Offline Feedback Component

Conflict Resolution

Last Write Wins

By default, the last successful update wins:

Error Handling

Retry Failed Requests

Receipt Handling Offline

Receipts captured offline are queued for upload:
See Receipt Scanning for details on mobile receipt capture.

Force Offline Mode (Testing)

Force offline for testing:

Simulating Poor Connection

Offline Behavior by Feature

Expenses

Reports

Settings

Best Practices

For Users

1

Work Normally Offline

Continue using the app as usual—it will sync when online
2

Watch for Pending Indicators

Gray/dimmed items indicate pending sync
3

Check for Errors

Red error messages indicate sync failures
4

Retry if Needed

Tap retry on error messages if they don’t clear automatically

For Developers

1

Always Use Optimistic Updates

2

Handle Pending States in UI

3

Provide Fallback Data

4

Test Offline Scenarios

Troubleshooting

  1. Check internet connection
  2. Look for error messages on pending items
  3. Try force closing and reopening the app
  4. Check for app updates
  1. Pull to refresh on list screens
  2. Force sync:

Performance Considerations

Storage Limits

  • Mobile: ~10 MB typical, can grow larger
  • Web: IndexedDB limits vary by browser (~50MB-1GB+)
  • Desktop: No practical limit

Data Pruning

Old data is automatically pruned:

Queue Management

Next Steps

Receipt Scanning

Offline receipt capture

Push Notifications

Real-time sync notifications

iOS Platform

iOS offline behavior

Android Platform

Android offline behavior