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

# Add a backend

> Give your project a database, sign-in, file storage and functions.

A backend lets your app keep data, sign people in, store files and run code on a server. Polymet sets it up for you on Supabase, and the Polymet Agent builds on it from your prompts.

![The Backend view before it is enabled, with the four features and the Enable backend integration button](https://mintcdn.com/polymet/TfIzLh80_L4bW9xQ/images/docs/backend/enable-backend.png?fit=max\&auto=format\&n=TfIzLh80_L4bW9xQ\&q=85\&s=b93fdf828c3013faf46171ee78cb2a72)

## What you get

| Part | What it does in your app |
| - | - |
| **Postgres database** | Tables that keep your app's data between visits |
| **User authentication** | Sign-up and log-in for the people who use your app |
| **File storage** | A place for uploads like photos and documents |
| **Edge functions** | Code that runs on a server, for work the browser should not do, like calling a payment API |

You do not need a separate account. Polymet creates and runs the backend for you, and you manage it from the **Backend** view inside your project.

## Enable it yourself

1. Open your project.
2. In the switch at the top of the screen, click **Backend**.
3. Click **Enable backend integration**. It takes about a minute.
4. When it is ready, the Backend view opens on **Database**.

## Or let the agent do it

Describe something that needs a backend, and the agent sets one up on its own:

```text theme={null}
Make the todo list save to a database, so each person sees only their own todos after they log in.
```

In the chat you will see **Setting up backend integration**, then **Completed backend integration setup**, and the agent goes on building.

## Things to know

* One project has one backend. Every branch of the project uses the same one, so changes that touch the live backend (applying table changes, putting functions live, setting secrets) run only on the default branch. See [Manage your data](https://docs.polymet.ai/backend/manage.md).
* If setup fails you will see **Backend setup failed**. Refresh the page and try again, or click **Contact support**.
* If the Backend view shows **Couldn't load backend integration**, click **Retry**.

## Related

* [Manage your data](https://docs.polymet.ai/backend/manage.md) — see your tables, users and logs, and what the agent asks before it changes them
* [Secrets and outside APIs](https://docs.polymet.ai/backend/secrets-and-apis.md) — store an API key and call a payment or email service
* [Branches](https://docs.polymet.ai/team/branches.md) — why live backend changes happen on the default branch


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.