Building a SaaS application from scratch can be overwhelming. Between authentication, payments, database setup, and creating a polished UI, there's a lot to handle before you can even start working on your core product features.
That's where SaaS Template comes in. Our production-ready template gives you everything you need to launch your SaaS quickly.
What's Included
Our template comes with a complete tech stack that's been battle-tested in production:
- Next.js 15 with App Router and Turbopack
- Auth.js for authentication (magic links + Google OAuth)
- Stripe for payments and subscriptions
- Prisma with PostgreSQL
- Tailwind CSS with shadcn/ui components
Quick Start
Getting started is simple. Clone the repository and install dependencies:
npx create-saas-template my-saas-app
cd my-saas-app
pnpm install
Then configure your environment variables:
cp .env.example .env
Fill in your API keys for:
- Database connection (PostgreSQL)
- Auth.js secret
- Stripe API keys
- Resend for emails
Setting Up Authentication
Authentication is pre-configured with Auth.js. The template supports:
- Magic Links - Passwordless email authentication
- Google OAuth - One-click sign in with Google
Users can sign in from /login and will be redirected to the dashboard after authentication.
Configuring Stripe
Stripe is integrated for handling subscriptions. To set it up:
- Create a Stripe account
- Add your API keys to
.env - Create your products in Stripe Dashboard
- Update the pricing in
src/lib/billing/plans.ts
The webhook handler at /api/stripe/webhook automatically syncs subscription status.
Customizing the Dashboard
The dashboard is fully customizable. Key files to modify:
src/app/(dashboard)/dashboard/page.tsx- Main dashboardsrc/components/dashboard/- Dashboard componentssrc/app/globals.css- Theme colors
Next Steps
Once you have the basics running:
- Customize the landing page
- Add your product features
- Configure your pricing plans
- Set up your production database
- Deploy to Vercel
Ready to build? Check out our documentation for more detailed guides.