# Supabase (database & auth)

Connect Supabase to give your app a real backend — a Postgres database, user authentication, and file storage — without leaving GenVibe.

## Connect Supabase

1. Open the Supabase connection in GenVibe and authorize your Supabase account.
2. Select the project you want to use.

Once connected, GenVibe can create database tables, wire up auth, and read/write data as part of your app.

## Build features that store data

Just ask. For example:

> Use Supabase to store submitted contact forms, and show them in an admin table.

> Add email/password login with Supabase so users can sign in and only see their own tasks.

GenVibe creates the necessary tables and writes the code to read and write your data.

## Database changes

When your app needs schema changes (new tables, columns), GenVibe generates the SQL and shows a confirmation/run-query modal before applying it to your connected project, then updates the app to use it.

{% hint style="warning" %}
Your data is precious. GenVibe is built to add and modify schema carefully, but always review database changes on important projects, and keep backups for production data.
{% endhint %}

## Environment variables

When Supabase is connected, GenVibe sets the right environment variables (your project URL and public key) for the framework you're using, so the app can talk to your database out of the box.

## Tips

* Connect Supabase **before** asking for data features, so GenVibe can wire them up immediately.
* Be specific about what data you want stored and who should see it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.genvibe.pro/integrations/supabase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
