The SaaS starter built for vibe coding

Vibe code your SaaS
from day one

SaaS-DNA is the production-ready starter template designed to work with AI. Clear patterns, consistent conventions, and setup guides that any AI can follow โ€” so you can build your entire SaaS with Claude, Cursor, or your tool of choice.

Xavyr

๐Ÿ‘‹ Hi, I'm Xavyr

For the past few years, I've been helping developers break into software engineering ๐Ÿ’ป.

What started as sharing snippets of private classes I was running online eventually grew into a community of 80k+ people on Instagram ๐Ÿ“ฑ and a coaching program where I worked closely with aspiring engineers. Together we built real applications, sharpened technical skills, and focused on what actually gets people hired.

Many of those developers went on to land life-changing offers โ€” cumulatively my clients have received well over $500k in compensation ๐Ÿ’ฐ.

But something about the process always bothered me ๐Ÿค”.

Most of the projects we built had a single purpose: help someone get a job. Once they succeeded, the project was abandoned. On top of that, every new project meant rebuilding the same infrastructure, deployment setup, and boilerplate from scratch.

I kept thinking: what if one of these projects actually became something real?

Then the AI wave arrived ๐ŸŒŠ.

Almost overnight, the cost and speed of building software dropped dramatically. Tools improved. Iteration became faster. The barrier to launching products is next to nothing. And at my W2 job, I've been interviewing devs that openly admit to vibe coding everything on thier resume. And I'm one of the last stages in thier interview process!

It felt like a shift from โ€œbuild one careful shotโ€ to โ€œtake as many shots on goal as you wantโ€ ๐Ÿ”ฅ.

That realization made me step back for all of 2025 and rethink everything โ€” how I coach, how I build, and what I want to create.

That led to this template ๐Ÿ› ๏ธ.

It's designed for developers and solopreneurs who want to move quickly from idea to product without rebuilding the same infrastructure every time. But it's also something I built for myself โ€” because I want to spend more time shipping real products that I own.

๐ŸŽฏ As of March 5th, 2026, I've set a simple goal:

Build software that reaches $1k/month in recurring revenue.

When that happens, I'll come back and update this page โœ๏ธ.

If you're interested in building alongside others who are trying to do the same thing, you're welcome to join the Skool community ๐Ÿš€

The problem

Every solo builder hits the same wall

You have two options. Both set you up for failure.

Path A

โ€œI'll build it myselfโ€

Auth, payments, webhooks, middleware, database schema, error handling, deployment configโ€ฆ You spend weeks on infrastructure before writing a single line of business logic. Most solo projects die here.

0+weeks on boilerplate
Progress to launch18%
AuthDBPaymentsFeaturesLaunch
Path B

โ€œI'll let AI figure it outโ€

AI generates code fast โ€” but without established patterns to follow, every prompt produces something different. Inconsistent auth checks, no error handling conventions, tangled imports. It works today. It breaks tomorrow.

