Skip to content

wemilabs/qlever-next-saas-template

Repository files navigation

The Qlever Stack

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.

πŸ“š Technology Stack

Frontend

Backend

Development Tools

  • Package Manager: pnpm
  • Bundler: Turbopack (via Next.js)
  • Linting: ESLint

✨ Features

  • πŸ”’ 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

πŸ—‚οΈ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or newer)
  • pnpm (v8 or newer)
  • PostgreSQL database (or Neon.tech account)

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/wemilabs/qlever-next-saas-template.git
    cd qlever-next-saas-template
  2. Install dependencies:

    pnpm install
  3. Set up your environment variables: Copy the .env.example file to .env and fill in your values:

    cp .env.example .env

    Update the DATABASE_URL with your PostgreSQL connection string.

  4. Generate the Prisma client:

    pnpm exec prisma generate
  5. Start the development server:

    pnpm dev
  6. Open your browser and navigate to http://localhost:3000

πŸ“ Development

Available Scripts

  • pnpm dev - Start development server with Turbopack
  • pnpm build - Build the application for production
  • pnpm start - Start production server
  • pnpm lint - Run ESLint to check code quality

Adding New Components

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

Authentication is handled by BetterAuth, with protected routes configured in middleware.ts. The dashboard is protected by default and requires authentication.

🌐 Deployment

The template is optimized for deployment on Vercel, but can be deployed to any platform that supports Next.js applications.

Deploying to Vercel

  1. Push your code to a GitHub, GitLab, or Bitbucket repository
  2. Import the project into Vercel
  3. Set environment variables in the Vercel dashboard
  4. Deploy

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with β™₯ by cuttypie

About

Build and Ship SaaS apps at πŸš€ speed with the best modern cutting-edge tools.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published