NextAuth.js authentication system supporting email/password, Google OAuth, and GitHub OAuth
NextJS-CC-Starter-Kit — Next.js SaaS Template
By mklozinski
A Next.js-based SaaS starter that integrates NextAuth authentication, Prisma + MongoDB database, Resend email, and Stripe payments, including a password reset flow.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Prisma + MongoDB data models including User, Account, Session, and VerificationToken
Password reset flow with email notifications, reset token valid for 1 hour
Responsive email templates written with Resend, React Email, and Tailwind CSS
Stripe Checkout session and webhook handling examples, including pricing page and multi-tier price ID configuration
Dark/light theme switching via next-themes, with full TypeScript typing
Template Details
NextJS-CC-Starter-Kit is a Next.js starter aimed at SaaS development, with the repository under the MIT license. It pre-builds several common foundational capabilities for SaaS projects: NextAuth.js authentication (email/password, Google OAuth, GitHub OAuth), data models based on Prisma and MongoDB, a password reset flow with email notifications, and payment examples using Stripe Checkout and webhooks. At the page level, it provides routes for the homepage, pricing page, a protected dashboard example, login, registration, forgot password, and reset password.
The email part uses Resend with React Email and Tailwind CSS to write templates; the repository includes two types of templates: forgot password and reset success. The database models cover User, Account, Session, and VerificationToken, where the role field is marked for future use and no admin backend is currently implemented.
Before use, you need to prepare MongoDB, Resend, and Stripe accounts yourself, and fill in variables such as database, NextAuth, OAuth, email, and Stripe price IDs in .env. The repository provides scripts such as db:push, db:seed, and db:studio; for production, it is recommended to switch to prisma migrate deploy. Third-party assets such as demo images, fonts, and icons need to be checked separately under their respective licenses; external services such as domain, hosting, database, payment, and email may incur additional charges.
Is it right for your project?
Use Cases
- Rapidly building SaaS product prototypes that require account systems and subscription payments
- Adding email/password login, OAuth login, and password reset to a Next.js project
- Referencing how to integrate Stripe Checkout and webhooks in Next.js
- Writing transactional email templates with React Email and Tailwind CSS
- Establishing user and session-related data models with Prisma + MongoDB
Suitable For
- Developers familiar with Next.js and TypeScript who want to skip building basic authentication and payments
- SaaS projects that need a mixed login solution with email/password and OAuth
- Teams planning to use MongoDB and access the database through Prisma
- Developers who need examples of Stripe subscription checkout and email notifications
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Requires Node.js 18+, MongoDB (local or Atlas), a Resend account, and a Stripe account
- 2
Copy .env.example to .env and fill in core variables such as DATABASE_URL, NEXTAUTH_URL, and NEXTAUTH_SECRET
- 3
Configure OAuth, Google Analytics, Resend, and Stripe-related variables as needed; leave them blank if unused
- 4
Run npx prisma generate and npx prisma db push to initialize the database; optionally run npm run db:seed
- 5
For production, use npx prisma migrate deploy for migrations and set all required environment variables on the deployment platform
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are permitted.
- 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
- Using email features (password reset emails, email templates) requires registering a Resend account and providing RESEND_API_KEY, which is an external service dependency.
- Using payment features requires registering a Stripe account and configuring keys such as STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, and each price ID.
- You need to provide your own MongoDB database (local installation or MongoDB Atlas) and fill in DATABASE_URL to run.
- The role field in the User model is for future use only; no admin backend functionality is currently implemented, so you should not expect a ready-made admin interface.
- For production, use prisma migrate deploy for database migrations rather than the development-oriented db push.
- Demo images, fonts, icons, and other third-party assets need to be checked under 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
Resend account for email functionality
Original README
Stripe account for payments
Original README
MongoDB (local installation or MongoDB Atlas)
Original README
roles for future use, right now admin dashboard not implemented
Original README
https://github.com/mklozinski/NextJS-CC-Starter-Kit/blob/main/LICENSEhttps://github.com/mklozinski/NextJS-CC-Starter-Kit/blob/main/README.md# In production, use migrate instead of db push
Original README
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-09-18
- 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: 56310284c17ce086a30fdcf9fbde7acec91c4f5f75f3207899f3b02c9d217b99
2026-10-02T14:02:06.641Z
Source file / repository# Next.js Starter Kit A modern, production-ready Next.js starter kit with authentication, database integration, password reset functionality, and all the essential tools you need to build your next web application. ## Features - **Next.js 15** - App Router, Server Components, and optimized performance - **Authentication** - Complete auth system with NextAuth.js - **Password Reset** - Secure password reset functionality with email notifications - **Email Templates** - Beautiful email templates using React Email and Tailwind CSS - **Database** - MongoDB with Prisma ORM for type-safe database operations - **Payments** - Stripe Checkout sessions with secure webhook handling - **Styling** - Tailwind CSS for rapid UI development - **Dark/Light Theme** - Theme switching with `next-themes` - **TypeScript** - Full type safety throughout the application - **Developer Experience** - ESLint, hot reload, and modern tooling ## Tech Stack - **Framework**: [Next.js 15](https://nextjs.org/) - **Language**: [TypeScript](https://www.typescriptlang.org/) - **Styling**: [Tailwind CSS](https://tailwindcss.com/) - **Authentication**: [NextAuth.js](https://next-auth.js.org/) - **Database**: [MongoDB](https://www.mongodb.com/) - **ORM**: [Prisma](https://www.prisma.io/) - **Email**: [Resend](https://resend.com/) with [React Email](https://react.email/) - **Payments**: [Stripe](https://stripe.com/) - **Theme**: [next-themes](https://github.com/pacocoursey/next-themes) - **UI Components**: Custom components with Tailwind CSS ## Getting Started ### Prerequisites - Node.js 18+ - MongoDB (local installation or MongoDB Atlas) - Git - Resend account for email functionality - Stripe account for payments ### Installation 1. **Clone the repository** ```bash git clone https://github.com/mklozinski/NextJS-CC-Starter-Kit my-app cd my-app ``` 2. **Install dependencies** ```bash npm install ``` 3. **Set up environment variables** ```bash cp .env.example .env ``` Update the `.env` file with your configuration: ```env # Core DATABASE_URL="<your-mongodb-url>" NEXTAUTH_URL="http://localhost:3000" NEXT_PUBLIC_URL="http://localhost:3000" NEXTAUTH_SECRET="<generate-strong-secret>" # OAuth (optional) GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" GITHUB_CLIENT_ID="" GITHUB_CLIENT_SECRET="" # Analytics (optional) NEXT_PUBLIC_GOOGLE_ANALYTICS="" # Emails (Resend) RESEND_API_KEY="" FROM_EMAIL="[email protected]" EMAIL_NAME="Your App" # Stripe STRIPE_SECRET_KEY="" STRIPE_WEBHOOK_SECRET="" STRIPE_PRICE_PRO_MONTHLY="" STRIPE_PRICE_PRO_YEARLY="" STRIPE_PRICE_ULTRA_MONTHLY="" STRIPE_PRICE_ULTRA_YEARLY="" ``` 4. **Set up the database** ```bash # Generate Prisma client npx prisma generate # Push the schema to your database npx prisma db push # Optional: Seed the database npm run db:seed ``` 5. **Start the development server** ```bash npm run dev ``` Visit [http://localhost:3000](http://localhost:3000) to see your application. ## Authentication Features ### Available Authentication Methods - **Email/Password** - Traditional credential-based authentication - **Google OAuth** - Sign in with Google (configure in .env) - **GitHub OAuth** - Sign in with GitHub (configure in .env) ### Password Reset Flow 1. User clicks "Forgot Password?" on the login page 2. User enters their email address 3. System generates a secure reset token (valid for 1 hour) 4. Beautiful email with reset link is sent via Resend 5. User clicks the link and enters a new password 6. Password is securely hashed and updated in the database ### Pages - `/` - Home (instructions) - `/pricing` - Pricing page with Stripe checkout example - `/dashboard` - Protected example page - `/login` - Sign in page with all authentication methods - `/register` - User registration - `/forgot-password` - Request password reset - `/reset-password` - Reset password with token ## 📧 Email Templates The starter kit includes beautiful, responsive email templates built with React Email and Tailwind CSS: - **Forgot Password Email** - Clean, professional password reset email - **Password Reset Success** - Confirmation email after successful reset Templates are located in `src/components/emails/` and use: - React Email components for structure - Tailwind CSS for styling - Reusable header and footer components ## 🗄️ Database Schema The application uses the following main models: ### User - Basic user information (name, email) - Password (hashed with bcryptjs) - Account status and role (roles for future use, right now admin dashboard not implemented) - Password reset tokens and expiry ### Account & Session - NextAuth.js models for OAuth and session management ### VerificationToken - Email verification and password reset tokens ## 🚀 Deployment ### Environment Variables for Production Make sure to set all required environment variables in your deployment platform: ```env DATABASE_URL="your-production-mongodb-url" NEXT_PUBLIC_URL="https://yourdomain.com" NEXTAUTH_URL="https://yourdomain.com" NEXTAUTH_SECRET="your-production-secret" RESEND_API_KEY="your-resend-api-key" FROM_EMAIL="[email protected]" # OAuth credentials if using (optional) GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" GITHUB_CLIENT_ID="" GITHUB_CLIENT_SECRET="" # Stripe STRIPE_SECRET_KEY="sk_live_your_key" NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_live_your_key" STRIPE_WEBHOOK_SECRET="whsec_your_live_secret" STRIPE_PRICE_PRO_MONTHLY="price_plan1-monthly" STRIPE_PRICE_PRO_YEARLY="price_plan1-yearly" STRIPE_PRICE_ULTRA_MONTHLY="price-plan2-monthly" STRIPE_PRICE_ULTRA_YEARLY="price-plan2-yearly" ``` ### Database Migration ```bash # In production, use migrate instead of db push npx prisma migrate deploy ``` ## 🔧 Development ### Available Scripts - `npm run dev` - Start development server with Turbopack - `npm run build` - Build for production - `npm run start` - Start production server - `npm run lint` - Run ESLint - `npm run db:generate` - Generate Prisma client - `npm run db:push` - Push schema changes to database - `npm run db:studio` - Open Prisma Studio - `npm run db:seed` - Seed the database ### Project Structure ``` src/ ├── app/ # Next.js 13+ app directory │ ├── api/ # API routes │ │ ├── auth/ # Authentication endpoints │ │ ├── stripe/ # Stripe checkout + webhook │ │ └── user/ # User profile/password endpoints │ ├── pricing/ # Pricing page (Stripe example) │ ├── (auth)/dashboard/ # Protected example page │ ├── login/ # Login page │ ├── register/ # Registration page │ ├── forgot-password/ # Password reset request │ └── reset-password/ # Password reset form ├── components/ # React components │ ├── auth/ # Authentication components │ ├── emails/ # Email templates │ ├── providers/ # Context providers (theme, auth) │ └── ui/ # UI components ├── lib/ # Utility functions └── types/ # TypeScript type definitions ``` ## Contributing 1. Fork the repository 2. Create your 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 - see the [LICENSE](LICENSE) file for details. ## Support If you have any questions or need help, please open an issue on GitHub. --- Built using Next.js, TypeScript, NextAuth, Prisma, and Stripe with dark/light theme support.
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
