Auth
src/lib/auth/- Supabase Auth on Postgres, ready for email and OAuth
- Row Level Security enabled on every table, with example policies
- Rate limiting on every auth route
guards.tsactions.tssupabase/migrations/
[00 // secure-by-default saas boilerplate]
One-time payment. Instant download. Free updates.
[01 // audit]
Auth pages and a pricing table are the easy 80%. The 20% that protects your users is what usually gets skipped — until it's on the front page of a breach writeup.
@@ row-level security @@
-off by default. one missing policy exposes every row
+enabled on every table, with example policies to copy
@@ secrets in the client bundle @@
-nobody checks. one wrong import ships your API key
+server-only secrets, scanned on every security-check run
@@ rate limiting @@
-not included. login endpoints take unlimited guesses
+on auth and API routes out of the box
@@ security headers @@
-framework defaults only
+CSP, HSTS and X-Frame-Options configured and documented
@@ stripe webhooks @@
-often trusted blindly — anyone can fake an event
+signature verified before any event is processed
@@ input validation @@
-ad hoc, if at all
+zod schemas on every server action and route handler
every "+" line ships enabled by default. none of it is a TODO.
[02 // ship]
Auth, billing, dashboard and tests — wired together and ready to rename. Clone it, run one command, start building your actual product.
guards.tsactions.tssupabase/migrations/
stripe.tsapi/webhooks/stripe/route.ts
npm run security-check — scans for leaked secrets, missing RLS, missing headersheaders.tsrate-limit.tsscripts/security-check.mjs
middleware.tstests/e2e/smoke.spec.ts
[03 // verify]
This is the actual checklist from the BaseGuard docs. It exists because every item on it has burned a real app somewhere. The boilerplate handles each one — the list is how you verify it.
npm run security-check automates the secrets, RLS and header checks. The rest take about five minutes.
.env files out of git, .env.example committed instead[04 // checkout]
$49one-time
The full application with every security default. Everything you need to launch.
security-check script$149one-time
For products that need teams, admin and email from day one.
[05 // faq]
BaseGuard is built on Supabase: Postgres for data, Supabase Auth for sessions, and RLS policies on every table. That combination is the core of the security model, so yes — Supabase is the supported path.
You own the source, so technically yes. But the RLS policies, auth flow and security-check rules assume Supabase. If you swap it out, the security guarantees become your job to rebuild — budget real time for that.
Three classes of problems: leaked secrets (keys in the client bundle or tracked .env files), missing RLS on any table, and missing security headers. It runs locally in seconds and is meant to be part of your deploy routine, not a one-time audit.
No. Auth and the rest of the app run without Stripe keys. The billing module — checkout, verified webhooks, customer portal — is wired and waiting for when you're ready to charge.
Personal and commercial use: build and sell as many products on top of it as you like. The one thing you can't do is resell or redistribute the boilerplate source itself.
Yes — updates are free and included in the one-time price. No subscription, no "pro updates" tier.
Step-by-step deploy guides are included for Vercel and Cloudflare. Both are covered end to end, including the security headers setup.
$ npm run security-check → passed — 9 checks, 0 critical
One-time payment. Instant download. Free updates.