MakerKit Next.js Template
Commercial License Required
MakerKit requires a commercial license. While Orchestre can help you build with it, you must obtain a valid license from MakerKit for commercial use.
The MakerKit template is a production-ready SaaS starter that combines Next.js with a complete multi-tenant architecture. It's designed for building subscription-based applications with team collaboration features.
Overview
- Framework: Next.js 14+ with App Router
- Language: TypeScript with strict mode
- Styling: Tailwind CSS with custom design system
- Database: PostgreSQL with Prisma ORM
- Authentication: Supabase Auth / NextAuth.js
- Payments: Stripe subscription billing
- Deployment: Vercel, Railway, or any Node.js host
Architecture
Project Structure
my-saas/
├── apps/
│ └── web/ # Next.js application
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── lib/ # Utilities and helpers
│ └── server/ # Server-side logic
├── packages/
│ ├── database/ # Prisma schema and migrations
│ ├── ui/ # Shared UI components
│ └── utils/ # Shared utilities
├── CLAUDE.md # Project memory
└── .orchestre/ # Orchestre configurationKey Features
- Multi-tenancy: Full team/organization support
- Authentication: Email/password, OAuth, magic links
- Subscription Billing: Stripe integration with webhooks
- Admin Dashboard: User and subscription management
- API Routes: Type-safe API with validation
- Email System: Transactional emails with React Email
Template-Aware Intelligence
When you work with a MakerKit project, Orchestre's prompts automatically adapt to understand:
SaaS-Specific Patterns
- Multi-tenancy: Prompts recognize team/organization boundaries and ensure proper data isolation
- Subscription Logic: Understanding of billing cycles, plan limits, and upgrade flows
- Permission Systems: Awareness of role-based access control and team permissions
- API Design: RESTful patterns with proper authentication and rate limiting
MakerKit Conventions
- File Structure: Prompts know where features belong in the monorepo structure
- Database Schema: Understanding of Prisma patterns and migration workflows
- Component Library: Awareness of MakerKit's UI components and design system
- Server Actions: Next.js App Router patterns for data mutations
Adaptive Behaviors
When you ask Orchestre to add a feature, it:
- Discovers existing patterns in your codebase
- Analyzes MakerKit's conventions and your customizations
- Plans implementation following established patterns
- Adapts to your specific authentication, database, and API choices
For example, asking to "add a document sharing feature" will:
- Recognize you need team-scoped permissions
- Understand document ownership patterns
- Follow MakerKit's database conventions
- Integrate with existing authentication
- Add appropriate API endpoints
- Create UI components matching your design system
Common Workflows
1. Starting a New SaaS
When you begin a MakerKit project, Orchestre helps you:
- Analyze Requirements: Understanding your business model and user needs
- Plan Architecture: Designing data models and API structure
- Configure Services: Setting up authentication, payments, and infrastructure
- Build Features: Implementing core functionality with proper patterns
The prompts adapt based on what they discover about your project's needs.
2. Adding Major Features
When implementing new capabilities, Orchestre:
- Studies Existing Code: Learns your patterns and conventions
- Plans Integration: Ensures new features work with existing systems
- Maintains Consistency: Follows established coding patterns
- Handles Complexity: Manages database migrations, API changes, and UI updates
For instance, adding real-time features will consider your WebSocket infrastructure, authentication system, and data synchronization needs.
3. Enterprise Enhancements
For enterprise features, prompts understand:
- SSO Requirements: SAML, OAuth, and custom authentication flows
- Compliance Needs: Audit logging, data retention, and security policies
- Scale Considerations: Performance optimization and infrastructure planning
- Team Features: Advanced permissions, delegation, and workflow automation
Intelligent Pattern Recognition
Orchestre understands and works with MakerKit's established patterns:
Authentication & Security
Prompts recognize:
- Session management patterns
- Protected route implementations
- Role-based access control
- API authentication methods
- Security best practices
Multi-tenant Architecture
Automatic understanding of:
- Organization boundaries
- Data isolation requirements
- Team member permissions
- Resource ownership
- Cross-tenant security
Subscription Management
Intelligent handling of:
- Plan-based feature gates
- Usage limits and quotas
- Billing cycle logic
- Upgrade/downgrade flows
- Trial period management
API Design
Adaptive patterns for:
- RESTful endpoint structure
- Request validation
- Error handling
- Rate limiting
- Response formatting
When you work with these patterns, Orchestre's prompts automatically adapt to maintain consistency and follow best practices without requiring explicit instructions.
Configuration
Environment Variables
# Database
DATABASE_URL=postgresql://...
# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=...
# Stripe
STRIPE_SECRET_KEY=sk_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Email
RESEND_API_KEY=...Key Files
apps/web/app/config.ts- Application configurationpackages/database/prisma/schema.prisma- Data model.env.local- Local environment variablesCLAUDE.md- Project documentation
Development Experience
Intelligent Assistance
Orchestre enhances your MakerKit development by:
- Understanding Context: Recognizes your current task and suggests appropriate next steps
- Maintaining Quality: Ensures code follows MakerKit's standards and best practices
- Handling Complexity: Manages database migrations, API versioning, and deployment configs
- Learning Patterns: Adapts to your team's coding style while maintaining framework conventions
Adaptive Workflows
The system adjusts its approach based on:
- Project Stage: Different guidance for MVP vs. scaling production
- Team Size: Single developer vs. collaborative workflows
- Feature Complexity: Simple CRUD vs. complex business logic
- Performance Needs: Standard features vs. high-scale optimizations
Continuous Learning
As you develop, Orchestre:
- Observes Patterns: Learns from your code decisions
- Suggests Improvements: Offers optimization opportunities
- Prevents Issues: Warns about potential problems
- Shares Knowledge: Documents decisions and patterns
Best Practices Recognition
Orchestre automatically encourages and implements MakerKit best practices:
Performance Optimization
Prompts understand:
- When to use Server Components vs. Client Components
- Optimal data fetching strategies
- Caching opportunities
- Bundle size considerations
- Database query optimization
Type Safety
Automatic enforcement of:
- TypeScript strict mode patterns
- Zod schema validation
- Type-safe API contracts
- Proper error typing
- Database type generation
Security First
Built-in awareness of:
- Input validation requirements
- Authentication checks
- Authorization patterns
- CSRF protection needs
- SQL injection prevention
Scalability Patterns
Intelligent application of:
- Database indexing strategies
- Caching layer implementation
- Queue-based processing
- Rate limiting approaches
- Performance monitoring
These practices are applied contextually - Orchestre understands when each pattern is appropriate and implements them without explicit instruction.
Troubleshooting
Common Issues
Database connection errors
- Check DATABASE_URL
- Ensure database is running
- Run migrations
Authentication issues
- Verify NEXTAUTH_SECRET
- Check callback URLs
- Clear browser cookies
Stripe webhooks failing
- Verify webhook secret
- Check endpoint URL
- Use Stripe CLI for testing
Getting Help
- Check MakerKit Patterns
- Review MakerKit Recipes
- Explore OTP Authentication
- Learn about Billing Enhancements
- Run
/suggest-improvements - Use
/review --debug
Getting Started
When you begin with MakerKit, Orchestre helps you:
- Understand the Architecture: Discovers and explains the codebase structure
- Plan Your Features: Analyzes requirements and suggests implementation approaches
- Build Incrementally: Guides you through feature development with proper patterns
- Maintain Quality: Ensures consistent code quality and best practices
- Scale Confidently: Helps optimize and enhance as your application grows
The intelligence adapts to your experience level - providing detailed guidance for beginners while offering advanced optimizations for experienced developers.
Ready to build your SaaS? Orchestre will guide you through every step, adapting its assistance to your specific needs and MakerKit's powerful patterns.
