A production-ready Next.js SaaS boilerplate with authentication, payments, credits system, and all the essential features you need to launch your SaaS product quickly.
- Frontend: Next.js 15 (App Router), React 18, Tailwind CSS, DaisyUI
- Backend: Next.js API Routes (Cloudflare Workers)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth (Email, Google, GitHub OAuth)
- Payments: Stripe (Subscriptions & One-time Credits)
- Deployment: Cloudflare Pages
- Monitoring: Baselime
# Install dependencies
yarn install
# Copy environment files
cp .env.example .env
cp .env.prod.example .env.prod
# Run database migrations
./scripts/setup-supabase.sh --manual
# Start development server
yarn dev| Guide | Description |
|---|---|
| Supabase Setup | Database, Auth, and RLS configuration |
| Google OAuth Setup | Google Cloud Console OAuth configuration |
| GitHub OAuth Setup | GitHub OAuth App configuration |
| Stripe Setup | Payments, subscriptions, and webhooks |
| E2E Testing Setup | Playwright test configuration |
| Cloudflare Deployment | Production deployment |
| Baselime Setup | Error monitoring |
This project uses a split environment variable structure:
| File | Purpose | Contains |
|---|---|---|
.env |
Public variables | NEXT_PUBLIC_* prefixed variables |
.env.prod |
Server secrets | SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, etc. |
See Supabase Setup Guide for details.
| Command | Description |
|---|---|
yarn dev |
Start development server (Next.js + Wrangler + Stripe CLI) |
yarn build |
Build for production |
yarn verify |
Run TypeScript, ESLint, and all tests |
yarn test:e2e |
Run E2E browser tests |
yarn test:api |
Run API tests |
yarn test:all |
Run all Playwright tests |
- Setup Guides:
docs/guides/ - PRDs:
docs/PRDs/ - Technical Docs:
docs/technical/ - Roadmap:
docs/management/ROADMAP.md
├── app/ # Next.js App Router pages
├── src/
│ ├── components/ # React components
│ ├── config/ # App configuration
│ ├── lib/ # Utility libraries
│ ├── store/ # Zustand stores
│ └── types/ # TypeScript types
├── supabase/
│ └── migrations/ # Database migrations
├── tests/
│ ├── e2e/ # E2E browser tests
│ ├── api/ # API tests
│ ├── pages/ # Page Object Models
│ └── helpers/ # Test utilities
├── scripts/ # Setup and utility scripts
└── docs/ # Documentation
Private - All rights reserved.