Next.jsReactSaaSStarter

saas-starter-kit — Next.js SaaS Template

By stephenw310

A Next.js-based SaaS application starter template integrating Auth.js authentication, Drizzle ORM, and PostgreSQL, with the UI left blank for users to build themselves.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-02View source

What stands out

A quick read of the recorded project description.

01

Integrates Auth.js, supporting Google OAuth and Resend email Magic Link login

02

Uses PostgreSQL with Drizzle ORM, with schema based on the authentication table structure from @auth/drizzle-adapter

03

Manages database migrations via Drizzle Kit, providing db:migrate and db:studio scripts

04

Includes ESLint, Prettier, and Husky pre-commit hooks, with TypeScript covering the entire project

05

Does not bind to a UI framework; the interface is left blank so you can choose your own component solution

06

README provides deployment instructions for Vercel, Docker, and Node.js server

Template Details

This is a Next.js starter template for SaaS applications, described in its repository as a "modern full-stack SaaS starter kit." It pre-wires authentication, database, and development tooling, but deliberately does not provide a UI component library; page styling must be implemented according to the user's preferences.

Technically, the template uses the Next.js App Router to organize code, TypeScript throughout the project, Tailwind CSS for styling, PostgreSQL with Drizzle ORM for data, and Auth.js for authentication, offering two login methods: Google OAuth and email Magic Link via Resend. The database schema directly adopts the authentication table structure provided by @auth/drizzle-adapter, including users, accounts, sessions, verificationTokens, and authenticators.

On the engineering side, it includes ESLint, Prettier, Husky pre-commit hooks, and database migrations managed by Drizzle Kit; scripts cover development, build, start, lint, format, db:migrate, and db:studio. For deployment, the README provides three methods: Vercel, Docker, and Node.js server, and lists the environment variables required for production.

Limitations are also clear: the README's TODO indicates that Stripe payment integration and email templates are not yet complete, so the template itself does not include subscription billing capabilities; the UI must be chosen and built independently; before use, you need your own PostgreSQL database and must apply for Google OAuth credentials and a Resend API key. The repository has few stars and is a personally maintained starter project.

Next.jsSaaSStarter

Is it right for your project?

Use Cases

  • Quickly setting up a SaaS project skeleton with login capabilities
  • Managing PostgreSQL data and migrations with Drizzle ORM
  • Deciding on the frontend UI approach yourself, without accepting a template's preset component library
  • A Next.js project starting point that needs Docker or Vercel deployment paths

Suitable For

  • Developers familiar with Next.js and TypeScript who are ready to build a SaaS from scratch
  • Those who prefer Drizzle ORM over other ORMs
  • Users willing to configure Google OAuth, Resend, and PostgreSQL themselves
  • Individual or team projects that need freely modifiable code under the MIT license

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Requires Node.js v20 or higher and an available PostgreSQL database

  2. 2

    Copy .env.example to .env and fill in DATABASE_URL, AUTH_SECRET, AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET, and RESEND_API_KEY

  3. 3

    After installing dependencies, run npm run db:migrate to execute database migrations, then npm run dev to start the development server

  4. 4

    For Google OAuth, create credentials in the Google Cloud Console; the development callback URL is http://localhost:3000/api/auth/callback/google

  5. 5

    For email login, obtain an API key from Resend, change the sender domain in src/lib/auth.ts, and verify that domain in the Resend dashboard

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not imply that external services or third-party assets are free.

