Loading repository dataβ¦
Loading repository dataβ¦
CiphersLab / repository
π SaaSPilot - The most AI-coding-agent-friendly SaaS boilerplate for Next.js. Build faster with 120KB of AI-optimized docs, credit-based billing, and production-ready patterns. Perfect for AI SaaS apps!
SaaSPilot is a production-ready, full-stack SaaS boilerplate for Next.js - crafted with great attention to both front-end and back-end functionality. Built with developer experience in mind, it comes with all essential integrations and features, plus comprehensive AI-agent documentation for seamless AI-assisted development.
Perfect for launching AI SaaS applications with credit-based billing! π―
SaaSPilot now includes 120KB of comprehensive documentation specifically designed for AI coding assistants:
AI agents (Claude, Cursor, GitHub Copilot) can now understand and modify the codebase autonomously!
# 1. Clone the repository
git clone https://github.com/your-repo/saaspilot.git
cd saaspilot
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env.local
# Edit .env.local with your credentials
# 4. Set up the database
npx prisma generate
npx prisma db push
# 5. Run the development server
npm run dev
Visit http://localhost:3000 π
π Start here: CLAUDE.md - Complete guide for AI coding assistants
SaaSPilot is optimized for AI-assisted development with comprehensive documentation designed specifically for AI assistants like Claude, Cursor, and GitHub Copilot.
/
βββ CLAUDE.md β Quick start for AI agents
βββ /docs/ β Comprehensive technical docs
β βββ ai-instructions.md β Core instructions & conventions β
β βββ architecture.md β System architecture & diagrams
β βββ coding-patterns.md β Standard patterns & best practices
β βββ database-schema.md β Complete schema reference
β βββ component-map.md β Component relationships
β βββ api-documentation.md β API reference & server actions
β βββ troubleshooting.md β Common issues & solutions
βββ /prompts/ β Task templates for AI agents
βββ add-new-feature.md β Feature addition template
βββ create-api-endpoint.md β API endpoint template
βββ modify-database-schema.md β Schema modification guide
With this documentation, AI coding agents can:
β Understand the codebase structure in < 5 minutes β Add new features following established patterns β Create API endpoints without breaking conventions β Modify database schema safely β Navigate components and understand relationships β Troubleshoot issues independently β Generate consistent, production-ready code
For Claude/Cursor/Copilot:
Example AI Prompt:
"Add a new task management feature to SaaSPilot following the patterns
in /docs/coding-patterns.md and using the template in /prompts/add-new-feature.md"
Frontend:
Backend:
Developer Experience:
π Full Documentation: https://cipherslab.gitbook.io/saas-pilot-docs
Start with these for AI-assisted development:
| Document | Purpose | Size |
|---|---|---|
| CLAUDE.md | Quick start for AI agents | 8 KB |
| docs/ai-instructions.md | Core instructions & conventions | 6 KB |
| docs/architecture.md | System architecture | 8 KB |
| docs/coding-patterns.md | Standard code patterns | 10 KB |
| docs/database-schema.md | Database reference | 10 KB |
| docs/component-map.md | Component relationships | 11 KB |
| docs/api-documentation.md | API reference | 6 KB |
| docs/troubleshooting.md | Common issues | 7 KB |
π¬ Live Demo (Pro version): https://saas-pilot-demo.vercel.app/
π Website: https://saas-pilot.vercel.app
π₯ Pricing & FAQ: https://saas-pilot.vercel.app/#pricing
Note: Certain features are disabled in the free version or can't be included in the public repo.
| Feature | Free | Pro |
|---|---|---|
| User Dashboard | β | β |
| Full Authentication (Email + OAuth) | β | β |
| User Profile Management | β | β |
| Landing & Pricing Pages | β Single | β Multiple |
| Marketing Pages (About, Contact) | β | β |
| Multi-Language Support (i18n) | β | β |
| Stripe Credit Purchases | β | β |
| Stripe Subscriptions | β | β |
| Admin Dashboard | β | β |
| Fully Featured Blog | β | β |
| Event-Based Analytics | β | β |
| AI-Ready Documentation | β | β |
saaspilot/
βββ app/ # Next.js App Router
β βββ (marketing)/ # Public pages
β βββ (protected)/ # Auth-required pages
β βββ auth/ # Authentication pages
β βββ api/ # API routes & webhooks
βββ components/ # React components
β βββ ui/ # Shadcn/ui components
β βββ auth/ # Auth components
β βββ Common/ # Shared components
βββ actions/ # Server actions
βββ lib/ # Utilities & services
βββ prisma/ # Database schema
βββ docs/ # AI-ready documentation β
βββ prompts/ # AI prompt templates β
βββ hooks/ # React hooks
βββ types/ # TypeScript types
βββ schemas/ # Zod validation schemas
βββ translations/ # i18n translations
βββ config/ # Configuration files
# Development
npm run dev # Start dev server (http://localhost:3000)
npm run build # Create production build
npm run start # Start production server
# Database
npx prisma studio # Open Prisma Studio (visual database)
npx prisma generate # Regenerate Prisma client
npx prisma db push # Push schema changes to database
npx prisma migrate dev # Create and apply migration
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
Copy .env.example to .env.local and configure:
# Database
DATABASE_URL="mongodb://..."
# Authentication
NEXTAUTH_SECRET="your-secret"
NEXTAUTH_URL="http://localhost:3000"
# OAuth Providers
GITHUB_CLIENT_ID="..."
GITHUB_CLIENT_SECRET="..."
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# Email
RESEND_API_KEY="re_..."
# App Configuration
NEXT_PUBLIC_APP_URL="http://localhost:3000"
ADMIN_EMAILS="admin@example.com"
INITIAL_CREDITS_FOR_NEW="20"
Perfect for building:
The credit-based billing system is especially suited for AI/ML applications with usage-based pricing.
SaaSPilot works on any platform supporting Node.js: