This SaaS boilerplate is designed as an AI-first development environment, leveraging intelligent agents to accelerate development while maintaining code quality and architectural consistency.
AI-Powered Development: Every component, service, and feature in this boilerplate can be generated, modified, and enhanced by AI agents following precise architectural guidelines.
The boilerplate embraces AI-assisted development through:
File: CLAUDE.md at repository root
The boilerplate includes comprehensive guidelines for Claude Code (claude.ai/code):
# Start development servers
pnpm dev # Blog app (default)
pnpm devcodemail # CodeMail app
pnpm devlanding # Landing pages
pnpm devurl # URL shortener
pnpm devship # ShipSaaS app
# Build applications
pnpm build # Build selected apps
pnpm build-all # Build all apps
pnpm build-packages # Build shared packages
# Testing & Quality
pnpm test # Run tests
pnpm lint # Run linting
pnpm format:fix # Fix formatting
# Database operations
pnpm db:generate # Generate migrations
pnpm db:migrate # Run migrations
pnpm db:studio # Open Drizzle StudioFile: AGENTS.md at repository root
Provides universal guidelines for all AI agents working with the codebase:
Key Directives:
CLAUDE.md and .cursor/rules/Project Structure Guidance:
apps/*: Customer-facing Next.js applicationspackages/*: Shared logic and utilitiesDirectory: .cursor/rules/ (21 specialized rule files)
Each rule file provides detailed instructions for specific aspects of development:
AI Rules Management Interface:
rule-service.mdc - Service layer patternsrule-repository.mdc - Data access patternsrule-dal.mdc - Data Access Layerrule-presentation.mdc - UI layerrule-authorization.mdc - RBAC and permissionsrule-validation-layer.mdc - Input validationrule-persistence.mdc - Database operationsrule-service-testing.mdc - Testing strategiesDetailed Rules Configuration:
AI agents follow strict architectural patterns ensuring:
All business logic follows the service layer pattern with proper authorization, validation, and error handling.
// AI generates services following established patterns
export class UserService {
async createUser(data: CreateUserInput): Promise<User> {
// Validation
const validatedData = createUserSchema.parse(data)
// Authorization check
await this.authService.requirePermission('user:create')
// Business logic
return this.userRepository.create(validatedData)
}
}Generated code maintains full TypeScript safety with proper interfaces and schema validation.
// AI follows established type patterns
interface CreateUserInput {
email: string
name: string
role: UserRole
}
const createUserSchema = z.object({
email: z.string().email(),
name: z.string().min(2),
role: z.nativeEnum(UserRole)
})AI-generated features include comprehensive tests following the established 6-layer testing strategy.
// AI generates tests matching patterns
describe('UserService', () => {
it('should create user with proper authorization', async () => {
// Follows established testing patterns
const mockUser = createMockUser()
mockAuthService.requirePermission.mockResolvedValue(true)
const result = await userService.createUser(mockUser)
expect(result).toMatchObject(mockUser)
})
})AI agents generate code that meets production standards:
Effective AI Collaboration: Provide clear context about the feature you're building, reference existing patterns, and let the AI agents handle implementation details.
Development Workflow:
Example AI Prompts:
"Create a subscription management service following the existing service patterns,
with RBAC authorization, Zod validation, and comprehensive tests"
"Add a new email notification type for subscription renewals,
following the existing email templates structure"
"Implement a new dashboard widget for user analytics,
following the existing widget patterns in the dashboard"Each rule file contains specific instructions that AI agents follow:
Key Guidelines:
The boilerplate includes AI-powered documentation generation:
Rule File: rule-shipsaas-generate-doc.mdc
This specialized rule enables AI agents to generate comprehensive documentation that:
This entire documentation was generated by AI agents following the documentation generation rules!
AI-Ready Codebase: This boilerplate demonstrates how proper architectural guidelines enable AI agents to generate production-quality code that seamlessly integrates with existing systems.
Ready to leverage AI in your development? The comprehensive rule system ensures that AI agents become force multipliers for your development team while maintaining code quality and architectural consistency.