Infrastructure
Supabase: Instant Backend
Add a database, user accounts, and file storage to your app — no server required
Wait, what's a backend?
A website has two parts: the frontend (what users see — buttons, text, images) and the backend (the invisible part that stores data and makes things work). When you create an account on a website, the backend saves your email and password. When you post a photo, the backend stores it. Supabase is the backend, so you only have to build the frontend.
When you'd use Supabase
- Your app needs to save data (notes, posts, scores, orders, anything)
- You need user accounts — sign up, log in, log out
- You need to store files — images, PDFs, uploads
- You want real-time features — like a live chat or collaborative editing
Getting started
- Go to supabase.com and create a free account
- Click "New Project" — give it a name and a password (this is your database password, save it somewhere safe)
- Wait about 30 seconds for your project to spin up
- You'll land on a dashboard — this is your backend's control center
Your first database table
A database stores your app's data in tables — think of a table like a spreadsheet. Each row is a record (like one note or one user) and each column is a property (like "title" or "created date").
- In the dashboard, click Table Editor in the sidebar
- Click "Create a new table"
- Name it something like
notes - Add columns:
id(auto-generated),text(type: text),created_at(type: timestamp) - Click Save — you now have a database table
- Click "Insert row" to add your first piece of data
User accounts (authentication)
Supabase has a built-in login system. You don't need to figure out how to securely store passwords or manage sessions — it handles all of that.
- Email + password — the classic sign-up flow
- Magic links — user enters email, gets a login link (no password needed)
- "Sign in with Google/GitHub" — social login with one click
- Enable any of these in Authentication → Providers in the dashboard
Connecting Supabase to your code
When you're ready to use Supabase from your app (not just the dashboard), you'll need two things from your project settings: your project URL and your anon key (a safe-to-share key for reading public data).
- Install the library:
npm install @supabase/supabase-js - Initialize it:
const supabase = createClient(url, anonKey) - Read data:
const { data } = await supabase.from('notes').select() - Write data:
await supabase.from('notes').insert({ text: 'Hello!' })
npm install command is how you add external code libraries to your project. It requires Node.js (see Guide #3, Step 1).What does it cost?
- Free tier — 500 MB database, 1 GB file storage, 50,000 monthly active users
- That's generous enough for most projects and prototypes
- Paid plans start at $25/month for more storage and features
Create a free Supabase project. In the Table Editor, create a "notes" table with a "text" column. Add 3 rows of data. Congratulations — you just built your first database.