{"repo":"nextjs/saas-starter","free":true,"listed":false,"github":"https://github.com/nextjs/saas-starter","clone":"git clone https://github.com/nextjs/saas-starter.git","description":"Get started quickly with Next.js, Postgres, Stripe, and shadcn/ui.","language":"TypeScript","stars":16034,"topics":["nextjs","postgres","shadcn-ui","stripe"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Next.js SaaS Starter This is a starter template for building a SaaS application using Next.js with support for authentication, Stripe integration for payments, and a dashboard for logged-in users. Demo: https://next-saas-start.vercel.app/ Features - Marketing landing page ( / ) with animated Terminal element - Pricing page ( /pricing ) which connects to Stripe Checkout - Dashboard pages with CRUD operations on users/teams - Basic RBAC with Owner and Member roles - Subscription management with Stripe Customer Portal - Email/password authentication with JWTs stored to cookies - Global middleware to protect logged-in routes - Local middleware to protect Server Actions or validate Zod schemas - Activity logging system for any user events Tech Stack - Framework : Next.js - Database : Postgres - ORM : Drizzle - Payments : Stripe - UI Library : shadcn/ui Getting Started Running Locally Install and log in to your Stripe account: Use the included setup script to create your .env file: Run the database migrations and seed the database with a default user and team: This will create the following user and team: - User: test@test.com - Password: admin123 You can also create new users through the /sign-up route. Finally, run the Next.js development server: Open http://localhost:3000 in your browser to see the app in action. You can listen for Stripe webhooks locally through their CLI to handle subscription change events: Testing Payments To test Stripe payments, use the following test card","default_branch":null,"files":null,"tree":[],"storefront":"/r/nextjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nextjs/saas-starter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}