PowerSync Overview

Plug-in Offline-First for Apps with SQL Backends

PowerSync is a service that keeps backend SQL databases in sync with on-device databases embedded in an SDK.

The service and client SDK operate in unison to keep client-side SQLite databases in sync with a server-side SQL database.

An easy way to get started with PowerSync is by using it with Supabase — please see our Supabase integration guide. For a general overview of how PowerSync works, continue reading. For other quick start options, see Quickstart Guide.

Supported databases and available SDKs

PowerSync currently supports Postgres backend databases and has client SDKs available for:

See our Examples / Demo Apps for reference implementations and example code snippets.

PowerSync is designed to support any combination of backend database and frontend software framework, with additional backend database support and SDKs on the way.


Before using PowerSync, an application's existing architecture may look like this:

The PowerSync service uses database native credentials and authenticates directly against a Postgres database using the configured credentials:

When the PowerSync client SDK is included in an app project, it uses existing app-to-backend authentication to retrieve a JSON Web Token (JWT):

The PowerSync client SDK uses the retrieved JWT to authenticate directly against the PowerSync service:

Reading and Writing Data

From the client-side perspective, there are two data flow paths:

  • reading data from the server or downloading data

  • writing changes back to the server, or uploading data.

Reading Data

App clients always read data from a local database. The local database is asynchronously hydrated from the PowerSync service.

A developer configures sync rules for their PowerSync instance to govern which data is synced to which users. The PowerSync service connects directly to Postgres databases and uses the Postgres Write-Ahead-Log (WAL) to hydrate dynamic and contextual data partitions, called sync buckets. Sync buckets are used to partition data according to the configured sync rules. (In most use cases, only a subset of data is required in a client's database and not a copy of the entire Postgres database.)

The local SQLite database embedded in the PowerSync SDK is automatically kept in sync with the backend SQL database, based on the sync rules configured by the developer:

Writing Data

Client-side data modifications, namely updates, deletes and inserts, are persisted in the embedded database as well as stored in an upload queue. The upload queue is a blocking FIFO queue that gets processed when network connectivity is available. Each entry in the queue is processed by writing the entry to the developer's existing backend application API. This is to ensure that existing backend business logic is honored when uploading data changes. For more information, see the section on integrating with your backend.

Last updated