> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chartdb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Supabase Integration

> Connect your Supabase database to ChartDB with OAuth authentication and automatic schema sync

ChartDB integrates directly with [Supabase](https://supabase.com) using OAuth authentication, allowing you to import and automatically sync your Supabase PostgreSQL database schema without manually entering connection strings.

<Note>
  ChartDB only reads your database schema metadata. It does not access your actual data.
</Note>

## Key Benefits

<CardGroup cols={2}>
  <Card title="One-Click Authentication" icon="key">
    Connect with your Supabase account using OAuth - no connection strings needed
  </Card>

  <Card title="Automatic Sync" icon="rotate">
    Your schema automatically syncs every hour to stay up-to-date
  </Card>

  <Card title="No Credential Management" icon="shield-check">
    No need to manually manage or store database credentials
  </Card>

  <Card title="Live ERD Diagrams" icon="diagram-project">
    Visual diagrams that stay in sync with your Supabase database
  </Card>
</CardGroup>

***

## Connect Your Supabase Database

<Steps>
  <Step title="Create New Diagram">
    From the [ChartDB homepage](https://app.chartdb.io/), click **New Diagram** to open the diagram creation dialog.
  </Step>

  <Step title="Select Supabase Database">
    In the database selection screen, choose **Supabase** (the green lightning bolt icon), then click **Continue**.

    <Frame>
      <img src="https://mintcdn.com/buckledev/XKxoWckLLoIlStjJ/docs/images/integrations/select-supabase-database.png?fit=max&auto=format&n=XKxoWckLLoIlStjJ&q=85&s=1d6177541e0361bff04b8c9d24b25818" alt="Database selection screen with Supabase highlighted" width="2880" height="1406" data-path="docs/images/integrations/select-supabase-database.png" />
    </Frame>
  </Step>

  <Step title="Choose Cloud Platforms Connection">
    On the import method screen, select **Cloud Platforms** which shows the OAuth option with BigQuery, Snowflake, and Supabase logos.
  </Step>

  <Step title="Connect with Supabase">
    Click the **Connect with Supabase** button to initiate the OAuth flow.

    <Frame>
      <img src="https://mintcdn.com/buckledev/XKxoWckLLoIlStjJ/docs/images/integrations/connect-with-supabase-oauth.png?fit=max&auto=format&n=XKxoWckLLoIlStjJ&q=85&s=497c5c86e6ec821ecf9e096f29182d59" alt="Connect to Supabase OAuth screen" width="2882" height="1400" data-path="docs/images/integrations/connect-with-supabase-oauth.png" />
    </Frame>
  </Step>

  <Step title="Authenticate in Popup">
    A popup window will open directing you to the Supabase authentication page. Log in with your Supabase account credentials and authorize ChartDB to access your projects.

    <Info>
      Make sure popups are enabled for ChartDB in your browser.
    </Info>
  </Step>

  <Step title="Select Project and Enter Password">
    After successful authentication, you'll see a list of your Supabase projects. Select the project you want to visualize.

    Each project card shows:

    * Project name
    * Region
    * Database host

    Then enter your Supabase database password in the password field.

    <Info>
      **Where to find your password:** Click the link in the info box to go directly to your Supabase Dashboard: **Settings > Database > Database password**
    </Info>

    <Frame>
      <img src="https://mintcdn.com/buckledev/XKxoWckLLoIlStjJ/docs/images/integrations/supabase-project-password.png?fit=max&auto=format&n=XKxoWckLLoIlStjJ&q=85&s=d14f51821f665e382ab65ad041d11b74" alt="Select Supabase project and enter database password" width="2880" height="1400" data-path="docs/images/integrations/supabase-project-password.png" />
    </Frame>
  </Step>

  <Step title="Connect & Import">
    Click **Connect & Import** to start the synchronization process. You'll see a loading screen while ChartDB imports your schema metadata.
  </Step>

  <Step title="View Your Diagram">
    Once complete, you'll see a success message. ChartDB will automatically redirect you to your new diagram showing your Supabase database schema.
  </Step>
</Steps>

***

## Re-syncing Your Database

Your Supabase database automatically syncs every hour. You can also manually trigger a re-sync at any time.

### Quick Re-sync from Toolbar

<Steps>
  <Step title="Open Connection Status">
    On your diagram page, click the **Connected** button (with a green cloud icon) in the top navigation bar.
  </Step>

  <Step title="Trigger Re-sync">
    In the popup, you'll see:

    * **Database Connected** status with green checkmark
    * **Last synced** timestamp
    * **Re-sync Now** button

    Click **Re-sync Now** to fetch the latest schema from Supabase.

    <Frame>
      <img src="https://mintcdn.com/buckledev/XKxoWckLLoIlStjJ/docs/images/integrations/supabase-connection-status-resync.png?fit=max&auto=format&n=XKxoWckLLoIlStjJ&q=85&s=d298d20f3f46ef824750bb1c63e5e47c" alt="Database connection status with Re-sync Now button" width="2880" height="1404" data-path="docs/images/integrations/supabase-connection-status-resync.png" />
    </Frame>
  </Step>

  <Step title="View Updated Diagram">
    The page will reload with your updated schema.
  </Step>
</Steps>

### Full Re-sync from Database Settings

1. Click **Sync** or the database settings option from the diagram menu
2. The Supabase sync dialog will appear showing you're already connected
3. Click **Re-Sync Now** to refresh your schema

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Invalid Password Error" icon="key">
    If you see an "Invalid password" error:

    1. Go to your [Supabase Dashboard](https://supabase.com/dashboard)
    2. Navigate to your project's **Settings > Database**
    3. Copy your database password (or reset it if needed)
    4. Re-enter the correct password in ChartDB
  </Accordion>

  <Accordion title="Connection Failed" icon="plug">
    If OAuth connection fails:

    1. Ensure you're logged into Supabase
    2. Check that your Supabase project is active (not paused)
    3. Allow popups for ChartDB in your browser
    4. Try again by clicking "Connect with Supabase"
  </Accordion>

  <Accordion title="Projects Not Loading" icon="list">
    If your projects don't appear after authentication:

    1. Click **Retry** to refresh the project list
    2. Verify your Supabase account has at least one active project
    3. Check that your Supabase organization permissions allow API access
  </Accordion>
</AccordionGroup>

***

## User Flow Summary

| Step | Action                          | Screen             |
| ---- | ------------------------------- | ------------------ |
| 1    | Create New Diagram              | Homepage           |
| 2    | Select Supabase                 | Database Selection |
| 3    | Choose Cloud Platforms          | Import Method      |
| 4    | Connect with Supabase           | OAuth Connection   |
| 5    | Authenticate                    | Supabase Popup     |
| 6    | Select Project & Enter Password | Project & Password |
| 7    | Connect & Import                | Syncing            |
| 8    | View Diagram                    | Diagram Editor     |

***

## Alternative: Manual SQL Import

If you prefer not to use OAuth or need more control over the import process, you can use the manual SQL query method. See the [Supabase Import Guide](/docs/import/supabase) for instructions on running the import query directly in the Supabase SQL Editor.
