KBAISE/ for lovable
Library
Docs

Connect to Supabase

about 10 minBuildingchecked 2h agoOfficial page
The short version

You can connect your Lovable project to your own Supabase account to manage your app's backend, including its database, user logins, and file storage. This gives you direct control over your backend infrastructure and billing.

This is for teams who want full ownership and direct management of their app's backend using their own Supabase account.

Do this, in order

  1. 1

    Sign up for a Supabase account and create a Supabase project, or identify an existing one you want to use.

    You need a Supabase account and project to connect to Lovable. The free tier is enough to get started.

  2. 2

    If you are a workspace owner or admin, link your Supabase organization to your Lovable workspace.

    This makes your Supabase projects available for connection by anyone in your Lovable workspace. You can do this from the 'Connectors' page, the 'Cloud' view in a project, or when creating a new project.

  3. 3

    Connect your Lovable project to a specific Supabase project.

    This tells Lovable which Supabase project to use as your app's backend. You can do this when creating a new project or from the 'More → Cloud' menu in an existing project.

  4. 4

    Verify the connection in the 'Cloud' view.

    This confirms that your Lovable project is successfully linked to your Supabase project, and you can now prompt Lovable to build backend features.

Paste this into your project

Connect my Lovable project to my Supabase project. I want to use my own Supabase account for the database, authentication, and storage. I have already linked my Supabase organization to my Lovable workspace.

Words decoded

Backend
The parts of your app that run on a server, handling things like storing data, managing user accounts, and running special code, rather than what users see directly.
Database schema
The blueprint or structure of your database, defining how your data is organized into tables, columns, and relationships.
Migrations
Changes made to your database's structure over time, like adding new tables or columns, which are carefully managed to keep your data consistent.
Edge functions
Small pieces of code that run on servers close to your users, handling specific tasks like sending emails or processing payments, without you needing to manage a whole server.
UI
User Interface, which is everything a user sees and interacts with on your app, like buttons, text, and images.
Authentication (Auth)
The process of verifying a user's identity, usually through a login system with a username and password or social media accounts.
Storage buckets
Digital containers for organizing and storing files like images, videos, or documents in the cloud.
Real-time subscriptions
A feature that allows your app to instantly receive updates whenever data changes, like new messages appearing in a chat without refreshing the page.
Row Level Security (RLS)
A security feature in a database that controls which users can see or change specific rows of data, ensuring they only access what they're allowed to.

Where people get stuck

  • Do not expect an automatic way to switch between Lovable's built-in backend and your own Supabase project; plan your backend choice early.
  • Do not forget to enable Row Level Security (RLS) policies on all database tables before going live, as missing RLS is a common security vulnerability.
  • Do not try to link a Supabase organization if you are not a workspace owner or admin in Lovable, as you won't have the necessary permissions.
  • Do not confuse Lovable's billing with Supabase's billing; they are separate, and you will be billed by Supabase for your backend usage.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.