Skip to main content
PowerSync generally assumes that you have some kind of “backend application” as part of your overall application architecture — whether it’s a backend-as-a-service (e.g. Supabase), a custom backend (e.g. Node.js, Rails, Laravel, Django, ASP.NET), some kind of serverless cloud functions (e.g. Azure Functions, AWS Lambda, Google Cloud Functions, Cloudflare Workers, etc.), or any other equivalent system that allows you to run privileged logic securely. PowerSync relies on that backend for up to two jobs: applying the mutations that clients upload, and, if you use custom authentication, generating the JWTs that clients use to connect to the PowerSync Service.

An overview of how PowerSync interacts with your backend application / API.

Processing Mutations From Clients

When your app writes to its local SQLite database, the client SDK places the mutations in an upload queue. It uploads them by calling your mutation uploader, which sends them to your write endpoint. Your write endpoint applies them to your source database (Postgres, MongoDB, MySQL, SQL Server, or Convex). This design keeps server-side validation and authorization of mutations under your control, while PowerSync itself requires minimal permissions. Write Path Overview explains how this works. To pick a setup, see Choosing Your Setup.

Authentication (Optional)

Some authentication providers already generate JWTs that PowerSync can use directly. See Authentication Setup. For others, you add code to your backend to generate the JWTs that PowerSync needs. See Custom Authentication. In both cases, your app’s authenticator returns the JWT from resolveCredentials(). The client SDK uses the JWT to authenticate with the PowerSync Service.

Backend Options

If you already have some kind of backend application as part of your stack, it’s best to use that existing backend. See Use Your Existing API. Otherwise, you have several options. This list is not exhaustive.

Reference Write Implementation

If you don’t have a write endpoint yet, you can run the reference write implementation. It’s a Node.js write endpoint for Postgres, MongoDB, MySQL, and SQL Server, and it comes with a reference uploader for each client SDK.

Custom Backend

To build a write endpoint in your own backend stack, see Build Your Own Write Endpoint. Our Example Projects page provides example custom backends (e.g. Node.js, Django, Rails, .NET, etc.)

Backend-as-a-Service / Developer Platforms

There are several backend-as-a-service developer platforms that work well with PowerSync, for example:
  • Supabase (for Postgres): Several of our demo apps demonstrate how to use Supabase as the Postgres-based backend. Supabase provides an authentication service, PostgREST data APIs, and edge functions for more custom logic. See our integration guide. To apply mutations, choose between the PostgREST route and the Edge Function route.
  • Neon (for Postgres): Similarly to Supabase, Neon provides PostgREST data APIs and an authentication service. See our integration guide.

Serverless Functions

You can use a serverless functions system like Azure Functions, AWS Lambda, Google Cloud Functions, Cloudflare Workers, Vercel Functions, Netlify Functions, Fastly Compute, Deno Deploy, etc.

Data API Services

If you will only use the backend for applying mutations and not for authentication, you can also use a data API service or API platform, such as Hasura.