The SaaS starter where Claude writes the rest.
An opinionated, AI-first SaaS starter — full stack pre-wired, every infra decision pre-made, every Claude Code skill you need vendored in the repo. You bring the business logic. Claude does the plumbing.
Works for two crowds:
- Devs — clone,
pnpm dev, ship. - Vibe-coders — open Claude Code, run
/setup, describe your idea, let the workflow drive.
Same repo. Same skills. Same outcome.
- Next.js 16 + React 19 + App Router (web, marketing, admin)
- Better Auth (email/pw, magic-link, Google, passkeys, 2FA, orgs, admin role, rate-limit)
- Postgres + Drizzle, tRPC v11 + Tanstack Query, Zod v4 validation
- Tailwind v4 + shadcn + dark mode
- Polar.sh billing wired end-to-end (sandbox + prod)
- Resend + React Email, Cloudflare R2 storage + nightly
pg_dump→ R2 - PostHog + GA4 analytics, Sentry errors, next-intl (EN + FR)
- Dokploy + docker-compose deploy, GitHub Actions CI
- Biome v2, Vitest + Playwright + a11y suite
Full ADR set under docs/adr/. Decisions you don't have to re-make.
- App-level AI features. The stack is "AI-native dev" — not "AI SaaS template". Add
aiSDK or whatever model wrapper you want when you build your features. - A name. Run the rename script below after cloning.
Open Claude Code in this repo. Skills come vendored — no install step:
new feature /grill-with-docs → /to-prd → /to-issues → /tdd → /review
bug /diagnose → /tdd
refactor /improve-codebase-architecture → ADR draft → /to-issues
new idea /prototype (throwaway to flush out the design)
Each skill is a short, opinionated playbook. They share a domain model (CONTEXT.md) and a decision log (docs/adr/) so multiple Claude sessions stay coherent.
See .claude/skills/README.md for the full catalogue.
You have Claude Code installed. You may or may not write code yourself. That's fine.
git clone https://github.com/<you>/vibestack.git my-saas
cd my-saas
pnpm installNow open the folder in Claude Code and run:
/setup
Claude walks you through:
- Bringing Postgres up via Docker.
- Generating
BETTER_AUTH_SECRET. - Collecting your Resend, Cloudflare R2, and Polar.sh keys — with the signup URL and free-tier picks for each.
- Writing
.envfor you. - Pushing the schema and starting
pnpm dev.
When /setup finishes you have three apps running locally:
http://localhost:3001— your authed producthttp://localhost:3000— your marketing site + docs + bloghttp://localhost:3002— admin dashboard
Then describe what you want to build. The workflow above takes it from there.
git clone https://github.com/<you>/vibestack.git my-saas
cd my-saas
pnpm install
pnpm db:start
cp .env.example .env
# fill BETTER_AUTH_SECRET (openssl rand -base64 32) + Resend + R2 + Polar keys
pnpm db:push
pnpm devNeed the full env-var key-by-key list? See .claude/skills/setup/env-reference.md.
pnpm dev # turbo dev across all apps
pnpm --filter web dev # single app
pnpm build # turbo build
pnpm check # biome format + lint
pnpm typecheck # tsc across packages
pnpm test # vitest
pnpm test:e2e # playwright
# Database
pnpm db:start # docker postgres
pnpm db:push # apply schema directly (dev)
pnpm db:generate # generate SQL migration
pnpm db:migrate # apply migrations (prod)
pnpm db:studio # drizzle studio UI
pnpm db:seed # seed demo data
# Auth schema regen after editing packages/auth plugins
pnpm auth:generate
# Email preview
pnpm email:dev # react-email at :3010
# Skills maintenance
pnpm skills:update # pull latest upstream skills into .claude/skills/vibestack ships under the @vibestack/* workspace scope. After cloning, rename to your own org:
# Replace @vibestack/ everywhere and the root package name.
find . -type f \( -name "*.json" -o -name "*.ts" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.sh" -o -name "*.toml" -o -name "*.md" -o -name "*.mdx" \) \
-not -path "*/node_modules/*" -not -path "*/.next/*" -not -path "*/.turbo/*" -not -path "*/.git/*" \
-exec sed -i.bak 's|@vibestack/|@your-org/|g; s|vibestack|your-product|g' {} \;
find . -name "*.bak" -delete
pnpm installReview the diff before committing. Drop your own copy on the marketing landing hero.
- Provision a small VPS (Hetzner / DigitalOcean / Vultr).
- Install Dokploy via its one-liner.
- Point a Compose service at
docker-compose.ymlin this repo. - Fill
.env.productionfrom the same template you used locally. - Map domains to apps:
marketing.example.com→marketing:3000app.example.com→web:3001admin.example.com→admin:3002
- Enable Let's Encrypt SSL via the Dokploy UI.
- The
backupcontainer runspg_dumpnightly → R2 (30-day retention).
Restore: ./scripts/restore-r2.sh (latest dump) or pass a specific key.
Optional. Ship while you sleep — a long-running Claude swarm that picks up open triaged issues, implements them, opens PRs.
Setup + the prompts live under .ruflo/. See .ruflo/README.md for the runbook and risks.
docs/adr/0001-tech-stack.md— why this stackdocs/adr/0002-monorepo-shape.md— workspace layout + import rulesdocs/adr/0003-passkey-plugin.md— Better Auth passkey choicedocs/adr/0004-ai-first-positioning.md— why vibestack is positioned the way it is
Append new ADRs as numbered files. Reference them from CONTEXT.md.
- Don't touch
.env,.env.*,*.key,*.pem,secrets/*. - Don't bump major dep versions without an ADR.
- Don't push to
main— branch → PR → CI → squash merge. - Don't
--no-verify.
Initial scaffold via Better-T-Stack. Workflow skills vendored from mattpocock/skills. Extended into vibestack with marketing/admin apps, Fumadocs, Resend, R2, PostHog/GA, Sentry, next-intl, Dokploy compose + R2 backup, and the full Claude Code skill set.