Firebase Locks You In. Supabase Sets You Free.
Firebase uses proprietary NoSQL. Your data structure is Google-specific. Migrating away means rewriting your entire data layer.
Supabase uses PostgreSQL. The most battle-tested database in the world.
Supabase: The Open Source Firebase Alternative
Supabase gives you a full backend in minutes:
- PostgreSQL database with auto-generated APIs
- Authentication (email, OAuth, magic links)
- File storage
- Real-time subscriptions
- Edge Functions
- Vector search for AI
Free Tier
- 2 projects
- 500MB database
- 1GB file storage
- 50,000 monthly active users
- 500K Edge Function invocations
- Unlimited API requests
Start Building in 2 Minutes
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
'https://your-project.supabase.co',
'your-anon-key'
)
// Query your database
const { data: posts } = await supabase
.from('posts')
.select('*, author:users(name, avatar)')
.eq('published', true)
.order('created_at', { ascending: false })
.limit(10)
No SQL needed (but you can use raw SQL too). Auto-generated REST and GraphQL APIs.
Auth in 5 Lines
// Sign up
await supabase.auth.signUp({ email, password })
// Sign in
await supabase.auth.signInWithPassword({ email, password })
// OAuth
await supabase.auth.signInWithOAuth({ provider: 'github' })
// Get current user
const { data: { user } } = await supabase.auth.getUser()
Row Level Security
-- Users can only read their own data
CREATE POLICY "users_own_data" ON posts
FOR SELECT USING (auth.uid() = user_id);
Security at the database level. Even if your API is exposed, users only see their own data.
Real-Time Subscriptions
supabase
.channel('posts')
.on('postgres_changes', {
event: 'INSERT',
schema: 'public',
table: 'posts'
}, (payload) => {
console.log('New post:', payload.new)
})
.subscribe()
Listen to database changes in real-time. Build chat apps, live dashboards, collaborative tools.
Vector Search for AI
-- Enable pgvector extension
CREATE EXTENSION vector;
-- Store embeddings
ALTER TABLE documents ADD COLUMN embedding vector(1536);
-- Semantic search
SELECT * FROM documents
ORDER BY embedding <-> '[0.1, 0.2, ...]'
LIMIT 5;
Build RAG applications with your Supabase database. No separate vector store needed.
Supabase vs Firebase vs PocketBase
| Feature | Supabase | Firebase | PocketBase |
|---|---|---|---|
| Database | PostgreSQL | NoSQL | SQLite |
| Self-host | Yes | No | Yes |
| Vendor lock-in | Low | High | None |
| Scaling | Horizontal | Auto | Vertical |
| Vector search | Built-in | No | No |
| Edge Functions | Yes | Yes | No |
| Free tier | Generous | Generous | Free (self) |
Get Started
Visit supabase.com, create a project, start building.
Need web data in your Supabase database? 88+ scrapers on Apify extract data from any website into JSON. Custom: spinov001@gmail.com
Top comments (0)