An open-source starter kit based on Midday.
Website ·
Issues ·
Tech Stack ·
Prerequisites ·
Getting Started
Create v1 is a production-ready SaaS starter kit built with modern technologies. It's structured as a monorepo using Turborepo, focusing on code reusability, type safety, and scalability. The project includes everything from authentication to analytics, making it ideal for building robust SaaS applications.
- Next.js 14+ - React framework with App Router
- Turborepo - Monorepo build system
- Biome - Fast linter and formatter
- TypeScript - Type safety
- TailwindCSS - Utility-first CSS
- Shadcn UI - Accessible component system
- next-themes - Dark/light mode
- nuqs - Type-safe URL state management
- Supabase - Auth, Database, Storage
- Upstash - Redis cache & rate limiting
- Trigger.dev - Background job processing
- react-safe-action - Type-safe server actions
- React Email - Email templates
- Resend - Email delivery
.
├── apps/ # Application workspace
│ ├── api/ # Supabase backend
│ │ ├── migrations/ # Database migrations
│ │ └── seed/ # Seed data
│ ├── app/ # Main SaaS application
│ │ ├── src/
│ │ ├── public/
│ │ └── .env.example
│ └── web/ # Marketing website
│
├── packages/ # Shared packages
│ ├── analytics/ # OpenPanel integration
│ ├── email/ # Email templates
│ ├── jobs/ # Background jobs
│ ├── kv/ # Key-value storage
│ ├── logger/ # Logging utilities
│ ├── supabase/ # Database client & types
│ └── ui/ # Shared UI components
│
└── tooling/ # Shared configurations
└── typescript/ # TypeScript config
Before you begin, ensure you have accounts and API keys for:
-
Development Environment
-
Core Services
-
Monitoring & Analytics
- Sentry - Error tracking
- OpenPanel - Analytics
- Dub - Link tracking
- Trigger.dev - Job processing
- Clone the Repository
bunx degit midday-ai/v1 v1
cd v1- Install Dependencies
bun install- Environment Setup
# Copy environment files
cp apps/api/.env.example apps/api/.env
cp apps/app/.env.example apps/app/.env
cp apps/web/.env.example apps/web/.env- Configure Environment Variables
Required variables for each app:
apps/app/.env:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_KEY=
NEXT_PUBLIC_SENTRY_DSN=
RESEND_API_KEY=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
NEXT_PUBLIC_OPENPANEL_CLIENT_ID=apps/api/.env:
SUPABASE_DB_URL=
GOOGLE_CLIENT_ID=
GOOGLE_SECRET=- Development Commands
# Start all services
bun dev
# Individual services
bun dev:web # Marketing site
bun dev:app # Main application
bun dev:api # API service
bun dev:email # Email preview
# Database operations
bun migrate # Run migrations
bun seed # Seed database-
Database Changes
- Add migrations in
apps/api/migrations - Update types in
packages/supabase/types - Run
bun migrateto apply changes
- Add migrations in
-
Adding Features
- Server components go in
apps/app/src/app - Client components use
'use client'directive - Shared UI components go in
packages/ui
- Server components go in
-
Environment Types
- Add new env vars to
apps/app/src/env.mjs - Run validation during development
- Add new env vars to
- Push your repository to GitHub
- Connect to Vercel
- Configure environment variables
- Deploy each app separately:
apps/web- Marketing siteapps/app- Main applicationapps/api- Supabase API
- Fork the repository
- Create a feature branch
- Commit changes
- Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Authentication: Social login (Google, GitHub), magic links, and role-based access
- Database:
- User profiles and preferences
- Team collaboration features
- Subscription and billing status
- Storage: User avatar uploads, document attachments
- Edge Functions: Webhook handlers, third-party integrations
- Scheduled Tasks:
- Daily digest emails
- Subscription renewal reminders
- Data cleanup and maintenance
- Event-Driven Jobs:
- Welcome sequence after signup
- Payment processing webhooks
- Team invitation notifications
- Caching:
- API response caching
- User session data
- Frequently accessed settings
- Rate Limiting:
- API endpoint protection
- Login attempt restrictions
- File upload limits
- Feature Flags:
- A/B testing
- Gradual feature rollouts
- Beta user management
- User Behavior:
- Feature usage tracking
- Conversion funnel analysis
- Session recordings
- Business Metrics:
- Subscription analytics
- Revenue tracking
- User retention metrics
- Transactional Emails:
- Welcome messages
- Password reset
- Team invitations
- Marketing Communications:
- Newsletter templates
- Product updates
- Feature announcements
-
users
- Basic profile information
- Authentication details
- Preferences
-
teams
- Team details
- Billing information
- Subscription status
-
team_members
- User-team relationships
- Role assignments
- Access permissions
-
projects
- Project metadata
- Team association
- Collaboration settings
-
documents
- Content storage
- Version control
- Access permissions
-
activities
- User actions
- System events
- Audit logs
- User signs up with social/email
- Welcome email triggered
- Profile completion flow
- Team creation/joining
- Feature introduction tour
- Team creation by user
- Member invitations sent
- Role assignment
- Resource sharing setup
- Activity tracking
- Plan selection
- Payment processing
- Feature access update
- Team limits adjustment
- Usage tracking
- Document creation
- Storage handling
- Permission setting
- Version tracking
- Activity logging