# Database and Auth — Real Backends with Supabase

> Connect your own Supabase: Postgres, sign-in, storage and Edge Functions. The agent writes migrations with row-level security on every table it creates.

Canonical: https://vibely.sh/features/database
Last updated: 2026-11-23

Connect your Supabase account and pick a project. The agent designs the tables, writes migrations and row-level security, and adds sign-in and storage.

Vibely builds your app’s backend in your own Supabase project: Postgres, sign-in, file storage, realtime and Edge Functions. Connect your Supabase account, pick a project, and the agent writes the migrations and row-level security policies for you. Stripe handles payments on the web and RevenueCat handles in-app purchases on mobile.

## The parts every real app needs

Ask for a feature that needs saved data or accounts, and Vibely sets up the backend for it.

- **Postgres tables and migrations** — Tables, relationships and views, created by SQL migrations you can read in the project.
- **Row-level security by default** — Every table the agent creates gets [RLS](https://vibely.sh/glossary/row-level-security) and policies in the same migration, so one user’s rows aren’t served to another.
- **Sign-in** — Email and password, magic links, and Google, Apple or Microsoft sign-in through Supabase Auth, including Sign in with Apple on iOS.
- **File storage** — Uploads such as avatars, photos and documents, stored in your Supabase project with access rules.
- **Realtime and Edge Functions** — Live updates when rows change, plus [server-side code](https://vibely.sh/glossary/supabase-edge-function) for webhooks, scheduled jobs and calls that need a secret key.
- **Encrypted secrets** — Vibely asks for API keys in the editor and stores them encrypted, never in the chat or your code.

## How it works with your data

- **Ask, and the schema follows** — “Let signed-in people save their favourite drinks” becomes a migration with the table, row-level security and the policies, applied to your project.
- **Keys go in a secret, not the chat** — When Stripe or another service needs a key, Vibely opens a secret prompt. Paste the value there and it’s saved encrypted to the project.
- **Data protected by policies, not screens** — Access rules live in the database, so hiding a button is never the only thing between a visitor and someone else’s data. After each migration Vibely checks for tables left open. [Scan your app for security issues](https://vibely.sh/features/security)
- **It’s your Supabase: you own the data** — The project lives in your Supabase organization. Vibely connects on your behalf to run migrations and deploy functions; the data stays in your account. [Set up the Supabase connector](https://vibely.sh/connectors/supabase)

## Charge for it

Payments use the same backend: subscriptions and checkout on the web, in-app purchases on mobile.

- **Stripe on the web** — Give Vibely your Stripe key (a test key while you build) and ask for checkout or a subscription. The app checks each customer’s status, so you don’t need a webhook to launch. [Add Stripe Checkout, step by step](https://vibely.sh/guides/how-to-add-stripe-checkout)
- **RevenueCat on mobile** — For iOS and Android apps, RevenueCat handles in-app purchases and subscriptions from the App Store and Google Play, with a paywall the agent builds. [Set up the RevenueCat connector](https://vibely.sh/connectors/revenuecat)

## The connectors behind it

- [Supabase](https://vibely.sh/connectors/supabase) — Database, sign-in, storage, realtime and Edge Functions.
- [Stripe](https://vibely.sh/connectors/stripe) — Checkout and subscriptions on the web.
- [RevenueCat](https://vibely.sh/connectors/revenuecat) — In-app purchases in iOS and Android apps.

## More resources

- [Supabase](https://docs.vibely.sh/integrations/supabase) — Connect your account, link a project and what the agent can do.
- [Authentication](https://docs.vibely.sh/features/backend/auth) — Sign-in methods, redirect URLs and managing users.
- [Secrets](https://docs.vibely.sh/features/backend/secrets) — How keys are stored and reach your Edge Functions.
- [Payments](https://docs.vibely.sh/features/grow/payments) — Stripe on the web and RevenueCat on mobile.

## Plan availability

- All plans: connect your own Supabase project.
- RevenueCat in-app purchases take payments once a native app is in a store, and store publishing is on paid plans.

## Frequently asked questions

### Whose database is it?

Yours. The backend is a normal Supabase project in your own Supabase organization, on your own Supabase plan, and Supabase bills you directly. Open it in the Supabase dashboard, query it, back it up, or keep using it if you leave Vibely.

### Can Vibely create the Supabase project for me?

No. Create the project at supabase.com, then connect your Supabase account in Vibely and pick it. Until you do, the agent keeps building on mock data so you can see the feature first.

### Is my data protected?

Every table the agent creates gets row-level security and policies in the same migration, and Vibely checks afterwards for tables with it turned off. You can also run the security scan for a full check.

### Where do API keys go?

Into a secret, not the chat. When a feature needs a key, Vibely asks for it in the editor. Server-only values go to your Supabase project’s Edge Function secrets and are never written into your code.

## Related

- [Build a SaaS MVP](https://vibely.sh/use-cases/saas-mvp) - Sign-in, a database and billing in one project.
- [Security scans](https://vibely.sh/features/security) - Check row-level security and database functions.
- [Vibely AI](https://vibely.sh/features/vibely-ai) - Add AI features without a provider key.
- [Publishing](https://vibely.sh/features/publishing) - Put the app and its backend live in one click.
