← All work

White-label site platform

Turning agency repetition into one product

One shared database, a clonable frontend, tenant isolation enforced by a JWT claim.

30row-level security policies
9tables
4steps to onboard a new client

Problem

I kept building near-identical sites for different clients: blog, about, contact, an admin panel. Starting from scratch each time was slow and each copy carried its own risk of a mistake.

Constraint

A template alone doesn't solve it. The real question: if multiple clients share one database, how does one client's data stay out of another's reach?

Approach

I split the system into one shared Supabase schema and a clonable Next.js template. Site context is read from a JWT claim, not a session variable; anonymous access goes through defined RPC functions, never a raw table. 30 row-level security policies across 9 tables mean even a careless query from one client's admin can't reach another client's data. Onboarding a new client came down to four steps; blog posts import straight from a Word document to HTML.

New client record → JWT claim → site_id → RPC-only anon access → Clone + deploy → New client site live

Result

A new client site now starts from the shared template instead of from zero, and three live sites run on the same infrastructure today: two for clients and my own research notebook. What used to be a project became a repeatable setup.

Next.jsSupabaseRow Level SecurityMulti-tenant ArchitectureVercel

Need something like this?

Send two or three lines: what you have, what is broken or missing, and when you need it. I reply within 12 hours, Monday to Saturday.