Overview
If you’re following the Implementation Outline: after configuring your database, connecting your PowerSync instance to it, and defining basic Sync Rules, the next step is to include the appropriate PowerSync Client SDK package in your app project. On a high level, this involves the following steps:- Install the Client SDK (see below)
-
Define your Client-Side Schema
- The PowerSync Client SDKs expose a managed SQLite database that your app can read from and write to. The client-side schema refers to the schema for that SQLite database.
-
Instantiate the PowerSync Database
- This instantiates the aforemention managed SQLite database.
-
Integrate with your Backend [Optional]
- This allows write operations on the client-side SQLite database to be uploaded to your backend and applied to your backend database.
- Integrating with your backend is also part of authentication integration. For initial development and testing, you can use Development Tokens, and then implement proper authentication integration at a later time.
Installing the Client SDK
PowerSync offers a variety of client SDKs. Please see the steps based on your app language and framework:Flutter
Flutter
Add the PowerSync pub.dev package to your project:See the full SDK reference for further details and getting started instructions:
Flutter
React Native & Expo
React Native & Expo
Add the PowerSync React Native NPM package to your project:Choose between:OP-SQLite (Recommended)PowerSync OP-SQLite offers:React Native Quick SQLiteThe @journeyapps/react-native-quick-sqlite package is the original database adapter for React Native and therefore more battle-tested in production environments.See the full SDK reference for further details and getting started instructions:
Install peer dependencies
PowerSync requires a SQLite database adapter.Using Expo Go? Our native database adapters listed below (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go’s sandbox environment. To run PowerSync with Expo Go install our JavaScript-based adapter
@powersync/adapter-sql-js
instead. See details here.- Built-in encryption support via SQLCipher
- Smoother transition to React Native’s New Architecture
Polyfills and additional notes:
- For async iterator support with watched queries, additional polyfills are required. See the Babel plugins section in the README.
-
By default, this SDK connects to a PowerSync instance via WebSocket (from
@powersync/react-native@1.11.0
) or HTTP streaming (before@powersync/react-native@1.11.0
). See Developer Notes for more details on connection methods and platform-specific requirements. - When using the OP-SQLite package, we recommend adding this metro config to avoid build issues.
React Native & Expo
JavaScript Web
JavaScript Web
Add the PowerSync Web NPM package to your project:Required peer dependenciesThis SDK currently requires See the full SDK reference for further details and getting started instructions:
@journeyapps/wa-sqlite
as a peer dependency. Install it in your app with:By default, this SDK connects to a PowerSync instance via WebSocket (from
@powersync/web@1.6.0
) or HTTP streaming (before @powersync/web@1.6.0
). See Developer Notes for more details on connection methods.JavaScript Web
Kotlin Multiplatform
Kotlin Multiplatform
Add the PowerSync SDK to your project by adding the following to your See the full SDK reference for further details and getting started instructions:
build.gradle.kts
file:CocoaPods configuration (recommended for iOS)Add the following to the The
cocoapods
config in your build.gradle.kts
:linkOnly = true
attribute and isStatic = true
framework setting ensure that the powersync-sqlite-core
binaries are statically linked.Kotlin Multiplatform
Swift
Swift
You can add the PowerSync Swift package to your project using either See the full SDK reference for further details and getting started instructions:
Package.swift
or Xcode:Swift
Node.js (Beta)
Node.js (Beta)
Add the PowerSync Node NPM package to your project:Required peer dependenciesThis SDK requires Common installation issuesThe
@powersync/better-sqlite3
as a peer dependency:@powersync/better-sqlite
package requires native compilation, which depends on certain system tools. This compilation process is handled by node-gyp
and may fail if required dependencies are missing or misconfigured.Refer to the PowerSync Node package README for more details.See the full SDK reference for further details and getting started instructions:Node.js (client)
.NET (Alpha)
.NET (Alpha)
For desktop/server/binary use-cases and WPF, add the
PowerSync.Common
NuGet package to your project:Add
--prerelease
while this package is in alpha.