A modern SaaS boilerplate built with Next.js 15, featuring Prisma + Better Auth for a robust development experience.
- Authentication: Better Auth with social login (Google) and magic links
- Database: PostgreSQL with Prisma ORM for type safety and migrations
- Payments: Stripe and LemonSqueezy integration
- UI Components: Radix UI with Tailwind CSS
- Email: Resend, Nodemailer, or SendGrid support
- Analytics: Umami and PostHog integration
- Rate Limiting: Upstash Redis for API protection
- SEO Optimized: Built-in metadata and OpenGraph support
- Framework: Next.js 15 (App Router)
- Database: PostgreSQL + Prisma ORM
- Authentication: Better Auth
- Styling: Tailwind CSS + Radix UI
- Email: Resend (configurable)
- Payments: LemonSqueezy (configurable to Stripe)
- Deployment: Vercel ready
- Node.js 18+ and bun/npm
- PostgreSQL database
- Google OAuth credentials (for social login)
- Clone and install
git clone <repo-url>
cd build-fast
bun install- Environment setup
cp .env.example .env.local- Configure environment variables
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
# Authentication (Better Auth)
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Email (choose one)
RESEND_API_KEY="your-resend-api-key"
RESEND_FROM_EMAIL="noreply@yourdomain.com"
# Payments (choose one)
STRIPE_SECRET_KEY=""
STRIPE_PUBLISHABLE_KEY=""
STRIPE_WEBHOOK_SECRET=""
LEMONSQUEEZY_API_KEY=""
LEMONSQUEEZY_STORE_ID=""
LEMONSQUEEZY_WEBHOOK_SECRET=""
# Analytics (optional)
UMAMI_WEBSITE_ID=""
UMAMI_URL=""
POSTHOG_KEY=""
POSTHOG_HOST=""
# Rate Limiting (optional)
UPSTASH_REDIS_REST_URL=""
UPSTASH_REDIS_REST_TOKEN=""
# App Configuration
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Database setup
# Generate Prisma client and run migrations
bun db:generate
bun db:push- Run development server
bun devbuild-fast/
├── app/
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Protected dashboard pages
│ ├── api/ # API routes
│ └── globals.css # Global styles
├── components/
│ ├── auth/ # Authentication components
│ ├── dashboard/ # Dashboard components
│ ├── landing/ # Landing page components
│ ├── ui/ # Reusable UI components
│ └── shared/ # Shared components
├── lib/
│ ├── auth.ts # Better Auth configuration
│ ├── db/ # Database client
│ ├── stripe/ # Stripe utilities
│ ├── lemonSqueezy/ # LemonSqueezy utilities
│ ├── email/ # Email configuration
│ └── schemas/ # Zod validation schemas
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── prisma/ # Database schema and migrations
└── scripts/ # Setup and deployment scripts
The boilerplate uses Prisma with PostgreSQL. Key models include:
- User: Authentication and profile data
- Waitlist: Email collection for landing pages
- Session: Better Auth session management
Built with Better Auth featuring:
- Social Login: Google OAuth (easily extendable)
- Magic Links: Passwordless authentication
- Session Management: Secure cookie-based sessions
- Type Safety: Full TypeScript integration
Supports both Stripe and LemonSqueezy:
- Stripe: Traditional payment processing
- LemonSqueezy: Modern payment platform with better international support
- Webhooks: Automatic subscription management
- Customer Portal: Self-service billing management
- Radix UI: Accessible component primitives
- Tailwind CSS: Utility-first styling
- Shadcn/ui: Beautiful component library
- Dark Mode: Built-in theme switching
- Responsive: Mobile-first design
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
Make sure to set all required environment variables in your deployment platform.
Update config.ts:
services: {
payment: 'stripe', // or 'lemonsqueezy'
}Choose your email provider in config.ts:
services: {
email: 'resend', // or 'nodemailer' or 'sendgrid'
}- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Create an issue for bug reports
- Join our Discord for community support
- Check the documentation for detailed guides
Built with ❤️ using modern web technologies.