Supabase: The PostgreSQL Platform That Feels Like Firebase
If you've ever built an app with Firebase, you know how nice it is to have auth, a database, realtime subscriptions, and file storage all wired up out of the box. But you also know the pain of leaving SQL behind, dealing with Firestore's query limitations, and eventually hitting vendor lock-in walls.
That's where Supabase comes in. It's an open-source Firebase alternative that gives you the same ergonomics but with PostgreSQL under the hood. No NoSQL compromises, no proprietary query languages, just pure Postgres with all its power and portability.
What It Does
Supabase is a hosted Postgres database that comes with a suite of additional services built on top. Think of it as a full backend platform that gives you:
- A managed PostgreSQL database
- Auto-generated REST and GraphQL APIs
- Real-time subscriptions (built on Postgres replication)
- User authentication (with social logins, magic links, etc.)
- File storage
- Edge functions (Deno-based serverless functions)
The magic is that you don't manage any of this separately. You set up your Postgres schema with migrations or the GUI, and Supabase generates the API endpoints automatically. Change a table, and the API updates accordingly.
Why It's Cool
The biggest advantage is that you're still just writing PostgreSQL. That means:
- You can use all of Postgres's features: views, triggers, extensions like PostGIS, full-text search, and the whole SQL ecosystem.
- You can migrate your database out anytime to any Postgres-compatible service. No lock-in.
- Every Supabase project gives you access to
pgdumpand direct database connections, so you can inspect and query with any Postgres client you like.
The real-time subscriptions are also clever. Instead of building your own WebSocket layer, Supabase listens to Postgres's built-in replication and broadcasts changes to clients. So when a row changes in your database, connected clients get that update instantly.
And the auth system is tightly integrated with the database. User profiles live in a public schema, while auth tables live in a separate auth schema. You can use Postgres Row Level Security (RLS) policies to control who can read or write what, all defined in SQL.
How to Try It
The fastest way to get started:
- Go to supabase.com and sign up (free tier gives you two projects with 500MB database each, plus auth and storage).
- Create a new project and wait for the database to provision (takes about 2 minutes).
- Use the SQL editor to create a table, or connect with your favorite Postgres client.
- Grab the auto-generated API endpoint and anon key from the settings page.
- Start querying from your frontend app using the Supabase client library:
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY)
// Fetch data
const { data, error } = await supabase
.from('posts')
.select('*')
// Real-time subscription
supabase
.channel('posts')
.on('*', payload => console.log('Change received!', payload))
.subscribe()
Or run it locally for development: clone the GitHub repo and use Docker Compose to spin up a full local environment.
Final Thoughts
Supabase isn't a silver bullet, and it won't replace a full backend for every project. But if you're building a web or mobile app that needs auth, a database, and real-time features without wanting to manage servers, it's a solid choice.
The fact that you're still using PostgreSQL means you're not locked into a proprietary data layer. You can start with Supabase's hosted version, and if you outgrow it or want more control, you can take your database and run it anywhere. That alone is worth considering over other backend-as-a-service options.
Give it a spin on your next side project. The SQL is real.
Follow us at @githubprojects for more open source project highlights.