Supabase
An open-source all-in-one backend toolbox built on PostgreSQL, giving you a database, user sign-in, file storage, and live updates out of the box.
On this page
What is Supabase?
Supabase is an open-source backend platform (“open-source” means its code is public so anyone can inspect or run it without getting locked in). It bundles a database (data warehouse), user sign-in, file storage, and live updates so your web pages can use them right away without building a backend from scratch.
Think of a fully equipped kitchen: the stove, fridge, water, and electricity are already hooked up, so you just bring ingredients and start cooking.
A PostgreSQL database sits at the heart of Supabase—sign-in, storage, and live updates are all built around it.
From an empty project to reading and saving data
Going from zero to a web page that safely reads and saves data usually takes four steps.
Create a project: start a project in Supabase to get its web address and a publishable pass (API key).
Make tables: create tables in the database (just like spreadsheets) and name each column, such as title, content, and author.
Read and write with the toolkit: add Supabase’s official SDK (a ready-made code helper) to your frontend to fetch or save data in a few lines.
Turn on sign-in and door locks: enable accounts and write “row-level security (RLS)” rules—locks inside the database that decide who can view, add, edit, or delete each row.
Row-level security is a real lock inside the database, not just hiding a button on the web page. If you only hide a button, someone can still call the API directly.
Read the notes table
This code reads the rows you are allowed to see from a table called notes.
- Connect to your Supabase project using its URL and publishable key.
from('notes').select('*')means: look in thenotestable and return every column (*means all) for each allowed row.- The rows come back in
data, and any problem comes back inerror—your code should check both.
This snippet can even run directly inside a web browser:
import { createClient } from '@supabase/supabase-js';
const supabase = createClient(projectUrl, publishableKey);
const { data, error } = await supabase
.from('notes')
.select('*');With row-level security (RLS) turned on, the signed-in user and your rules decide which notes come back. The publishable key can be public, but never skip the rules.
Using Supabase vs. building a backend from scratch
Both let you store data and sign users in. The difference is who builds and takes care of the plumbing.
| Compare | Using Supabase | Building your own backend |
|---|---|---|
| Database | PostgreSQL is ready the moment you create a project | You install it, back it up, and fix it yourself |
| Sign-in | Email accounts, social sign-in, and permissions are built in | You code it yourself or wire up another service |
| Upkeep (operations) | The platform handles upgrades and keeps it running | You watch the server and add capacity as traffic grows |
Because Supabase is open-source, you can also run it on your own server (self-host). If your rules later get complex (like discounts or payments), you can write your own server code and connect it to the exact same database.
When is Supabase a good fit?
Supabase shines when you want an app with sign-in and saved data quickly, without spending weeks building backend plumbing first.
- Early drafts and MVPs: test your main idea with real users right away.
- Solo builders and small teams: database, sign-in, and file storage all set up in one place.
- Live apps: like a chat room or shared to-do list, where changes pop up on everyone’s screen without refreshing.
Ready in minutes, powered by standard PostgreSQL, and you can export your data anytime without getting trapped.
Even with the heavy lifting done for you, you still need to design clear permission rules and app logic. Free plans also have storage and usage limits.
Common things people get wrong
Is Supabase only a database?
No. The database is its core, but it also packs in user sign-in, file storage, live updates, and auto-generated APIs.
Is it safe to put the publishable API key in a web page?
Yes—that publishable key is designed to be used in web pages, as long as row-level security (RLS) locks are set up so people only see their own data. Watch out, though: Supabase also has a super-powered “secret key” that bypasses all locks—NEVER put that secret key in browser code!
Is Supabase only for tiny toy projects?
No. You can upgrade for more power or self-host it as you grow. Still, bigger apps require really understanding databases and permissions rather than treating them like a black box.
Quick quiz
When a web page queries Supabase directly, how do you stop Alex from reading Maya’s private notes?
Turn on row-level security (RLS) in the database. Write a database rule such as “only return rows whose author matches the signed-in user.” That way, the database itself blocks unauthorized reads instead of relying on hidden page buttons.
Remember this: Supabase builds the backend for you, but you still set the permission rules for who can see which rows.
Read further
These official guides are a great next step.