Introduction
Next.js boilerplate for vibe coding with Cursor and Claude, designed to accelerate SaaS development.
Introducing AI Boilerplate, a Next.js boilerplate built for vibe coding with Cursor and Claude, designed to accelerate SaaS development. It includes AI-optimized architecture, authentication, Stripe payments, emails, and more. Ship your SaaS faster.
Below we'll cover the core principles and features behind AI Boilerplate to give you a better understanding of what it has to offer.
If you'd rather see the project in action right away, check out the demo.
Philosophy
AI Boilerplate was created with the following core principles in mind:
- Best Practices — End-to-end type safety, proper separation of concerns, and security-first design.
- Clean Code — Strict TypeScript, three-layer API architecture, and enforced conventions.
- Customization — Feature flags, modular packages, and easy theme configuration.
- Developer Experience — Hot reload, type inference, autocompletion, and minimal boilerplate.
- Speed of Development — Pre-built authentication, billing, emails, UI components, and more, out of the box.
- Scalability — Monorepo architecture with shared packages that scale with your team.
- Teamwork — Shared configurations, consistent patterns, and a clear folder structure for teams.
Features
AI Ready
Built-in Cursor and Claude rules teach AI your conventions from the first prompt. Every module, file, and comment is written for AI understanding, so AI writes clean, consistent code every time.
Type-Safe API
End-to-end type safety with tRPC, Tanstack Query, and Zod validation. Three-layer architecture (routers, services, repositories) for clean separation of concerns.
Authentication
Email/password, magic links, and Google & GitHub (OAuth) social logins powered by BetterAuth. Includes session management and device tracking out of the box.
Authorization
Role-based access control with admin and user roles. Admin panel with user management and impersonation built in.
Stripe Payments
Subscriptions with optional trials, plan changes, and customer portal. One command to sync plans to Stripe. Webhook handled.
Credit System
Built-in credit system with automatic grants on signup, trials, and renewals. Switch between subscription and credit-based billing without rewriting payment logic.
UI Components
60+ beautifully designed, accessible shadcn/ui components ready to use. Fully customizable with Tailwind CSS and consistent design tokens.
Light/Dark Mode
Full theme support with semantic tokens and CSS variables. Switches seamlessly across every component with no extra configuration.
Email Integration
Transactional emails powered by Resend with React Email templates. Preview changes live, iterate quickly, and send emails from your own domain.
Docs & Blog
MDX-powered documentation and blog built with Fumadocs. Write content in Markdown, get syntax highlighting, navigation, and search automatically.
SEO Optimized
Automatic sitemap generation, meta tags, and Open Graph images. Shared SEO utilities so every page is discoverable by default.
Legal Pages
Pre-built Privacy Policy and Terms of Service pages. Ready to customize with your company details and go live.