# Supabase

> This page is about FlutterFlow (the app builder you use by describing your app), not FlutterFlow Studio.

URL: https://docs.flutterflow.io/ffx/supabase

Connect your Supabase organization, then ask the agent to build your app on your own Supabase project's database, sign-in and storage.

Use Supabase to build your app on your own Supabase project, with its database, sign-in and storage. To start, sign in with Supabase and pick the organization that holds your projects.

## Connect Supabase {#connect-supabase}

Only a project owner can connect Supabase to your app. If you're a project owner, connect Supabase as a [connection](https://docs.flutterflow.io/ffx/glossary#backend-and-data):

1. Open **Project Settings › Connections**, and then turn on the switch for **Supabase**.
2. In the **Connect Supabase** dialog, select **Sign in with Supabase**.
3. In the tab that opens, sign in to Supabase, and then pick the organization to share.

For more about connecting, see [Connect a service](https://docs.flutterflow.io/ffx/connect-a-service).

## Chat connection {#chat-connections}

Supabase gives the agent's database tools a sign-in of their own, so you also connect Supabase as one of your own accounts in **Account › Chat connections**. The agent builds your tables with that account, in threads that you start. When you sign in there, pick the same organization as in **Project Settings › Connections**. See [Tools for the agent](https://docs.flutterflow.io/ffx/agent-tools).

## What to ask

If you're an owner or developer of the app, you can start a request from Supabase's settings. Click **Supabase options** on the **Supabase** card in **Project Settings › Connections**, select **Settings**, and then click **Add to my app**. A new thread opens with "Add Supabase to my app." filled in. Finish the request with what you want, and then send it.

> Example request: "Add Supabase to my app. Use it for email and password sign-in, and save each person's notes in a table that only they can read and change."

> Example request: "Let people add a profile photo, and keep the photos in Supabase storage so that only the person who added a photo can replace it."

## One project for everything {#one-project}

Your threads, the preview and your phone builds all use the same Supabase project. A thread doesn't get its own copy, so a change that the agent makes to the database applies to the project at once, and the preview shows the project's real records.

## Agent questions {#what-the-agent-may-ask-you}

If Supabase isn't connected, the agent asks you, in a card above the message box, to connect Supabase to your app and to connect your own Supabase account. A project owner can connect both from the card. Anyone else can connect only their own account. When your organization has more than one project, the agent asks which one to use. See [Answer the agent](https://docs.flutterflow.io/ffx/answer-the-agent).

Only an owner of your app can have the agent change the project's sign-in settings or create the key that your app ships with, from a thread that the owner started.

## Review {#check-the-result}

After the agent finishes, read the turn's [**Summary**](https://docs.flutterflow.io/ffx/what-changed#summary) and review its [**Changes**](https://docs.flutterflow.io/ffx/what-changed#changes-tab). Check the affected screens in **Screens**, and try sign-in and your data in **Preview**.

In the preview, email and password sign-in works, but social sign-in and sign-in links sent by email don't finish. The Supabase page in **Project Settings › Connections** shows this as **Partly works in the preview**.

## Push {#push-it}

When sign-in and your data work, [push the changes to your app](https://docs.flutterflow.io/ffx/push).

## Next steps

- To reconnect or disconnect Supabase, see [Manage connections](https://docs.flutterflow.io/ffx/manage-connections).
- For how connections work and when the agent asks first, see [How connections work](https://docs.flutterflow.io/ffx/connections).

## Troubleshooting {#if-something-goes-wrong}

For a sign-in that didn't finish or a connection that needs attention, see [Troubleshoot connections](https://docs.flutterflow.io/ffx/troubleshoot-connections).
