Skip to content

Modern Next.js 15 SaaS Starter – a production-ready boilerplate with BetterAuth (Google, GitHub, Email), Stripe subscriptions, PostgreSQL + Drizzle ORM, shadcn/ui components, and AI integration. Launch your SaaS fast with secure auth, payments, and modern UI.

License

Notifications You must be signed in to change notification settings

pantaleone-ai/Nextjs15-BetterAuth-Stripe-Shadcn-SAAS-Starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pantaleone AI SaaS Starter

A comprehensive SaaS starter template built with Next.js 15, designed to accelerate the development of AI-powered SaaS applications with modern best practices and scalable architecture.

Logo TypeScript PostgreSQL Stripe OpenAI Google Analytics

SaaS Starter (Next.js 15 + BetterAuth + Stripe + shadcn/ui)

A Lean Starter Template for building a SaaS with authentication, payments, and AI.

mobile ui


βœ… Quick Setup

git clone <your-repo-url>
cd <repo-folder>
pnpm install
cp .env.example .env.local
Fill in .env.local with your credentials:

DATABASE_URL

NEXTAUTH_SECRET

BETTER_AUTH_URL

OAuth: AUTH_GITHUB_ID, AUTH_GITHUB_SECRET, etc.

OPENAI_API_KEY

Stripe: STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_WEBHOOK_SECRET

Optional: NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_GA_MEASUREMENT_ID, SMTP settings, THEME, etc.

Then:

bash
Copy code
pnpm db:generate
pnpm db:migrate
pnpm seed   # optional
pnpm dev
App runs at http://localhost:3000.

πŸ›  Customization Cheatsheet

Feature What to Edit Path(s) Brand & Theme Copy themes/base β†’ themes/your-brand, adjust CSS, update THEME env themes/…, next.config.ts Auth / OAuth Providers Add provider in config & add env vars src/lib/auth/config.ts Database / Models Add tables in schema, relations, then regenerate & migrate src/db/schema.ts Stripe / Payments Create products in Stripe, sync or customize logic, webhook handlers src/lib/stripe/, src/app/api/stripe/webhook/route.ts AI / Chat Edit model, system prompts, user context logic src/app/api/chat/route.ts, chat UI files SEO / Metadata / Analytics Update metadata in layout & analytics logic src/app/layout.tsx, src/lib/analytics.ts Pages / Content Add blog posts (MDX) or custom pages under src/app/ src/content/blog/, src/app/(marketing)/…

βœ… Deployment Notes

Copy all .env.local variables into your production/hosting environment.

Ensure OAuth redirect URLs & Stripe webhook URLs reflect your production domain.

Run database migrations before starting.

For Vercel, you can use their dashboard or one-click deploy; ensure environment variables and functions are configured correctly.

⚠️ Troubleshooting Tips

OAuth redirect errors β†’ ensure callback URLs match domain & env settings

Database connection issues β†’ check DATABASE_URL, ensure DB is running

Stripe webhook failures β†’ verify webhook secret & event handling

Chat / AI not working β†’ check OPENAI_API_KEY is valid

🧩 Commands & Scripts

pnpm dev β€” start development

pnpm build && pnpm start β€” build & run

pnpm lint / pnpm check-types β€” linting / type checking

mobile ui mobile ui mobile ui

pnpm analyze β€” bundle analysis

pnpm db:studio β€” DB exploration tool

About

Modern Next.js 15 SaaS Starter – a production-ready boilerplate with BetterAuth (Google, GitHub, Email), Stripe subscriptions, PostgreSQL + Drizzle ORM, shadcn/ui components, and AI integration. Launch your SaaS fast with secure auth, payments, and modern UI.

Topics

Resources

License

Stars

Watchers

Forks