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

# Add a Supabase backend to your 10x iOS app

> Connect a Supabase project to your 10x app to get auth, a Postgres database, and Edge Functions — all wired up automatically by the AI.

Linking Supabase gives your generated iOS app a real backend without any manual SDK setup. Once connected, the AI can write networking code that calls your Edge Functions, reads your database, and authenticates users — using your actual project credentials automatically.

<Note>
  You need an existing Supabase project before you begin. 10x does not create Supabase projects for you. You can create one for free at [supabase.com](https://supabase.com).
</Note>

## Connect your Supabase account

<Steps>
  <Step title="Open the Environment tab">
    In the preview panel on the right side of 10x, click the **Environment** tab. This is where all integrations live.
  </Step>

  <Step title="Select Supabase">
    Click the **Supabase** row in the integrations list to open the Supabase integration detail view.
  </Step>

  <Step title="Connect via OAuth">
    Click **Connect Supabase** and complete the OAuth flow. 10x will open a browser window where you authorize access to your Supabase account.
  </Step>

  <Step title="Select a project">
    After connecting, a project picker appears. Choose the Supabase project you want to link to the current 10x app.
  </Step>
</Steps>

## What happens after linking

Once your Supabase project is linked, 10x automatically populates two environment variables for your app:

| Variable            | Description                                  |
| ------------------- | -------------------------------------------- |
| `SUPABASE_URL`      | The REST API endpoint for your project       |
| `SUPABASE_ANON_KEY` | The public anon key for client-side requests |

The AI reads these keys when generating networking code, so your app references the correct project without you having to copy credentials manually.

## Managing your backend from the Backend tab

Open the **Backend** tab in the preview panel to see a live dashboard for your linked project:

* **Edge Functions** — all deployed functions, listed with their last deploy time
* **Secrets** — hosted secrets managed in Supabase, with sync status
* **Recent activity** — a log of recent function invocations and errors

<Tip>
  The Backend tab shows a status badge in the top-right corner. If it reads **Needs attention**, expand the warnings section to see exactly what requires action — for example, a secret that hasn't synced yet.
</Tip>

## Unresolved backend requirements

If the AI has planned a feature that depends on a backend capability you haven't configured yet — such as a specific Edge Function or auth provider — the Backend tab highlights it as an open issue under **Needs attention**. Resolving each item removes it from the list.

## Disconnect or switch projects

To link a different Supabase project, open the **Environment** tab, select **Supabase**, and choose a new project from the picker. Your environment variables update automatically.
