Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/vale/config/vocabularies/PowerSync/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ CloudWatch
Cocoapods
Cognito
Coolify
Convex
cron
CSQLite
Cursor
Expand Down Expand Up @@ -310,4 +311,4 @@ Yjs
Zod

# Package names
drift_sqlite_async
drift_sqlite_async
33 changes: 30 additions & 3 deletions configuration/source-db/connection.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "Source Database Connection"
description: "Connect a PowerSync Cloud instance to your Postgres, MongoDB, MySQL or SQL Server source database."
description: "Connect a PowerSync Cloud instance to your Postgres, MongoDB, MySQL, SQL Server or Convex source database."
---

import SupabaseConnection from '/snippets/supabase-database-connection.mdx';

Each database provider has their quirks when it comes to specifying connection details, so we have documented database-specific and provider-specific instructions below:

Jump to: [Postgres](#postgres-provider-specifics) | [MongoDB](#mongodb-specifics) | [MySQL](#mysql-specifics) | [SQL Server](#sql-server-specifics)
Jump to: [Postgres](#postgres-provider-specifics) | [MongoDB](#mongodb-specifics) | [MySQL](#mysql-specifics) | [SQL Server](#sql-server-specifics) | [Convex](#convex-specifics)

<Note>The below instructions are currently written for PowerSync Cloud. For self-hosted PowerSync instances, specify database connection details in the config file as documented [here](/configuration/powersync-service/self-hosted-instances#source-database-connections).</Note>

Expand Down Expand Up @@ -128,7 +128,7 @@
<Accordion title="Xata">
1. In the [PowerSync Dashboard](https://dashboard.powersync.com/), select your project and instance and go to the **Database Connections** view.
2. Click **Connect to Source Database** and ensure the **Postgres** tab is selected.
3. In your Xata dashboard, navigate to Overview -> Connect and copy the connection URI. Alternatively, use the [Xata CLI](https://xata.io/docs/cli) and run `xata branch url` to obtain the URI and copy that.

Check warning on line 131 in configuration/source-db/connection.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

configuration/source-db/connection.mdx#L131

Did you really mean 'Xata'?
4. Paste the connection details into the "**URI**" field in the PowerSync Dashboard.
5. Click **Test Connection** and fix any errors.
6. Click **Save Connection**.
Expand Down Expand Up @@ -279,4 +279,31 @@
</Info>

Also see:
- [SQL Server Source Database Setup](/configuration/source-db/setup#sql-server)
- [SQL Server Source Database Setup](/configuration/source-db/setup#sql-server)


## <Icon icon="database" iconType="solid" size={32}/> Convex Specifics

<Note>Convex support is currently in an [Open Alpha release](/resources/feature-status).</Note>

Before connecting PowerSync, add the required `powersync_checkpoints` table and mutation to your Convex deployment. See [Convex Source Database Setup](/configuration/source-db/setup#convex).

1. In the [PowerSync Dashboard](https://dashboard.powersync.com/), select your project and instance and go to **Database Connections**.
2. Click **Connect to Source Database** and ensure the **Convex** tab is selected.
3. Fill in your Convex connection details:
1. **Name** can be any name for the connection.
2. **Deployment URL** is your Convex deployment URL, for example `https://<your-deployment>.convex.cloud`.
3. **Deploy key** is the deploy key for the Convex deployment. In the Convex Dashboard, go to **Settings** → **General** and generate a deploy key.
4. **Polling interval** controls how often PowerSync polls Convex for document deltas. The default is `1000` milliseconds.
4. Click **Test Connection** and fix any errors.
5. Click **Save Connection**.

PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.

<Warning>
Convex deploy keys grant full read and write access to your Convex data. Use a deploy key for the correct environment, store it as a secret, and rotate it if it is exposed.
</Warning>

Also see:
- [Convex Source Database Setup](/configuration/source-db/setup#convex)
- [Type Mapping](/sync/types#convex-type-mapping)
Loading