Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

powersync-js

> 数据库
Open source

SDK that enables local-first and real-time reactive apps with embedded SQLite for JavaScript clients, including React Native and Web

701 stars0 likes2 views
WebsiteGitHub

About

SDK that enables local-first and real-time reactive apps with embedded SQLite for JavaScript clients, including React Native and Web

PowerSync keeps a client-side SQLite database in sync with your backend database. Changes appear across users and devices in real-time, user interactions feel instant and your app continues to work even when offline. Supports Postgres, MongoDB, MySQL, and SQL Server. Client SDKs are available for a wide range of environments including web, mobile, desktop, headless and embedded.

PowerSync JavaScript SDKs

powersync-js is the monorepo for PowerSync JavaScript SDKs.

Monorepo Structure: Packages

  • packages/react-native

    • React Native SDK implementation (extension of packages/common)
  • packages/web

    • JS Web SDK implementation (extension of packages/common)
  • packages/node

    • Node.js client implementation (extension of packages/common)
  • packages/react

    • React integration for PowerSync.
  • packages/vue

    • Vue composables for PowerSync.
  • packages/tanstack-query

    • TanStack Query integration for React.
  • packages/attachments

    • Attachments helper package for React Native and JavaScript/TypeScript projects (deprecated).
  • packages/attachments-storage-react-native

    • React Native file system storage adapters for PowerSync attachments (alpha).
  • packages/kysely-driver

    • Kysely integration (ORM) for React Native and JavaScript/TypeScript projects.
  • packages/drizzle-driver

    • Drizzle integration (ORM) for React Native and JavaScript/TypeScript projects.
  • packages/common

    • Shared package: TypeScript implementation of a PowerSync database connector, streaming sync bucket implementation and attachment utilities.

Demo Apps / Example Projects

Demo applications are located in the demos/ directory. Also see our Demo Apps / Example Projects gallery which lists all projects by the backend and client-side framework they use.

React Native

  • demos/react-native-supabase-todolist: A React Native to-do list example app using a Supabase backend.
  • demos/react-native-supabase-group-chat: A React Native group chat example app using a Supabase backend.
  • demos/react-native-supabase-background-sync: A React Native example app demonstrating background sync using PowerSync, Expo and Supabase.
  • demos/react-native-web-supabase-todolist A React Native to-do list example app using a Supabase backend that's compatible with React Native for Web.

Web

  • demos/react-supabase-todolist: A React to-do list example app using the PowerSync Web SDK and a Supabase backend.

  • demos/react-supabase-todolist-tanstackdb: A React to-do list example app using the PowerSync Web SDK and a Supabase backend + TanStackDB collections.

  • demos/react-supabase-time-based-sync: A React demo using Sync Streams to subscribe to date-filtered data dynamically, with a Supabase backend.

  • demos/react-multi-client: A React widget that illustrates how data flows from one PowerSync client to another.

  • demos/yjs-react-supabase-text-collab: A React real-time text editing collaboration example app powered by Yjs CRDTs and Tiptap, using the PowerSync Web SDK and a Supabase backend.

  • demos/vue-supabase-todolist: A Vue to-do list example app using the PowerSync Web SDK and a Supabase backend.

  • demos/angular-supabase-todolist An Angular to-do list example app using the PowerSync Web SDK and a Supabase backend.

  • demos/example-webpack: A minimal example demonstrating bundling with Webpack.

  • demos/example-vite: A minimal example demonstrating bundling with Vite.

  • demos/example-vite-encryption: A minimal example demonstrating web encryption.

  • demos/example-nextjs: An example demonstrating setup with Next.js.

Electron

  • demos/example-electron An Electron example web rendered app using the PowerSync Web SDK in the renderer process.
  • demos/example-electron-node An Electron example that runs PowerSync in the main process using the PowerSync Node.js SDK.

Capacitor

  • demos/example-capacitor A Capacitor example app using the PowerSync Web SDK.

Node

  • demos/example-node A small CLI example built using the PowerSync SDK for Node.js.

Tools

  • tools/diagnostics-app: A standalone web app that presents stats about a user's local database (incl. tables and sync buckets).

Development

This monorepo uses pnpm.

Install workspace dependencies

bash
pnpm install

Build packages

bash
pnpm build:packages

Tests

Some packages use Playwright for testing. Install Playwright dependencies with:

bash
pnpm exec playwright install-deps
pnpm exec playwright install

Versioning

Development Packages

Development packages can be published by manually triggering the release workflow. Development packages are versioned as 0.0.0-{tag}-DATETIMESTAMP.

For technical npm reasons, publishing dev and release packages needs to happen from within a single workflow. release.yml contains checks to only release dev packages when triggered by workflow_dispatch.

Production Packages

Pull requests should contain Changesets for changed packages.

Add changesets with

bash
pnpm changeset add

Merging a PR with Changesets will automatically create a PR with version bumps. That PR will be merged when releasing.

React Native Quick SQLite Development

By default, the PowerSync React Native SDK uses a fork of react-native-quick-sqlite

Testing live development changes to @journeyapps/react-native-quick-sqlite will not work with standard yarn link commands. Metro does not work well with symlinks .

The process of releasing development packages for @journeyapps/react-native-quick-sqlite for each change can be tedious and slow. A faster (and hackier) method is to use mtsl which will watch and copy the package into this workspace's node_modules.

bash
npm install -g mtsl
bash
mtsl add -s "[source path to your react-native-quick-sqlite repo folder]" -d "[this workspaces root node_modules folder]"/@journeyapps/react-native-quick-sqlite
bash
mtsl start "[the id returned from step above]"

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptlocal-firstlocal-storageofflineoffline-first

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库