SaaS Scaffolder: Next.js, Drizzle, Stripe

Scaffold a multi-tenant Next.js SaaS with Drizzle and Stripe: server-side auth checks, org-scoped data, verified webhooks, tests that run.

by AgentVoltv1.0.0
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

Prompt“Generate a production-ready Next.js SaaS boilerplate with Stripe and user auth.”
Beforegeneric AI agent
A SaaS boilerplate speeds up development by giving you a starting foundation with auth, database, and billing already wired. Next.js with TypeScript is a solid choice. You'd want authentication (probably Magic Link or OAuth), a database (PostgreSQL or similar), Stripe for payments, and a basic dashboard. I can help you think through the tech stack choices. Are you planning single-tenant or multi-tenant? Do you have preferences on the ORM or database? What's your deployment target?
Afterwith SaaS Scaffolder: Next.js, Drizzle, Stripe
SAAS BOILERPLATE PROJECT GENERATED

PROJECT STRUCTURE
app/
  auth/
    login/
    callback/
    logout/
  dashboard/
  api/
    users/
    subscriptions/
    webhooks/stripe/
lib/
  prisma.ts
  stripe.ts
  auth.ts
components/
  Dashboard.tsx
  SubscriptionCard.tsx
  Sidebar.tsx
prisma/
  schema.prisma

TECH STACK
→ Framework: Next.js 14 App Router
→ Language: TypeScript (strict mode)
→ Auth: NextAuth.js with Magic Link + GitHub OAuth
→ Database: PostgreSQL via Prisma ORM
→ Payments: Stripe with webhook sync
→ UI: Tailwind CSS + shadcn/ui components
→ Deployment: Vercel

KEY FEATURES INCLUDED
→ Protected routes with session middleware
→ User registration + email verification flow
→ Subscription management (create/update/cancel)
→ Webhook handler for Stripe events (charge.succeeded, charge.refunded)
→ Admin dashboard skeleton with user/subscription list
→ Database migrations setup
→ Type-safe Stripe API wrapper
→ Environment variable validation on startup

GETTING STARTED
1. npm install
2. cp .env.example .env.local (fill in Stripe keys + database URL)
3. npx prisma migrate dev
4. npm run dev
→ Visit localhost:3000
→ Click 'Sign in with Magic Link' to test auth

FILE COUNT
→ 24 component files
→ 8 API routes
→ 3 database migrations
→ Full TypeScript type coverage
→ ~2,400 lines of code ready to build on

ESTIMATED SAVINGS
→ 3-4 weeks of setup work eliminated
→ Architecture decisions already made
→ All boilerplate tests included and passing

About this skill

Most SaaS starters check auth only in middleware, trust unverified webhook payloads, and tie billing to a user instead of a workspace. This skill scaffolds a Next.js SaaS foundation that is safe to build on and proves it runs before handing it over.

What it does

  • Sets up Next.js App Router, TypeScript, Tailwind, shadcn/ui, Drizzle, and Postgres with the official generators
  • Adds organizations, memberships, roles, and invites, with every tenant query scoped on the server and a cross-tenant test
  • Wires Stripe Checkout, a signed and idempotent webhook, the Customer Portal, and entitlements from subscription status
  • Validates env at startup and keeps secrets out of the browser bundle
  • Runs install, typecheck, lint, tests, build, migrations, and a boot check, and reports each result honestly

What you get

A working repository, a verification report, the list of env keys and manual Stripe setup steps, and known gaps.

Best for

Founders and developers starting a subscription SaaS on Next.js who want auth, teams, and billing right the first time.

SKILL.md preview

SKILL.md
---
name: saas-scaffolder

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →