A production-ready monorepo template optimized for AI code generation workflows
- BAML Integration: Structured AI templates for consistent LLM interactions
- Type-Safe APIs: End-to-end TypeScript ensures AI generates correct code
- Shared Context: Monorepo structure helps AI understand your entire codebase
- Cross-Platform: Generate code for web, mobile, desktop, and browser extensions
- 6 Applications: Web app, mobile (Expo), CLI, Chrome extension, VS Code extension, iOS
- 12 Shared Packages: Database, API, UI, AI, analytics, payments, and more
- Modern Stack: Next.js 15, React 19, tRPC v11, Drizzle ORM, Supabase
- Developer Experience: Bun, Turborepo, Biome, comprehensive tooling
git clone [your-repo-url] my-startup
cd my-startup
bun installcp .env.example .env
# Configure your environment variables
bun with-env -- bun db:push# Start all apps
bun dev
# Or start specific apps
bun dev:next # Web app only
bun dev:vscode # VS Code extension- Web App (
apps/web-app): Next.js 15 with App Router - Mobile (
apps/expo): React Native with Expo SDK 51 - CLI (
apps/cli): Cross-platform command-line tool - Chrome Extension (
apps/chrome-extension): Browser extension - VS Code Extension (
apps/vscode-extension): Editor extension - iOS (
apps/ios): Native iOS app
- API (
packages/api): tRPC v11 router with end-to-end type safety - Database (
packages/db): Drizzle ORM with Supabase - UI (
packages/ui): shadcn/ui components shared across apps - AI (
packages/ai): BAML templates for structured LLM interactions - Analytics (
packages/analytics): PostHog integration - Payments (
packages/stripe): Stripe integration - Email (
packages/email): Resend email service - State (
packages/zustand): Global state management
The monorepo structure allows AI to understand:
- How your API routes connect to database schemas
- Which UI components are available across platforms
- How authentication flows through all apps
- The relationship between packages and their dependencies
- Shared TypeScript configurations
- Unified code formatting with Biome
- Consistent API patterns with tRPC
- Reusable UI components across platforms
- Generate code for multiple platforms simultaneously
- AI understands your existing patterns and can extend them
- Type safety ensures generated code works correctly
- Shared packages mean changes propagate everywhere
- Define API in
packages/api/src/router - Update Database schema in
packages/db/src/schema - Generate Types with
bun db:push - Create UI components in
packages/ui - Implement across all apps with full type safety
# Add new UI component
bun ui-add
# Generate database migration
bun db:gen-migration
# Type check everything
bun typecheck
# Format code
bun format:fix# Install dependencies
bun install
# Start development for all packages
bun dev
# Start only the web app
bun dev:next
# Run tests
bun test
# Type check everything
bun typecheck
# Format code
bun format:fix
# Clean all workspaces
bun clean:ws# Open database studio
bun db:studio
# Push schema changes
bun db:push
# Generate migrations
bun db:gen-migration
# Run migrations
bun db:migrate
# Seed database
bun db:seed# Build all packages
bun build
# Publish CLI and client packages
bun publish
# Add UI components
bun ui-add# Deploy to Vercel
vercel --prodcd apps/expo
eas build --platform all
eas submit --platform allbun publish- β End-to-End Type Safety with tRPC
- β AI Integration with BAML templates
- β Cross-Platform development
- β Modern Stack (Next.js 15, React 19)
- β Production Ready with comprehensive tooling
- β Developer Experience optimized for AI workflows
This template is designed for rapid startup development with AI assistance. The monorepo structure ensures consistency and enables powerful AI code generation workflows.
MIT