Must comply with when using

  • You are allowed to use, modify, commercialize, and distribute the code of this version for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Email Magic Link login depends on the third-party service Resend; you need to register an account and obtain an API key, which is an external service dependency.
  • Google OAuth login requires you to create a project and OAuth credentials in the Google Cloud Console, which is an external account and configuration requirement.
  • Before use, you need your own available PostgreSQL database; the template itself does not provide database hosting.
  • The README's TODO indicates that Stripe payment integration is not yet complete, and the template does not include subscription billing capabilities.
  • Email templates are not yet complete; email-related interfaces need to be implemented yourself.
  • The interface is deliberately left blank, with no UI component library provided; page styling requires you to choose and build your own solution.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domain, hosting, database, payment, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Sign up for [Resend](https://resend.com/)

Original README

Create a project in [Google Cloud Console](https://console.cloud.google.com/)

Original README

[PostgreSQL](https://www.postgresql.org/) database

Original README

- [ ] Stripe payment integration

Original README

- [ ] Email templates

Original README

The UI is purposely left blank to allow you to build with your preferred library and components.

Original README
https://github.com/stephenw310/saas-starter-kit/blob/main/LICENSEhttps://github.com/stephenw310/saas-starter-kit/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 82 / 100
Technologies
Next.js · React
Website type
SaaS · Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2025-06-17
Screenshot last checked
2026-10-02

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: 444b799c27dcab26bfbefe4fa7069a2c3fe40041b353d46ce8b4618dbe4320b6

2026-10-02T22:15:01.696Z

Source file / repository
# SaaS Starter Kit

A modern, full-stack SaaS starter kit built with **Next.js 15**, **Tailwind CSS**, **Drizzle ORM**, and **Auth.js**. This template provides a solid foundation for building SaaS applications with authentication, database management, and modern development tooling. The UI is purposely left blank to allow you to build with your preferred library and components.

## 🚀 Features

- **Modern Tech Stack**: Next.js 15, React 19, Tailwind CSS v4, Auth.js v5 and more
- **Authentication**: Auth.js v5 with Google OAuth and Magic Link email providers (Resend)
- **Database**: PostgreSQL with Drizzle ORM
- **Code Quality**: ESLint, Prettier, Husky pre-commit hooks
- **Type Safety**: Full TypeScript support
- **Database Migrations**: Automated with Drizzle Kit
- **Flexible UI**: No UI framework dependency - build with your preferred components

## 🛠️ Tech Stack

- **Framework**: [Next.js](https://nextjs.org/)
- **Language**: [TypeScript](https://www.typescriptlang.org/)
- **Database**: [PostgreSQL](https://www.postgresql.org/)
- **ORM**: [Drizzle ORM](https://orm.drizzle.team/)
- **Authentication**: [Auth.js](https://authjs.dev/)
- **Styling**: [Tailwind CSS](https://tailwindcss.com/)
- **Code Formatting**: [Prettier](https://prettier.io/)
- **Linting**: [ESLint](https://eslint.org/)
- **Git Hooks**: [Husky](https://typicode.github.io/husky/)

## 📋 Prerequisites

Before you begin, ensure you have the following installed:

- [Node.js](https://nodejs.org/) (v20 or higher)
- [PostgreSQL](https://www.postgresql.org/) database
- [Git](https://git-scm.com/)

## 🎯 Quick Start

### 1. Clone the Repository

```bash
git clone https://github.com/stephenw310/saas-starter-kit.git
cd saas-starter-kit
```

### 2. Install Dependencies

```bash
npm install
```

### 3. Environment Setup

Copy the `.env.example` file to `.env` and update the values:

### 4. Database Setup

Run the database migrations:

```bash
npm run db:migrate
```

### 5. Start Development Server

```bash
npm run dev
```

Visit [http://localhost:3000](http://localhost:3000) to see your application running.

## 🔧 Available Scripts

- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run start` - Start production server
- `npm run lint` - Run ESLint
- `npm run format` - Format code with Prettier
- `npm run db:migrate` - Generate and run database migrations
- `npm run db:studio` - Open Drizzle Studio for database management

## 🔐 Authentication

This template supports multiple authentication methods:

### 1. Google OAuth

1. Create a project in [Google Cloud Console](https://console.cloud.google.com/)
2. Navigate to APIs & Services > Credentials
3. Configure the OAuth consent screen
4. Create OAuth 2.0 credentials (Web application)
5. Add authorized redirect URI: `http://localhost:3000/api/auth/callback/google` for development
6. Copy the client ID and secret
7. Add to `.env`

For more details, see the [Auth.js OAuth Guide](https://authjs.dev/getting-started/authentication/oauth)

### 2. Email Magic Link (Resend)

1. Sign up for [Resend](https://resend.com/)
2. Get your API key from the dashboard
3. Add it to your `.env` file
4. Update the sender domain in `src/lib/auth.ts` (currently set to "[email protected]")
5. Verify the sender domain in the Resend portal

## 🗄️ Database Schema

The template uses the authentication schema provided by the [@auth/drizzle-adapter](https://authjs.dev/getting-started/adapters/drizzle) package, which includes:

- **users** - Core user accounts and profile data
- **accounts** - OAuth provider account links
- **sessions** - Active user sessions
- **verificationTokens** - Email verification tokens for magic links
- **authenticators** - WebAuthn authenticators

## 📁 Project Structure

```
src/
├── app/                  # Next.js App Router
│   ├── api/              # API routes
│   ├── globals.css       # Global styles
│   ├── layout.tsx        # Root layout
│   └── page.tsx          # Home page
├── components/           # React components
│   └── auth/             # Authentication components
├── db/                   # Database configuration
│   ├── drizzle/          # Migration files
│   └── schema.ts         # Database schema
├── lib/                  # Utility functions
│   └── auth.ts           # Authentication configuration
└── middleware.ts         # Middleware
```

## 🔄 Development Workflow

This template includes several development tools to ensure code quality:

- **Pre-commit hooks**: Automatic code formatting and linting with Husky
- **Type checking**: Full TypeScript support across the entire codebase
- **Database migrations**: Automated schema management with Drizzle Kit
- **Code formatting**: Prettier with Tailwind CSS plugin for consistent styling
- **Linting**: ESLint with Next.js and Prettier configurations

## 🚀 Deployment

### Environment Variables

Make sure to set all required environment variables in your production environment:

- `DATABASE_URL` - PostgreSQL connection URL
- `AUTH_SECRET` - Random string used to encrypt cookies and tokens
- `AUTH_GOOGLE_ID` - Google OAuth client ID
- `AUTH_GOOGLE_SECRET` - Google OAuth client secret
- `RESEND_API_KEY` - API key from Resend for email authentication

**Important**: Remember to update the authorized redirect URI in your Google Cloud Console to match your production domain:
`https://your-domain.com/api/auth/callback/google`

### Vercel Deployment

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fstephenw310%2Fsaas-starter-kit)

### Docker Deployment

1. [Install Docker](https://docs.docker.com/get-started/get-docker/) on your machine.

2. Set `NEXTAUTH_URL` in your `.env` file to the URL of your Docker container. For example, if you are running the container on your local machine, you can set it to `http://localhost:3000`.

3. Build your container: `docker build -t saas-starter-kit .`

4. Run your container: `docker run -p 3000:3000 saas-starter-kit`

### Node.js Server Deployment

```bash
npm run build
npm run start
```

## 📝 TODO

- [x] ~~Docker deployment configuration~~
- [ ] Stripe payment integration
- [ ] Email templates

## 🤝 Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

This project is licensed under the MIT [LICENSE](LICENSE).

## 🆘 Support

If you have any questions or need help getting started, you can:

- Check the [Next.js documentation](https://nextjs.org/docs)
- Review the [Auth.js documentation](https://authjs.dev/)
- Open an [issue](https://github.com/stephenw310/saas-starter-kit/issues)

---

**Happy coding!** 🎉
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.