month-3-of-vibe-coding.ts
// TODO: fix auth later
const data = JSON.parse(body??'{}');
// idk why this works
if(user!=null&&user!==undefined){
try{ db.query(`INSERT..`)
}catch(e){ console.log(e) }
// FIXME: breaks on edge cases
return new Response(ok??true);

The third path

Give AI a professional foundation to build on

SaaS-DNA gives you the architecture and conventions upfront โ€” the same patterns a senior engineer would lay down. Your AI follows them on every prompt, so the code stays clean on day 1 and day 100.

app/api/[anything]/route.ts
export async function POST(req) {
const user = await auth();
const data = await req.json();
return Response.json(result);
}
Every AI-generated route follows this pattern

Ship in days, not months

Auth, payments, database, webhooks, and deployment โ€” already wired. Jump straight to your product's unique value.

AI stays on the rails

Established patterns mean every prompt produces consistent, production-quality code. No drift, no spaghetti, no rewrites.

Scales with your ambition

The same conventions that make day-1 easy make day-100 manageable. Add features without fighting your own codebase.

Built with the stack AI knows best

Next.js 16React framework
Better AuthAuthentication
StripePayments
PrismaDatabase ORM

Point your AI at SaaS-DNA and start building

SaaS-DNA isn't just a template โ€” it's a foundation designed so AI can understand it, extend it, and build on top of it without breaking things.

1

AI-guided setup

Paste the setup docs into Claude or ChatGPT and it walks you through configuring Better Auth, Stripe, Supabase, and Vercel step by step โ€” for both web and mobile versions.

2

Describe what you want

Tell your AI โ€œadd a team invites featureโ€ or โ€œcreate an admin dashboard.โ€ The established patterns โ€” route structure, middleware, Prisma models, API conventions โ€” mean AI generates code that fits right in.

3

Ship it

Auth, payments, database, and deployment are already wired up. You skip the weeks of boilerplate and go straight to building the thing that makes your product different.

Why SaaS-DNA is perfect for vibe coding

Every file follows the same conventions. Every pattern is repeated consistently. This is what makes AI-assisted development actually work.

Consistent API patterns

Every API route follows the same structure โ€” auth check, validation, business logic, error handling. Tell AI to โ€œcreate a new API endpoint like the existing onesโ€ and it nails it every time.

Predictable file structure

Protected routes, public routes, API routes, components, and lib utilities are all where AI expects them to be. No guessing, no custom conventions to explain.

Type-safe from DB to UI

Prisma generates types from your schema. TypeScript catches mistakes at compile time. AI produces better code when the types are clear, and the feedback loop is instant.

Web and mobile ready

SaaS-DNA includes setup guides for both web (Next.js) and mobile (React Native / Expo) versions. Your AI can walk you through either path from the same codebase.

This storefront was vibe coded with SaaS-DNA

You're looking at it. This site โ€” the auth, the payments, the GitHub access system, this landing page โ€” was built by pointing an AI at SaaS-DNA and describing what we wanted.

What you see is what you get. And what you get is a codebase that AI already knows how to work with.

A structure AI already understands

Every folder, every file follows Next.js App Router conventions. AI tools already know where everything lives.

SaaS-DNA/
app/
(protected)/
dashboard/
layout.tsx
api/
webhooks/stripe/
auth/[...all]/
github/
sign-in/
page.tsx
layout.tsx
lib/
config/env.ts
db.ts
prisma/
schema.prisma
migrations/
components/
navbar.tsx
middleware.ts

Protected routes are grouped

The (protected) folder wraps all auth-required pages in a single layout that checks for a valid Better Auth session. AI knows to put new authenticated pages here.

API routes mirror the domain

Webhook handlers, GitHub integration, and business logic each get their own folder under app/api/. Every route follows the same auth โ†’ validate โ†’ respond pattern.

Database schema is the source of truth

Prisma schema defines models and relations. TypeScript types are auto-generated. AI reads the schema and instantly knows your data shape.

Middleware guards the perimeter

A single middleware.ts file handles auth checks and route protection using Better Auth session cookies. Public routes are explicitly listed โ€” everything else requires sign-in.

Every flow is mapped out

Auth, payments, and data sync follow clear, linear paths. Your AI reads these patterns and replicates them perfectly.

Authentication Flow

Every request passes through Better Auth middleware. Protected routes are automatically guarded โ€” no auth code scattered across pages.

Done for youYou build this
Request
Any route
Middleware
Session cookie check
Public?
/, /sign-in
Protected
(protected)/*
Render
YOU
Page component

Payment Flow

Stripe handles checkout. Webhooks sync payment status to your database. Access to your protected routes is automatic, so you can simply start coding your business logic without worrying about subscription status.

Done for youYou build this
Checkout
Stripe Payment Link
Webhook
session.completed
Database
Prisma upsert
Private routes
YOU
Add your business logic here

Data Flow

Better Auth stores users and sessions directly in Prisma. Stripe webhooks link payments. Everything flows through typed models โ€” AI never has to guess the shape.

Done for youYou build this
Auth
Sign-up / Sign-in
Better Auth
/api/auth/*
Prisma
User + Session
Payment
Linked by email
State
YOU
Single source of truth

One pattern. Every API route.

Tell your AI โ€œcreate a new API route like the existing onesโ€ and it produces correct, consistent code every time. Here's why.

app/api/[resource]/route.ts
1export async function POST(req: Request) {
2
3// 1. Authenticate
4const { userId } = await auth();
5if (!userId) return Response.json({ error: "Unauthorized" }, { status: 401 });
6
7// 2. Validate input
8const body = await req.json();
9if (!body.field) return Response.json({ error: "Missing field" }, { status: 400 });
10
11// 3. Business logic
12const result = await prisma.model.create({
13data: { userId, ...body },
14});
15
16// 4. Return response
17return Response.json(result);
18}
1

Authenticate

Check Better Auth session. Reject if not signed in.

2

Validate

Parse request body. Check required fields.

3

Execute

Run business logic via Prisma. Type-safe DB operations.

4

Respond

Return JSON with appropriate status code.

Why this matters: When every route follows the same 4-step pattern, AI tools generate code that matches your codebase perfectly. No cleanup, no refactoring โ€” just describe the endpoint and ship it.

The full stack, wired together

Every layer is connected, configured, and ready to go. No setup tutorials to follow โ€” just build.

Frontend

Next.js 16

App Router, Server Components, API Routes

React 19

UI components, hooks, client interactivity

Tailwind CSS

Utility-first styling, dark mode

Auth & Identity

Better Auth

Sign-in, sign-up, session management, middleware

Payments

Stripe

Payment links, checkout, webhook events

Data Layer

Prisma

ORM, typed queries, migrations

PostgreSQL

Relational database, via Supabase

Infrastructure

Vercel

Deployment, edge functions, domains

GitHub

Source code, CI/CD, collaborator access

How they connect

Better Auth
Next.js 16
Stripe
Next.js 16
Prisma
PostgreSQL
Better Auth
Prisma
Stripe
Prisma

All pre-configured. Webhook endpoints, middleware chains, database connections, and deployment pipelines are already wired. Point your AI at SaaS-DNA and start describing features.

5

Integrations

0

Config needed

100%

Type-safe

Four commands to a running SaaS

No hours of configuration. Fill in your environment variables, run two commands, and you have a fully working app. Your AI can walk you through the entire thing.

.env
# Database (Supabase)
DATABASE_URL=postgresql://...
DIRECT_URL=postgresql://...
# Auth (Better Auth)
BETTER_AUTH_SECRET=openssl rand -base64 32
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Payments (Stripe)
STRIPE_SECRET_KEY_TEST=sk_test_...
NEXT_PUBLIC_STRIPE_PAYMENT_LINK_URL_TEST=https://buy.stripe.com/...
STRIPE_WEBHOOK_SECRET_TEST=whsec_...

Every variable has a comment explaining where to get it. Paste the .env.example into ChatGPT or Claude and it guides you through each one.

1

Clone the repo

$git clone https://github.com/...

You get read-only access the moment you purchase. Clone it locally.

2

Fill in your .env

$cp .env.example .env

Every variable is documented. Or paste the setup guide into Claude and it fills them out for you.

3

Install dependencies

$npm install

One command. No custom build scripts, no monorepo setup.

4

Start building

$npm run dev

Auth, payments, database, webhooks โ€” all working. Start describing features to your AI.

That's it. Auth works. Payments work. Database is connected. Webhooks are listening. Start telling your AI what to build.

Simple pricing

One-time payment. Lifetime read-only access to the source code.

$29.99one-time
  • Full source code โ€” read-only GitHub access
  • Web + mobile setup guides for AI-assisted config
  • Next.js 16, Better Auth, Stripe, Prisma โ€” all wired up
  • Consistent patterns AI can extend instantly
  • Webhook infrastructure + deployment pipeline
  • Lifetime access โ€” no subscription
Get Access

Feeling intimidated by this template? ๐Ÿค”

That's completely okay. This template was built to be used the way a senior software engineer would โ€” and that's a skillset you can absolutely learn.

Join my Skool community and you'll get in-depth education on the fundamentals of programming so this template actually makes sense and you know how to guide the AI properly ๐Ÿง . I'll also give you access to my workflows, tools, and personal development process, so you can truly work with agentic AI to build real products fast โšก.

Whether you're just starting out, trying to build something that will get you a job, or like me, looking to build an application that will make you money โ€” I'll help you get there ๐Ÿš€๐Ÿ’ช.

๐Ÿ‘‹ Join the Skool Community