When using PowerSync, your app backend is responsible for the following:

  1. Authenticating app users
  2. Generating JWTs that allows the PowerSync Client SDK to authenticate users against the server-side PowerSync Service.
  3. Writing client-side changes to the backend database (Postgres, MongoDB or MySQL)

An overview of how PowerSync interacts with your backend application.

Authentication

General authentication for your app users is outside the scope of PowerSync. A service such as Auth0 or Clerk may be used, or any other authentication system.

Once a user is authenticated against your app backend, your app backend needs to generate a JWT which can be used by PowerSync Client SDK to authenticate the user against the PowerSync Service.

See Authentication Setup for details.

Backend Implementation Examples

See our Example Projects page for examples of custom backend implementations (e.g. Django, Node.js, etc.)

For Postgres developers, using Supabase is an easy alternative to a custom backend. Several of our demo apps demonstrate how to use Supabase as the Postgres backend.

Hosted/Managed Option for MongoDB

For users using MongoDB as a source backend database, an alternative option to running your own backend is to use CloudCode, a serverless cloud functions environment provided by us. We have a template that you can use as a turnkey starting point. See our documentation here.