Skip to content

Local-first data

Barq apps read and write local files first.

That means the app can start, show data, and accept writes without waiting for a network request.

Local-first data helps with:

  • Offline use.
  • Fast screens.
  • Fewer loading states.
  • Reliable writes during weak network.
  • Clear sync boundaries.

You can use Barq as a local database only.

When sync is enabled, Barq still writes locally first. The sync session uploads local changes and downloads server changes in the background or before open, depending on the open behavior.

Each local Barq database is a file. The path is controlled through the database config.

Synced files use the sync route and user identity to avoid collisions between users and apps.