Skip to content

KadenHD/nextjs-saas-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js SaaS Template

A production-ready SaaS starter kit built with Next.js to help you launch your web application faster. It comes with pre-built authentication, billing, dashboards, and everything you need to start a modern SaaS product.

It also includes a FastAPI backend to securely execute your SaaS business logic and allow access to your product data only if the API key is valid.

You can replace the backend with whatever suit to you.

Features

  • 🔐 Authentication - Email/password, OAuth (Google, GitHub), magic links
  • 💳 Billing & Subscriptions - Stripe integration with plans & invoices
  • 🗄 Database & ORM - Pre-configured with Prisma (PostgreSQL)
  • 📁 File Storage Management - Store and authenticated ressources access
  • 👤 User Management - Accounts, profile pages, and roles
  • 📊 Admin Dashboard - Monitor users, subscriptions, and analytics
  • 📧 Email System - Transactional emails & notifications
  • 🎨 UI Components - Pre-designed responsive components and pages
  • 🚀 Deployment Ready - Optimized for Vercel or any Node.js host
  • ⚙️ API Routes & Server Actions - Ready-to-use backend endpoints
  • 🧱 Environment Config - .env template for easy setup

Getting Started

0. Prerequisites

Make sure you have the following installed:

1. Clone the repository

git clone https://github.com/KadenHD/nextjs-saas-template.git
cd nextjs-saas-template

2. Install dependencies

Backend

Create a Python virtual environment and install dependencies.

cd backend
python -m venv .venv
source .venv/bin/activate 2>/dev/null || source .venv/Scripts/activate
pip install -r requirements.txt

Dashboard

Install Node dependencies.

cd dashboard
npm install

3. Configure environment

Create your .env file from the example template.

cp .env.example .env

Copy it to both services:

cp .env backend/.env
cp .env dashboard/.env.local

4. Run the development server

Start required services using Docker.

docker compose up -d

Run Backend

cd backend
source .venv/bin/activate 2>/dev/null || source .venv/Scripts/activate
make dev

The API will be available on: http://localhost:5001

Run Dashboard

cd dashboard
npm run dev

The Dashboard will be available on: http://localhost:5000

Deployment

Deploy Backend

cd backend
source .venv/bin/activate 2>/dev/null || source .venv/Scripts/activate
make prod

The API will be available on: http://localhost:5001

Deploy Dashboard

cd dashboard
npm run build
npm run start

The Dashboard will be available on: http://localhost:5000

Tech Stack

Contributing

Contributions are welcome! Feel free to submit issues or pull requests for improvements.

License

MIT License © 2026

About

Next.js SaaS Template is a production-ready starter kit for building and launching a Software-as-a-Service (SaaS) application using Next.js.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages