Get started quickly with Next.js, Postgres, Drizzle, Stripe, and shadcn/ui.
Overview:
The Next.js SaaS Starter is a template designed for building Software as a Service (SaaS) applications using Next.js. This starter template supports authentication, Stripe integration for payments, and provides a dashboard for logged-in users.
Features:
- Marketing landing page: Includes an animated Terminal element.
- Pricing page: Connects to Stripe Checkout for payments.
- Dashboard pages: Allows CRUD operations on users and teams.
- Basic RBAC: Supports Owner and Member roles.
- Subscription management: Utilizes Stripe Customer Portal.
- Authentication: Email/password authentication with JWTs stored in cookies.
- Global Middleware: Protects logged-in routes.
- Local Middleware: Protects Server Actions or validates Zod schemas.
- Activity logging system: Tracks user events.
Installation:
- Create your
.env file using the setup script. - Run database migrations and seed with a default user and team.
- Start the Next.js development server.
- For testing Stripe payments, use the provided test card details.
- Follow the steps to deploy to production, including setting up a production Stripe webhook, deploying to Vercel, and adding necessary environment variables.
Summary:
The Next.js SaaS Starter provides a solid foundation for creating SaaS applications with key features like authentication, payment integration, and user management. By following the installation guide, developers can quickly set up and customize their SaaS application using this template. The integration with Stripe for payments and the flexibility of Next.js make this starter template a valuable resource for building scalable and secure SaaS solutions.