Patterns icon
Pattern guide

Local First

Design tools that work offline and sync when possible.

Intent

Ensure workflows function offline or in constrained networks.

When to use

  • Field work or unreliable connectivity is expected.
  • Latency-sensitive tasks need local access.
  • Data capture must continue during outages.

Core mechanics

  • Store data locally first.
  • Queue changes for later sync.
  • Resolve conflicts during sync.

Implementation checklist

  1. Define local data schema and storage.
  2. Implement a sync queue with retries.
  3. Define conflict resolution rules.
  4. Provide export/import paths.
  5. Log sync status and errors.

Failure modes and mitigations

  • Conflicting edits -> define precedence or merge rules.
  • Data loss -> add local backups.
  • Sync storms -> throttle and batch updates.

Observability and validation

  • Pending changes and sync status.
  • Conflict counts and resolution outcomes.

Artifacts

  • Local data schema.
  • Sync log and status report.
Seen in production

Seen in production as

Atlas project

privateGPT

Expose a private, extensible RAG platform that works offline and keeps data inside the execution environment. Ingest documents from a local …

Atlas project

PrivateGPTConf

Package the steps and configuration needed to get a local PrivateGPT instance running with custom documents. Install prerequisites and clone …

Atlas project

PrivateGPTConf/env/default

Ship a known-good PrivateGPT configuration snapshot that the setup scripts can copy into a local installation. Provide default settings.yaml …

Related

Related patterns