The ultimate Next.js 15 starter kit for building production-ready AI-powered SaaS applications.
Save hundreds of hours of development time and focus on what truly matters: your core product. This boilerplate comes packed with all the essential, non-differentiating features you need to launch a modern web application, enhanced with the "Jules touch" for superior quality and functionality.
- Launch Faster: Skip the boilerplate and get straight to building. All the tedious setup for authentication, payments, and multi-tenancy is done for you.
- Production-Ready: Built with best practices for security, scalability, and maintainability. Includes comprehensive RLS policies, error handling, and a robust testing setup.
- Feature-Rich: Comes with a complete suite of SaaS essentials, from team management and API keys to subscription billing and audit logs.
- Developer-Friendly: A clean, well-documented codebase with a logical structure, consistent formatting, and a modern tech stack.
- Easily Customizable: Designed to be easily extended and adapted to your specific needs.
This boilerplate includes everything you need to get started, plus some powerful additions:
- Framework: Next.js 15 with App Router and TypeScript.
- Database & Auth: Supabase for PostgreSQL database and authentication (email/password, magic links, OAuth).
- Payments: Stripe integration for subscription billing and customer portal.
- Multi-Tenancy: Full support for teams, including invitations and role-based access control (RBAC).
- API Key Management: A secure system for users to generate and manage their own API keys.
- Audit Logs: Track important events within teams for security and compliance.
- Credit System: Usage-based credit system with real-time deduction.
- Theming: A beautiful, responsive UI with Tailwind CSS and a built-in light/dark mode switcher.
- Code Quality: Pre-configured with ESLint, Prettier, and a Vitest testing framework.
Follow these steps to get your local development environment up and running.
git clone <repository-url>
cd ai-saas-boilerplatenpm installCopy the example environment file and fill in your credentials for Supabase and Stripe.
cp .env.example .env.localYou'll need to populate .env.local with your actual keys.
- Create a new project in your Supabase dashboard.
- Navigate to the SQL Editor.
- Copy the entire content of
supabase/schema.sqland run it. This will create all the necessary tables, roles, and policies.
- Create your products and prices in the Stripe Dashboard.
- Update the
PLAN_CONFIGSobject intypes/index.tswith your Stripe Price IDs. - Set up a webhook endpoint in Stripe pointing to
/api/webhooks/stripeand add the webhook secret to your.env.localfile.
npm run devYour application should now be running at http://localhost:3000.
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Payments: Stripe
- Testing: Vitest, React Testing Library
- Linting & Formatting: ESLint, Prettier
We welcome contributions of all kinds! Whether you're fixing a bug, adding a new feature, or improving the documentation, your help is greatly appreciated.
Please see our Contribution Guidelines to get started.
- Have a question? Feel free to open a GitHub Discussion.
- Found a bug? Please report it by opening an Issue.
A special thanks to Arrow (@Arrowk99) for his valuable feedback and contributions to this project. Arrow is an advanced developer whose insights helped guide the recent upgrade to Next.js 15 and React 19, making this boilerplate even more modern and robust.
Check out Arrow's impressive work:
- MultiDevs - Multi-platform development solutions
- Swank.pk - Premium e-commerce platform
- RingAssist.io - AI-powered call assistance
This project is special. It represents my first contribution to the open-source world, and it was brought to life with a unique collaborator: Jules, an AI software engineer.
As someone with a passion for technology but zero coding experience, I wanted to see what was possible. This entire boilerplate, from the initial feature planning to the final line of code, was created through natural language conversations with Jules. It's a testament to the power of AI as a tool for creativity and a demonstration that anyone can bring their ideas to life.
I hope this project not only saves you time but also inspires you to build something amazing, regardless of your background.
This boilerplate is a living project, and the journey is just beginning! Here are some ideas for future enhancements that you, the community, can help build:
- Admin Dashboard: A super-admin panel to manage users, teams, and view system-wide analytics.
- More OAuth Providers: Add support for other login providers like GitHub, GitLab, or Discord.
- Transactional Emails: Integrate a service like Resend or Postmark for sending welcome emails, team invitations, and credit warnings.
- Advanced Usage Metrics: Detailed charts and graphs for teams to visualize their credit usage over time.
- Storybook for UI Components: Create a Storybook to document and test UI components in isolation, making the frontend even more robust.
If you are an AI agent working on this repository, welcome! This project was bootstrapped by me, Jules, a fellow AI engineer.
A few tips for working here:
- The project uses
npmfor package management. - Environment variables are critical. Refer to
.env.examplefor the required keys. - The codebase is structured following standard Next.js conventions. You'll find pages in
app/, components incomponents/, and utilities inlib/. - Please run
npm run formatandnpm run lint:fixbefore submitting your work to maintain code quality.
This project was built with Google's Gemini models. If you'd like to build your own amazing projects with AI, you can get started at Google AI Studio.
This project is licensed under the MIT License. See the LICENSE file for details.
Built with β€οΈ for founders and developers.