HomeServicesSupabase Developer for Next.js, Postgres & RLS

Supabase · Postgres

Supabase Developer for Next.js, Postgres & RLS

I'm a senior full-stack engineer who builds production SaaS on Supabase and Next.js: Postgres schema design, row level security that actually holds up to a pen test, auth, storage, realtime, and Stripe billing wired into it. Supabase gets you to a working app in a weekend — what it doesn't do is make the hard decisions about your data model, your RLS policies, or what happens when a webhook fires twice. That's the part I get hired for. I built and shipped Database Vault, a production SaaS on Supabase, so this is my own stack, not a line on a CV.

Start a projectEmail a brief

What I build with Supabase

I build the whole product, not just the database layer: a Next.js App Router front end, a Postgres schema designed for how the business actually reads its data, row level security enforcing tenancy at the database rather than in your components, and billing that survives contact with real customers. When the product is multi-sided, that schema is the marketplace — sellers, roles, commissions — not a single-tenant SaaS table with an extra flag.

Row level security is where most Supabase projects go wrong

The single most common problem I'm called in to fix is RLS that was switched on late, or switched off to unblock a deadline and never switched back. Supabase makes the happy path so fast that teams ship a working app before anyone has written a tenancy model — and retrofitting one across dozens of tables and policies is far more expensive than designing it on day one.

The specific traps are consistent: policies that call auth.uid() inside a subquery on every row and quietly destroy query performance at scale; using the service-role key in a route handler "just for this one query", which bypasses RLS entirely; and policies for select with nothing equivalent for insert, update, or delete. I design the tenancy model first, write policies per operation, and add tests that assert one tenant cannot read another's rows.

If your app would still work with row level security turned off, you don't have row level security — you have a suggestion.

Multi-tenancy that Postgres actually enforces

A SaaS MVP on Next.js and Supabase fails in a predictable way: the first paying team works, the second team can see the first team's rows. That's not a Supabase bug. It's a missing tenancy model — no org_id on the tables that need it, RLS policies that check auth.uid() but not membership, and a service-role bypass in a route handler that was supposed to be temporary.

I design tenancy as a Postgres constraint, not a React convention. Every tenant-owned table carries the org key, membership lives in a table the policies can join, and tests assert that tenant A cannot select, insert, update, or delete tenant B's data. That's the difference between a full-stack app you can sell and a prototype you have to rewrite when the second customer signs.

Migrating off localStorage or Firebase

Two common origins for a Supabase project: a Next.js prototype that stored state in localStorage (or a JSON blob) until it needed auth and a second user, and a Firebase/Firestore app whose document model started fighting joins, reporting, or the bill. I treat both as migrations, not greenfield.

From localStorage: extract the real entities, put them in Postgres with constraints, then put RLS on before the first extra user. From Firebase: dual-write, backfill, verify parity, cut reads over one surface at a time — the same sequence I describe on the Firebase developer page and in Firestore pricing at scale. The expensive version is a weekend dump-and-hope.

Supabase or Firebase? An honest answer

Choose Supabase when your data is relational and you need real queries — joins, aggregates, transactions, and constraints the database enforces for you. Choose Firebase when you want document-shaped data, deep mobile SDK support, and you're comfortable denormalising to keep reads cheap.

In practice most B2B SaaS is relational, which is why I default to Postgres. The costs also behave differently: Firestore bills per document read, so your bill scales with traffic patterns in ways that are hard to predict — I broke that down with real numbers in Firestore pricing at scale. Supabase bills for compute and storage, which is easier to forecast but means you own query performance. Neither is universally right, and I'll say so if your project suits the other one.

Proof, not promises

Database Vault is my own SaaS, built on Next.js and Supabase — auth, billing, scheduled backup orchestration, encrypted storage, and one-click restore across PostgreSQL, MySQL, MongoDB, Firebase, and Supabase. It's a product I run, so I've dealt with the unglamorous parts: migrations against live data, background jobs that must not double-run, and support tickets when they do.

That work sits alongside AI SaaS and AI agent platforms, and it extends the same App Router stack I describe on the Next.js development services and Next.js SaaS pages.

How we'd start

Send me your schema — or a description of what the product does if there isn't one yet — plus where it hurts. I'll tell you whether it's a data model problem, an RLS problem, or a performance problem before quoting anything, because those are three very different jobs.

New builds usually start with a scoped v1: schema, RLS, auth, one core workflow, and billing. Rescue work starts with an audit. Either way, send me the details and you'll get a straight answer about scope and sequence.

Frequently asked questions

Yes — most of my Supabase work is existing projects rather than greenfield. Typical engagements are an RLS and security audit, a schema refactor to fix slow queries, or taking a prototype that works to something that can carry paying customers. I'll review the project and tell you what's worth fixing versus what's fine as-is.

It's Postgres, so the database itself scales the way Postgres does — the questions worth asking are about your schema and indexes, not the vendor. The genuine lock-in is lighter than most managed platforms because you can take a standard Postgres dump elsewhere. Where teams do outgrow it, it's usually a specific workload (heavy analytics, very high write throughput) that belongs in a separate system anyway.

Yes, and it's the part I'd most encourage you not to hand to a junior. Subscription state has to live in your database and stay in sync with Stripe through webhooks that are idempotent and handle out-of-order delivery. I've written up the failure modes in my post on Stripe webhooks in production, and I build to that standard.

Yes. Firebase/Firestore migrations are incremental: dual-write, backfill, verify, then move reads one surface at a time. localStorage prototypes get a real schema and RLS before a second user is invited — that's usually a scoped v1, not a rewrite of the UI. I'll tell you which of those you actually have after seeing the current data shape.

Tenancy is a Postgres design, not a frontend convention. Tenant key on owned tables, membership the RLS policies can join, no service-role bypass in user-facing routes, and tests that prove tenant A cannot read tenant B. If your current app only filters by user in React, that's the first thing we fix.

Fixed price for scoped builds, and a day or half-day rate for audits and rescue work. I quote after seeing the schema or the codebase — an estimate given before that is a guess, and guesses are how projects end up 40% over. There's no charge for the initial conversation.

Proof: related case studies

Related reading

Want this built for your business?

Tell me what you're trying to ship. I typically respond within 24 hours on business days.

Last updated Aug 17, 2026

← All services