> ## Documentation Index
> Fetch the complete documentation index at: https://a5eb32f-docs-2.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://a5eb32f-docs-2.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://a5eb32f-docs-2.manicule.dev/api/mcp.
> Every agent surface: https://a5eb32f-docs-2.manicule.dev/.well-known/llms-manifest.json

# Connect a Supabase Backend (/connectors/supabase)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 756 · updated: 2026-11-25 -->
Related: [Choose and Connect Your Services](/connectors/overview.md), [Import and Sync a GitHub Repository](/connectors/github.md), [Connect and Work With GitLab](/connectors/gitlab.md), [Connect and Deploy to Vercel](/connectors/vercel.md), [Connect and Deploy to Netlify](/connectors/netlify.md), [Connect a Neon Postgres Database](/connectors/neon.md)

> Authorize Supabase and configure your Studio project to use Postgres, Auth, Storage, or Edge Functions.

Connect Supabase when you want to use managed Postgres, Auth, Storage, or Edge Functions in a Cloud Studio app. The connector authorizes BhaiCode to access the selected Supabase organization. That authorization doesn't create a database or configure your application's client credentials for you.

## Connect your organization and project

<Steps>
<Step title="Authorize Supabase">Open **Connectors** in the [BhaiCode dashboard](https://app.bhaico.de) and select **Connect** on the **Supabase** card. Complete the OAuth flow in Supabase and select the organization that owns the backend.</Step>

<Step title="Choose a Supabase project">Create or open the project in Supabase. Check that it belongs to the organization you just authorized. Record which project your development and production environments should use before you configure either one.</Step>

<Step title="Set the app's environment variables">Use the values from the Supabase project you chose. Set only the variables your code reads. For example, a client that uses the Supabase API needs the project URL and a client key, but it doesn't need a raw Postgres connection string.</Step>
</Steps>

| Variable            | Use                                                                           |
| ------------------- | ----------------------------------------------------------------------------- |
| `SUPABASE_URL`      | The Supabase project URL used by the client.                                  |
| `SUPABASE_ANON_KEY` | The legacy client key name used by existing app configuration.                |
| `DATABASE_URL`      | A Postgres connection string for code that connects directly from the server. |

## Configure and check your client

If you ask Bhai to scaffold the integration, review the generated changes for the `@supabase/supabase-js` dependency, shared client initialization, and typed database definitions. Check that the environment variable names match what the client reads before you try a query or an Auth flow.

Supabase uses row level security (RLS) policies to control which rows a client can access. Test the path your users take with the intended client role. A successful query over a privileged database connection doesn't tell you what the browser client can read.

## Check the backend before you deploy

For Auth, try signing in and confirm the signed-in user can read only the data your policies allow. For Storage, test the upload or download that the app needs with the same client credentials users will use. If either check points to the wrong project, correct the project URL and matching key together before testing again.

<Warning>Never put `DATABASE_URL`, a service-role key, or a secret key in browser code. Client-facing keys don't replace RLS policies.</Warning>

## Next

* [Use Supabase Postgres, Auth, and Storage](/databases/supabase-postgres)
* [Compare database options](/databases/overview)
