Overview:
The Next.js SaaS Starter is a template designed for building SaaS applications using Next.js. It includes features like authentication, Stripe integration for payments, and a dashboard for logged-in users. The starter template showcases the latest React and Next.js patterns to simplify common tasks in building a SaaS application.
Features:
- Marketing landing page with animated Terminal element
- Pricing page for Stripe Checkout integration
- Dashboard pages with CRUD operations on users and teams
- Basic RBAC with Owner and Member roles
- Subscription management utilizing Stripe Customer Portal
- Email/password authentication with JWTs stored to cookies
- Global and local middleware for route protection
- Activity logging system for user events
Installation:
- Use the included setup script to generate your
.envfile. - Run database migrations and seed with default user and team:
// command for database migrations // command for seeding database - The default user credentials are:
- Email: test@test.com
- Password: admin123
- Start the Next.js development server:
// command to start development server - Access the app at
http://localhost:3000. - Optionally, set up Stripe webhook locally using their CLI for handling subscription change events.
- For testing Stripe payments, use:
- Card Number: 4242 4242 4242 4242
- Expiration: Any future date
- CVC: Any 3-digit number
Summary:
The Next.js SaaS Starter template provides a robust foundation for building SaaS applications with features like authentication, Stripe integration, and a dashboard for managing users. The template leverages the latest React and Next.js patterns to simplify common development tasks, making it easier to create scalable and secure SaaS applications. With detailed installation instructions, developers can quickly set up and start working on their SaaS projects using this template.