Skip to content

RomaLetodiani/Next-SaaS-Boilerplate

Repository files navigation

NextJS Boilerplate

A modern, feature-rich boilerplate for building scalable web applications with Next.js 15, React 19, and TypeScript.

πŸš€ Features

  • Modern Stack

    • Next.js 15 with App Router
    • React 19
    • TypeScript
    • Tailwind CSS
    • Prisma ORM
    • NextAuth.js v5
  • Authentication

    • OAuth providers support
    • Protected routes
  • UI/UX

    • Dark/Light mode
    • Responsive design
    • Modern animations
    • Toast notifications
    • Form validation
  • Developer Experience

    • TypeScript
    • ESLint
    • Prettier
    • Import sorting
    • Tailwind sorting
    • Turbopack support
    • Bun support
    • Husky

πŸ“¦ Tech Stack

Core

  • Next.js 15.1.3
  • React 19.0.0
  • TypeScript 5.x

UI & Styling

  • Tailwind CSS 3.4.1
  • Lucide Icons
  • Next Themes
  • Sonner (Toast notifications)

Forms & Validation

  • React Hook Form 7.54.2
  • Zod 3.24.1
  • @hookform/resolvers

Authentication

  • NextAuth.js 5.0 (Beta)
  • Prisma Adapter

Database

  • Prisma ORM 6.1.0
  • Prisma Client

Development Tools

  • ESLint 9.x
  • Prettier 3.4.2
  • Tailwind Merge
  • Various Prettier plugins

πŸš€ Getting Started

  1. Clone the repository
git clone https://github.com/RomaLetodiani/nextjs-boilerplate
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env
  1. Initialize database
npm run db:reset
  1. Start development server
npm run dev

πŸ“ Scripts

  • dev: Start development server with Turbopack
  • build: Build production application
  • start: Start production server
  • lint: Run ESLint
  • format: Format code with Prettier
  • db:generate: Generate Prisma client
  • db:push: Push database schema
  • db:reset: Reset database

πŸ—οΈ Project Structure

src/
β”œβ”€β”€ app/                   # App router pages
β”‚   β”œβ”€β”€ (auth)/            # Authentication routes
β”‚   β”‚   └── login/
β”‚   β”œβ”€β”€ (home)/            # Public pages
β”‚   β”‚   β”œβ”€β”€ about/
β”‚   β”‚   β”œβ”€β”€ blog/
β”‚   β”‚   β”œβ”€β”€ changelog/
β”‚   β”‚   β”œβ”€β”€ contact/
β”‚   β”‚   β”œβ”€β”€ docs/
β”‚   β”‚   β”œβ”€β”€ help/
β”‚   β”‚   β”œβ”€β”€ legal/
β”‚   β”‚   β”œβ”€β”€ pricing/
β”‚   β”‚   β”œβ”€β”€ resources/
β”‚   β”‚   β”œβ”€β”€ search/
β”‚   β”‚   β”œβ”€β”€ sitemap/
β”‚   β”‚   β”œβ”€β”€ status/
β”‚   β”‚   β”œβ”€β”€ layout.tsx     # Home Layout
β”‚   β”‚   └── page.tsx       # Homepage
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   └── dashboard/         # Protected dashboard
β”œβ”€β”€ assets/                # Assets
β”‚   β”œβ”€β”€ hero.png           # Hero Image
β”‚   └── svgs               # SVGs
β”œβ”€β”€ components/            # Reusable components
β”‚   β”œβ”€β”€ (auth)/            # Auth components
β”‚   β”œβ”€β”€ (home)/            # Public components
β”‚   β”‚   └── views/         # Homepage sections
β”‚   β”œβ”€β”€ common/            # Shared components
β”‚   └── dashboard/         # Dashboard components
β”œβ”€β”€ layout/                # Layout components
β”‚   β”œβ”€β”€ (auth)/            # Auth layout
β”‚   β”œβ”€β”€ (home)/            # Public layout
β”‚   β”‚   β”œβ”€β”€ header/
β”‚   β”‚   └── footer/
β”‚   └── dashboard/         # Dashboard layout
β”œβ”€β”€ lib/                   # Library code
β”‚   β”œβ”€β”€ auth/              # Authentication
β”‚   β”œβ”€β”€ prisma/            # Database
β”‚   └── logger             # Logger
β”œβ”€β”€ types/                 # TypeScript types
└── utils/                 # Utilities

πŸ”’ Legal Pages

The boilerplate includes pre-built legal pages:

  • Privacy Policy
  • Terms & Conditions
  • Cookie Policy
  • GDPR Compliance
  • Service Level Agreement
  • Data Processing Agreement
  • Acceptable Use Policy
  • Copyright Policy
  • Refund Policy

πŸ› οΈ Development

Prerequisites

  • Node.js 18+
  • npm/yarn/pnpm
  • Database (PostgreSQL recommended)

Environment Variables

DATABASE_URL=""
NEXTAUTH_URL=""
NEXTAUTH_SECRET=""

πŸ“„ License

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

πŸ‘€ Author

Roman Letodiani

🀝 Contributing

Contributions, issues and feature requests are welcome!

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

πŸ™ Special Thanks

This project leverages these amazing technologies:

Next.js React TypeScript Tailwind CSS Prisma NextAuth.js

Additional Technologies

  • React Hook Form
  • Zod
  • Lucide Icons
  • Next Themes
  • Sonner

Development Tools

  • ESLint
  • Prettier
  • Turbopack

πŸ’ Support

If you find this project helpful, please consider:

  • ⭐ Starring the project on GitHub
  • πŸ› Opening issues for bugs or feature requests
  • πŸ”€ Contributing with pull requests
  • πŸ“’ Sharing the project with others

🀝 Community

Join our community to get help, share ideas, and collaborate:


Made with ❀️ by Roman Letodiani

About

NextJS SaaS Boilerplate - Next.js 15, React 19, TypeScript, Tailwind CSS, Husky

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages