Learn · Database
What Supabase Actually Does
And When SQLite Is Enough
Every time a new Next.js tutorial comes out, it says “for the database, we'll use Supabase.” You set up a project, get a connection string, and suddenly you have a database. Feels like magic. But you're now running a cloud database for an app with 3 users.
What It Actually Does
Supabase gives you a Postgres database in the cloud without managing a server. You get a dashboard to view your tables, a generated REST API so you can query data from the frontend without writing API routes, a built-in auth system, realtime subscriptions (data changes pushed to the browser), and file storage. It bundles five different infrastructure concerns into one dashboard.
The Magic Trick Revealed
Supabase is not one thing. It's several open-source tools duct-taped together with a nice dashboard on top:
Your App
|
|── supabase.from('posts').select('*')
| │
| ▼
| PostgREST ─────────────▶ Postgres
| (auto-generated REST) (vanilla DB)
|
|── supabase.auth.signIn()
| │
| ▼
| GoTrue ────────────────▶ Auth service
| (by Netlify, OSS) (JWT sessions)
|
|── supabase.channel('room').on(...)
| │
| ▼
| Realtime ──────────────▶ Postgres WAL
| (WebSocket server) (change stream)
|
|── supabase.storage.upload(...)
| │
| ▼
| Storage ───────────────▶ S3-compatible
| (file API) (object store)So when you do supabase.from('posts').select('*'), you're calling PostgREST, which is calling Postgres. There's no magic. It's just HTTP to a REST layer on top of SQL.
You can self-host all of this. Supabase is literally open source. But you probably don't want to.
The SQLite Alternative
For most solo projects, you don't need a cloud database at all. SQLite runs inside your application process, needs zero config, and is fast enough to handle millions of reads. With Drizzle ORM and better-sqlite3, you get full type-safe queries, migrations, and your database is a single file sitting next to your code.
No connection strings, no cloud credentials, no latency from your server to an external database. Reads are microseconds, not milliseconds.
When You SHOULD Use Supabase
Realtime features
Live collaborative features — multiple users seeing changes in real time. Supabase's realtime subscriptions are genuinely excellent.
Row Level Security
Multi-tenant app where User A must never see User B's data. Postgres RLS enforces this at the database level.
Mobile app backend
React Native app that talks directly to a database from the client. Supabase's REST API and auth work well here.
You don't want to think about DBs
Free tier: 2 projects, 500MB storage, 50K MAU. If you're moving fast and want persistence without infra decisions, great starting point.
When You're Wasting Money
SQLite handles millions of reads per second. It powers WhatsApp. Literally. Don't let anyone tell you it's “not production ready.”
The Supabase free tier pauses inactive projects after 1 week. Your users hit your site, get a 10-second timeout while the database wakes up, and leave. The paid tier starts at $25/month. For a solo project under 1,000 users, that's money you're spending on a distributed cloud database to do work a local file could do in 0.1ms.
The Verdict
Use SQLite with Drizzle for any solo or small-team project under 1,000 users — and only add Supabase when you actually need realtime, RLS, or a mobile client that talks directly to your data layer.
Ready to pick the right stack?