Everything shipped in the kit
Fifteen patterns, the repo you actually clone, and how many hours each piece would cost to build from scratch.
What's inside
Every feature listed here is already implemented in the codebase you receive.
TanStack Start
SSR, type-safe file-based routing, and server functions out of the box.
Supabase auth
Email + password, password reset, and a reusable route guard for protected pages.
Profiles + RLS pattern
Auto-created profile rows and a documented Row-Level Security template you copy for every new table.
Polar billing (MoR)
Merchant-of-record checkout — EU/UK VAT and US sales tax handled without extra code.
shadcn/ui design system
Inter, neutral zinc palette, indigo accent, and a working light / dark theme toggle.
Agent-ready docs
A CLAUDE.md that teaches Claude Code and Cursor your conventions so they extend the code correctly.
AI module
Lovable AI gateway wired server-side with a reusable pattern — works out of the box, no external keys.
Transactional emails
Resend integration for welcome and order confirmation emails — fail-safe: never blocks signup or checkout.
Tests + CI
Playwright smoke tests for landing, pricing, and login, wired to a GitHub Actions workflow on every push.
3 languages built in
Trilingual UI (English, German, Spanish) with a validated dictionary check so no translation drifts.
Subscriptions-ready (Polar)
Config-driven subscription support — webhook events wired end-to-end, entitlements resolved automatically. Set a product id and go.
Monetization patterns
Plan resolution (free / early adopter / subscriber) plus AI usage metering with quota enforcement and an upsell path. The full AI-SaaS business model.
File storage pattern
Avatar upload wired to a private bucket with storage RLS scoped per user — copy the pattern for any user-owned file.
Roles & admin
user_roles table with a SECURITY DEFINER has_role() function and a role-gated /admin area for users and orders.
License key validation
Polar License Key API wrapped as server functions, plus a live /verify-license demo page — reuse the pattern to gate your own products.
Inside the repo
The real structure you'll clone — and the conventions your agent will follow.
- src/
- routes/
- _authenticated/
- index.tsx
- pricing.tsx
- api/webhooks/
- integrations/supabase/
- lib/
- checkout.functions.ts
- config/billing.ts
- supabase/migrations/
- README.md
- CLAUDE.md agent-ready
-- Add a new user-owned table with RLS (5 steps)
-- 1. Create the table (user_id + timestamps)
create table public.things (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references auth.users(id) on delete cascade,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
-- 2. Grant Data API access
grant select, insert, update, delete on public.things to authenticated;
grant all on public.things to service_role;
-- 3. Enable RLS
alter table public.things enable row level security;
-- 4. Four policies scoped to auth.uid() = user_id
create policy "select own" on public.things
for select to authenticated using (auth.uid() = user_id);
-- 5. Attach the shared updated_at trigger
create trigger things_set_updated_at
before update on public.things
for each row execute function public.set_updated_at();The build-it-yourself math
Rough hours to build each piece to a shippable standard. Estimates, not quotes.
| Auth + route guards | ~10 h |
|---|---|
| RLS patterns + reference CRUD | ~8 h |
| Merchant-of-record billing + signed webhooks | ~10 h |
| Subscriptions + entitlements | ~8 h |
| AI module | ~6 h |
| AI metering + quotas | ~4 h |
| Transactional emails | ~5 h |
| File storage + policies | ~4 h |
| Roles + admin area | ~6 h |
| i18n in 3 languages | ~8 h |
| SEO + legal pages | ~4 h |
| Tests + CI | ~4 h |
| Design system + dark mode | ~5 h |
| License key validation | ~3 h |
| Total | ~85 h |
Hours are estimates for a competent developer building each piece well — auth flows, security policies, tax-compliant billing, tests, and translations that actually work.
At typical freelance rates ($60–120/h) that's roughly $5,100–$10,200 of build time. SarvStack is $99.