The Ulimate Nextjs Starter Kit. Build your next SAAS product of your dreams. Batteries included.
See the codeA comprehensive, production-ready SaaS starter kit built with Next.js 15, featuring authentication, subscriptions, AI integration, and modern UI components.
βββ app/
β βββ (auth)/ # Authentication pages
β βββ dashboard/ # Protected dashboard area
β β βββ _components/ # Dashboard components
β β βββ chat/ # AI chat interface
β β βββ upload/ # File upload with R2
β β βββ payment/ # Subscription management
β β βββ settings/ # User settings & billing
β βββ pricing/ # Public pricing page
β βββ api/ # API routes
βββ components/
β βββ ui/ # shadcn/ui components
β βββ homepage/ # Landing page sections
βββ lib/
β βββ auth/ # Authentication config
β βββ subscription.ts # Subscription utilities
β βββ upload-image.ts # R2 file upload utilities
βββ db/
βββ schema.ts # Database schema
βββ drizzle.ts # Database connection
git clone <repository-url>
cd next-starter-2.0
npm install
.env.local file with:# Database
DATABASE_URL="your-neon-database-url"
# Authentication
BETTER_AUTH_SECRET="your-secret-key"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Polar.sh
POLAR_ACCESS_TOKEN="your-polar-access-token"
POLAR_WEBHOOK_SECRET="your-webhook-secret"
# OpenAI
OPENAI_API_KEY="your-openai-api-key"
# Cloudflare R2 Storage
CLOUDFLARE_ACCOUNT_ID="your-cloudflare-account-id"
R2_UPLOAD_IMAGE_ACCESS_KEY_ID="your-r2-access-key-id"
R2_UPLOAD_IMAGE_SECRET_ACCESS_KEY="your-r2-secret-access-key"
R2_UPLOAD_IMAGE_BUCKET_NAME="your-r2-bucket-name"
# Polar.sh Pricing Tiers
NEXT_PUBLIC_STARTER_TIER="your-starter-product-id"
NEXT_PUBLIC_STARTER_SLUG="your-starter-slug"
# Generate and run migrations
npx drizzle-kit generate
npx drizzle-kit push
npm run dev
Open http://localhost:3000 to see your application.
components/app/api/db/schema.tsnpx drizzle-kit generate and npx drizzle-kit pushapp/globals.css for global stylestailwind.config.tslib/auth/auth.tsnpm run build
npm start
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with β€οΈ using Next.js and modern web technologies.
175 followers Β· starred Jun 2025
807 followers Β· starred Mar 2025
39 followers Β· starred Oct 2024
90 followers Β· starred Oct 2025
The Ulimate Nextjs Starter Kit. Build your next SAAS product of your dreams. Batteries included.
See the codeA comprehensive, production-ready SaaS starter kit built with Next.js 15, featuring authentication, subscriptions, AI integration, and modern UI components.
βββ app/
β βββ (auth)/ # Authentication pages
β βββ dashboard/ # Protected dashboard area
β β βββ _components/ # Dashboard components
β β βββ chat/ # AI chat interface
β β βββ upload/ # File upload with R2
β β βββ payment/ # Subscription management
β β βββ settings/ # User settings & billing
β βββ pricing/ # Public pricing page
β βββ api/ # API routes
βββ components/
β βββ ui/ # shadcn/ui components
β βββ homepage/ # Landing page sections
βββ lib/
β βββ auth/ # Authentication config
β βββ subscription.ts # Subscription utilities
β βββ upload-image.ts # R2 file upload utilities
βββ db/
βββ schema.ts # Database schema
βββ drizzle.ts # Database connection
git clone <repository-url>
cd next-starter-2.0
npm install
.env.local file with:# Database
DATABASE_URL="your-neon-database-url"
# Authentication
BETTER_AUTH_SECRET="your-secret-key"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Polar.sh
POLAR_ACCESS_TOKEN="your-polar-access-token"
POLAR_WEBHOOK_SECRET="your-webhook-secret"
# OpenAI
OPENAI_API_KEY="your-openai-api-key"
# Cloudflare R2 Storage
CLOUDFLARE_ACCOUNT_ID="your-cloudflare-account-id"
R2_UPLOAD_IMAGE_ACCESS_KEY_ID="your-r2-access-key-id"
R2_UPLOAD_IMAGE_SECRET_ACCESS_KEY="your-r2-secret-access-key"
R2_UPLOAD_IMAGE_BUCKET_NAME="your-r2-bucket-name"
# Polar.sh Pricing Tiers
NEXT_PUBLIC_STARTER_TIER="your-starter-product-id"
NEXT_PUBLIC_STARTER_SLUG="your-starter-slug"
# Generate and run migrations
npx drizzle-kit generate
npx drizzle-kit push
npm run dev
Open http://localhost:3000 to see your application.
components/app/api/db/schema.tsnpx drizzle-kit generate and npx drizzle-kit pushapp/globals.css for global stylestailwind.config.tslib/auth/auth.tsnpm run build
npm start
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with β€οΈ using Next.js and modern web technologies.
175 followers Β· starred Jun 2025
807 followers Β· starred Mar 2025
39 followers Β· starred Oct 2024
90 followers Β· starred Oct 2025