A modern, full-featured SaaS boilerplate built with Next.js, React, TypeScript, Tailwind CSS, and PostgreSQL. This template provides a solid foundation for building production-ready SaaS applications with best practices and modern tools.
- Framework: Next.js 15.3.4 with App Router & Server Components
- UI Library: React 19
- Language: TypeScript 5
- Styling:
- Tailwind CSS 4
- tw-animate-css
- Shadcn UI components (Accessible UI components built with Radix UI and Tailwind)
- Fonts: Geist Sans & Mono via
next/font/google - Theme: Dark/Light mode support via next-themes
- Notifications: Sonner toast library
- API: Next.js App Router (with Server Actions for mutations and API routes)
- Database ORM: Prisma 6 with Prisma Accelerate
- Database: PostgreSQL
- Authentication: BetterAuth
- Validation: Zod
- π Authentication System - Complete auth flow with BetterAuth including sign-in, sign-up, password reset, and email verification
- π¨ Modern UI - Clean, responsive UI built with Tailwind CSS and Shadcn UI components
- π Dark Mode - Full dark mode support with persistent theme selection
- π SEO Ready - Complete metadata configuration with Open Graph and Twitter card support
- π± Responsive Design - Mobile-first design approach that works on all devices
- π Performance Optimized - Built with performance in mind, using Turbopack for fast builds
- π§© Modular Architecture - Well-structured components and pages for easy customization
- π Dashboard - Ready-to-use dashboard layout with protected routes
- π Legal Pages - Pre-built templates for privacy policy and terms of service
- π¨ Newsletter - Newsletter subscription component
- π° Pricing - Pricing section for your SaaS products
- β FAQ - Frequently asked questions section
- π’ Used By - Social proof section to showcase your customers
- π Features Section - Highlight your product's key features
qlever-next-saas-template/
βββ app/ # Next.js App Router directory
β βββ @auth/ # Auth-related parallel routes
β βββ api/ # API routes
β βββ dashboard/ # Dashboard pages (protected)
β βββ legal/ # Legal pages (privacy, terms)
β βββ sign-in/ # Sign-in page
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout with providers
β βββ page.tsx # Home page
βββ components/ # React components
β βββ dashboard/ # Dashboard-specific components
β βββ forms/ # Form components
β βββ home/ # Landing page components
β β βββ faq.tsx
β β βββ features.tsx
β β βββ hero.tsx
β β βββ newsletter.tsx
β β βββ pricing.tsx
β β βββ used-by.tsx
β βββ layout/ # Layout components (header, footer, etc.)
β βββ providers/ # Context providers
β βββ ui/ # Reusable UI components
βββ lib/ # Utility functions and hooks
β βββ generated/ # Generated files (Prisma client)
βββ prisma/ # Prisma schema and migrations
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ .env # Environment variables
βββ .env.example # Example environment variables
βββ components.json # Shadcn UI configuration
βββ middleware.ts # Next.js middleware (auth protection)
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript configuration
-
Clone the repository:
git clone https://github.com/wemilabs/qlever-next-saas-template.git cd qlever-next-saas-template -
Install dependencies:
pnpm install
-
Set up your environment variables: Copy the
.env.examplefile to.envand fill in your values:cp .env.example .env
Update the
DATABASE_URLwith your PostgreSQL connection string. -
Generate the Prisma client:
pnpm exec prisma generate -
Start the development server:
pnpm dev
-
Open your browser and navigate to http://localhost:3000
pnpm dev- Start development server with Turbopackpnpm build- Build the application for productionpnpm start- Start production serverpnpm lint- Run ESLint to check code quality
This template uses Shadcn UI components. To add a new component:
pnpm dlx shadcn@latest add <component-name>Then import the component in your project:
import { ComponentName } from "@/components/ui/component-name";Authentication is handled by BetterAuth, with protected routes configured in middleware.ts. The dashboard is protected by default and requires authentication.
The template is optimized for deployment on Vercel, but can be deployed to any platform that supports Next.js applications.
- Push your code to a GitHub, GitLab, or Bitbucket repository
- Import the project into Vercel
- Set environment variables in the Vercel dashboard
- Deploy
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β₯ by cuttypie