Yes, Supabase is ready for production, and it's our default backend for new client apps. Underneath it's a normal Postgres database, so you keep SQL, migrations and the option to move later. Around that you get auth, storage, scheduled jobs, queues and serverless functions that would take weeks to set up yourself. What makes it production-ready isn't Supabase alone, though. It's how you use it: develop locally with the CLI, turn on Row Level Security for every table, use your own email provider for auth, and test that your backups restore.
We've used Supabase on the hosted platform, locally through the CLI, and self-hosted from its open-source code. This is how we build on it, and where we'd choose something else.
Why do we suggest Supabase to most clients?
Three reasons:
- It's Postgres. Your data lives in a database every developer knows, with real SQL, foreign keys and transactions. If you outgrow the hosted platform, you can move the database anywhere Postgres runs.
- The boring parts come built in. Sign-in, file storage, scheduled jobs, queues and functions are there from day one, so the first weeks of a project go into the product, not plumbing.
- It's open source. You can run the whole stack yourself, which matters to clients worried about lock-in. We've done it (more on that below).
We've built a social publishing SaaS (Aircreator), an AI product for grocery stores (Visneo), a mobile pantry app (FreshSnap AI) and a solar lead-generation site (ArkaHub) on it.
How do we develop locally with the Supabase CLI?
Every change goes through the CLI and migrations. Nobody edits the production schema in the dashboard. That one rule prevents most "it worked yesterday" problems.
supabase init # once per repo: creates supabase/ with config and migrations supabase start # runs the whole stack locally in Docker supabase migration new add_projects # write the SQL in supabase/migrations/<timestamp>_add_projects.sql supabase db reset # rebuilds the local database from migrations + seed supabase gen types typescript --local > lib/database.types.ts supabase link --project-ref <ref> # once: connect to the hosted project supabase db push # apply new migrations to the hosted database Two more habits from production projects:
- Migrations reach staging through CI, not by hand: a push to the staging branch applies new migrations, and nobody pastes SQL into the dashboard's SQL editor.
- For fast database tests, start only what you need:
supabase start -x kong,postgrest,realtime,studio,...excludes services you aren't testing, so the local stack starts in a fraction of the time.
db reset is the habit that pays off: if the database can be rebuilt from migrations and a seed file in seconds, staging, previews and new developers all get the same schema. The generated TypeScript types mean the frontend knows every table and column, and a renamed column breaks the build instead of a page.
How do we keep one customer's data away from another's?
Row Level Security (RLS) on every table that holds user data, with no exceptions. Supabase gives the browser a public key, and that's by design. RLS is what stops that key from reading everything. With RLS off, anyone who opens your app's network tab can query the whole table.
alter table projects enable row level security; create policy "members read their org's projects" on projects for select to authenticated using ( org_id in (select org_id from memberships where user_id = (select auth.uid())) ); Three rules we follow:
- Write a policy per action (select, insert, update, delete), not one catch-all policy.
- The service-role key never reaches the browser. It skips RLS, so it lives only in server code and Edge Functions.
- Test as two users: sign in as someone from company A, request company B's row by ID, and expect nothing back.
This is also the most common problem we find in apps built with Lovable or Bolt. We wrote up the checks in 5 things to fix before your Lovable or Bolt app gets real users.
What do you need to change in Supabase Auth before launch?
Supabase Auth handles sign-up, sign-in, OAuth providers, magic links and MFA. Before real users arrive, we change four things:
- Custom SMTP. The built-in email sender is rate-limited and meant for testing. For production, connect your own provider (Resend, Postmark, SES or Google Workspace SMTP) so confirmation and password-reset emails actually arrive, from your own domain.
- Email templates. Rewrite the confirmation, magic-link and reset emails in the product's voice. The defaults look like spam to users.
- Redirect URLs. List every allowed redirect (production, staging, preview domains). Most "login works locally but not in production" bugs are a missing redirect URL.
- Two-factor auth that's actually enforced. Supabase supports TOTP two-factor (an authenticator-app code). The trap is enforcing it only in the browser.
A two-factor lesson from a real project. On one product, two-factor was opt-in. After the password, the login page checked whether the user had set up a factor and asked for the code. The problem: that check ran only in the browser. Anyone with a leaked password could skip the code page and go straight to the app, because the server only checked that the session was valid.
Two details make this easy to get wrong:
- The session token says which level the user reached (
aal1after a password,aal2after the code), but not whether they've set up two-factor. A user with no factor and a user who skipped the code both look likeaal1. - The factor list cached in the session can be out of date right after someone enrols.
The fix was a server-side check at the one place every protected page passes through. If the user has a verified factor (looked up fresh with auth.mfa.listFactors(), not from the cached session) and the session isn't aal2 yet, redirect to the code prompt. The browser prompt became just the user interface, not the guarantee.
If two-factor is mandatory for some data, you can also enforce it in the database itself:
-- Only sessions that completed two-factor (aal2) can read invoices. create policy "invoices need mfa" on invoices as restrictive for select to authenticated using ((select auth.jwt() ->> 'aal') = 'aal2'); Don't use that policy when two-factor is optional. It would lock out everyone who hasn't set it up.
Can Supabase run background jobs and scheduled tasks?
Yes, inside Postgres, which for most apps means you don't need a separate job server.
pg_cron runs SQL on a schedule:
select cron.schedule( 'purge-expired-invites', '0 3 * * *', $$ delete from invites where expires_at < now() $$ ); Queues (pgmq) give you a durable job queue in the database. A message isn't lost if a worker crashes; it becomes visible again after a timeout:
select pgmq.create('emails'); select pgmq.send('emails', '{"user_id": "…", "template": "welcome"}'); select * from pgmq.read('emails', 30, 10); -- hide for 30s while processing, up to 10 messages select pgmq.delete('emails', 42); -- remove message 42 once it's done We use cron for clean-ups, reminders and nightly syncs, and queues for emails and calls to slow third-party APIs. When a job has many steps across outside systems, or runs for hours, we move it to a workflow engine instead. My co-founder Rishabh compared the options in Temporal vs Inngest vs DBOS.
When do we use Supabase Edge Functions?
Edge Functions are small TypeScript functions (Deno) deployed next to your project. We use them for the server-side jobs a frontend can't do safely:
- Webhooks: Stripe, payment providers, form tools. Verify the signature, then write to the database.
- Anything that needs a secret: calling an AI API or a CRM with a key the browser must never see.
- Sending email through your provider after a database event.
supabase functions new stripe-webhook supabase secrets set STRIPE_WEBHOOK_SECRET=whsec_... supabase functions deploy stripe-webhook Larger backends (an AI pipeline, a FastAPI service) still run as their own service and talk to Supabase's Postgres directly. Edge Functions are for the glue, not the whole backend.
What about backups?
Hosted Supabase takes daily backups on paid plans, and point-in-time recovery is an add-on for when "yesterday's backup" isn't recent enough. Check what your plan includes. Two habits on top:
- Keep your own copy with
supabase db dump, especially before a big migration. - Test a restore into a separate project at least once. A backup you've never restored is a guess.
Can you self-host Supabase?
Yes. Supabase is open source, and the whole stack (Postgres, auth, the REST and realtime APIs, storage, the dashboard) runs with Docker Compose from its repository.
We went a step further once. For a client project, we built a Supabase-compatible backend of our own. We kept Supabase's open-source dashboard (Studio) as the frontend, and wrote the services behind it ourselves in Python: auth, the REST API over Postgres, and Edge Functions. Then we tested each one against how the real platform behaves.
The hardest parts were running Edge Functions live, and auth. Every request has to be checked exactly the way Supabase checks it, and Supabase accepts more than one kind of credential. We implemented the JWT path, which is what user sessions use. Rebuilding the services one by one is the fastest way we know to learn what each part of Supabase actually does. When something behaves oddly in a client's project, we usually know which service to look at.
Our advice to most clients is still the hosted platform. Self-hosting means you run upgrades, backups, monitoring and security yourself. It's worth it when you have a data-residency requirement, very high scale, or a team that wants full control. Knowing it's possible is what removes the lock-in worry.
When wouldn't we use Supabase?
- Long, multi-step workflows that must survive crashes (order pipelines, agent runs that last hours): we add a workflow engine such as Temporal or Inngest alongside it.
- A team already deep in another cloud's database and auth, with no reason to move.
- Heavy analytics on huge tables: keep Postgres for the app, and send events to an analytics database.
For an MVP or a typical SaaS, none of those apply, and Supabase is the fastest way we know to get to a product people can sign up for, pay for and use.
FAQ
Is Supabase free for production?
The free plan is fine for prototypes, but free projects pause when inactive and have limited backups. For anything with real users, use a paid plan. Check current pricing on Supabase's site.
Can I move off Supabase later?
Yes. Your data is in standard Postgres, so you can dump it and restore it on any Postgres host. Auth and storage take more work to move, but because the stack is open source, you can also self-host the same services.
Is Row Level Security enough to secure a Supabase app?
It's the most important layer, not the only one. Keep the service-role key on the server, check permissions in Edge Functions and webhooks, require MFA for sensitive data, and test access as a second user.
Supabase or Firebase for a new SaaS?
For most SaaS products we pick Supabase, because relational data (users, organisations, roles, invoices) fits Postgres better than a document store, and SQL makes reporting easy. Firebase is a fine choice for apps that are mostly real-time mobile data with simple relations.
Originally published on buildkodiq.com. Shubham Maurya leads Supabase work at BuildKodiq, from MVPs to taking Lovable and Bolt apps to production.




