# Supabase

Use Supabase for auth, database and server functions.

### Source Not Supported

PipelineStatus::DEMUXER_ERROR_COULD_NOT_PARSE

## [What is Supabase](/content/docs/integrations/supabase#what-is-supabase/index.html)

Supabase is an open-source backend platform that offers auth, a PostgreSQL database, edge functions, and more—all with a generous free tier. It's a great choice for quickly launching and scaling new projects.

## [Setup](/content/docs/integrations/supabase#setup/index.html)

Connecting to Supabase only takes a couple of minutes—and even faster if you're already familiar with it.

### [Connecting to Supabase](/content/docs/integrations/supabase#connecting-to-supabase/index.html)

When you chat in Dyad and request a backend-related feature, Dyad will ask if you’d like to connect to Supabase. Click the button, and you’ll be taken to your app’s details page where you’ll see a **Connect Supabase** button that looks like this:

Clicking **Connect Supabase** opens your browser and prompts you to review the permissions you want to grant Dyad. Choose the Supabase organization you’d like to connect.

Only you can access your Supabase resources through Dyad. Your access token is securely stored locally on your computer.

After submitting your selection on Supabase’s site, you’ll be redirected back to Dyad. The Dyad app should automatically reopen. If it doesn’t, click the button on the site to reopen it manually. Once that’s done, your Supabase connection is complete.

### [Selecting a Supabase Project](/content/docs/integrations/supabase#selecting-a-supabase-project/index.html)

For each Dyad app you want to use with Supabase, you’ll need to choose a Supabase project. While you _can_ reuse the same project across multiple apps, it’s usually simpler and safer to create a separate project for each one.

## [Using Supabase](/content/docs/integrations/supabase#using-supabase/index.html)

Once setup is complete, you’re ready to use Supabase in your Dyad app! Just start chatting—Dyad will handle Auth, Database, and Server Functions using Supabase.

### [Auth](/content/docs/integrations/supabase#auth/index.html)

[Supabase Auth](https://supabase.com/docs/guides/auth) is straightforward, especially with the default email/password method. You can ask Dyad to add authentication like this:

> Add auth and make users login

By default, Supabase requires email confirmation when users sign up. You can disable this in your Supabase dashboard settings.

### [Database](/content/docs/integrations/supabase#database/index.html)

[Supabase Database](https://supabase.com/docs/guides/database) lets you store and manage data. It also supports [Row-Level Security (RLS)](https://supabase.com/docs/guides/database/postgres/row-level-security), which allows secure, fine-grained access directly from the browser (e.g., your Dyad app) based on customizable policies.

Dyad usually generates reasonable default RLS policies, but you should review and adjust them to fit your specific needs.

### [Server Functions](/content/docs/integrations/supabase#server-functions/index.html)

[Supabase Edge Functions](https://supabase.com/docs/guides/functions)—also referred to as Server Functions—run on Supabase's servers rather than in the browser. Think of them as remote functions you can easily call from your app.

They’re especially useful for tasks requiring private API keys (like calling the OpenAI API) because they keep sensitive keys out of the browser, avoiding common security issues.

### [Other Features](/content/docs/integrations/supabase#other-features/index.html)

Supabase offers many features beyond those listed here. While Dyad’s integration hasn’t been tested with all of them, some may still work. If you encounter any issues, please [let us know](/content/docs/help/getting-help.mdx#report-a-bug/index.html).

## [Troubleshooting](/content/docs/integrations/supabase#troubleshooting/index.html)

### [No publishable keys](/content/docs/integrations/supabase#no-publishable-keys/index.html)

If you get an error message like "No publishable key found for project", this usually means you are not connected to the right Supabase account and organization. Go to the **Settings** tab and click **Disconnect Supabase** and then re-connect to Supabase from one of your apps using Supabase. Make sure you sign in with the right Supabase account and select the right Supabase organization in the authorization dialog.
