# A backend for Lovable apps

> Lovable apps run on a standard Postgres backend. Scribase serves the same Auth, REST, Storage and Realtime API: change two env vars, flat price, full export.

Source: https://scribase.com/for/lovable-backend

Lovable generates React apps that talk to their backend through a standard JavaScript client. That client only needs a URL and an anon key, and Scribase answers on the same /auth/v1, /rest/v1, /storage/v1, /realtime/v1, and /functions/v1 paths. So the code Lovable wrote keeps working; what changes is the bill, the ability to preview every change on its own branch, and a one-command export when the app outgrows its first home.

## What this audience is building

- Run the app Lovable generated without rewriting its data layer
- Stop a prototype from turning into an unpredictable monthly bill
- A safe place to test schema changes before users see them

## How Scribase meets each need

**Same client, new URL** — Sync the Lovable project to GitHub, then set the backend URL and anon key variables your project uses to your Scribase environment. This is a code-level switch, not a toggle in Lovable.

**Bring the data with you** — If the app already has users on a hosted Postgres project, scribase import moves schema, data, RLS policies, storage, and auth users with their password hashes, so nobody resets a password.

**Flat price, hard caps** — A generated app can be chatty. Scribase has no per-request or per-egress lines: each project has hard caps at a flat price per project, and a signed usage webhook fires at 80 percent of a cap before anything is cut off.

_# .env in the synced Lovable repo_

```
VITE_SUPABASE_URL=<environment URL from the environment page>
VITE_SUPABASE_ANON_KEY=<anon key from the environment page>
```

## FAQ

**Do I have to change code Lovable generated?**

Usually no. The client calls stay the same; you change the project URL and anon key. Edge functions Lovable created run on Scribase functions, which use the same Deno runtime and /functions/v1 path.

**Can I keep editing in Lovable after switching?**

Yes, as long as the environment variables in the synced repository point at Scribase. Lovable’s built-in backend panel will not manage the Scribase project, so run migrations with the Scribase CLI or console instead.

## Related

- [Bring an existing project](https://scribase.com/migrate/hosted-postgres)
- [Connect your existing client](https://scribase.com/guides/connect-your-client)
- [Pricing](https://scribase.com/pricing)