next-forge

Guides setup, customization, and deployment of the next-forge Turborepo Next.js SaaS template.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Alwahdi/mikrotik-whisperer --skill next-forge-alwahdi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-forge
Source: https://github.com/Alwahdi/mikrotik-whisperer/tree/main/.agents/skills/next-forge
Command: npx skills add https://github.com/Alwahdi/mikrotik-whisperer --skill next-forge-alwahdi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a SaaS application from scratch requires wiring together authentication, payments, database, email, CMS, analytics, and security before writing any product code. This Skill provides expert guidance on the next-forge Turborepo template so you can initialize, configure, customize, and deploy a production-grade Next.js monorepo without reverse-engineering its structure. ## Core Features & Use Cases - Project Initialization & Setup: Walks through npx next-forge@latest init, environment variable configuration, database migrations with Prisma and Neon, and Stripe CLI webhook testing. - Architecture Guidance: Explains the monorepo layout with seven apps (app, web, api, email, docs, storybook, studio) and over twenty shared @repo/* packages, plus the Turborepo pipeline and filtering commands. - Provider Swapping & Customization: Documents how to replace Clerk, Stripe, BaseHub, Resend, and other integrations with alternatives like Supabase Auth, Paddle, or Content Collections. - Use Case: You want to launch a SaaS product with subscriptions and a marketing site. Use this Skill to scaffold the monorepo, connect a Neon database, configure Stripe webhooks, and deploy the app, web, and api projects to Vercel. ## Quick Start Ask the assistant to initialize a new next-forge project and configure the database connection and environment variables for local development.

Frequently Asked Questions about next-forge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new project with next-forge?

Run npx next-forge@latest init and the CLI prompts for a project name and package manager (bun, npm, yarn, or pnpm). After installation, set DATABASE_URL in packages/database/.env, run bun run migrate, then start development with bun run dev.

How do I run database migrations in a next-forge monorepo?

Edit the schema at packages/database/prisma/schema.prisma, then run bun run migrate. This executes prisma format, prisma generate, and prisma db push in sequence against the database defined by DATABASE_URL.

Can I swap Clerk for another authentication provider in next-forge?

Yes, next-forge supports swapping Clerk for Supabase Auth, Auth.js, or Better Auth. Replace the packages/auth directory, update the AuthProvider in the design system, and adjust the webhook handlers in the api app.

Does next-forge work without configuring all integrations?

Yes, only the database is required. All other integrations degrade gracefully through optional chaining, so missing environment variables silently disable features like Stripe payments or Resend email rather than causing errors.

How do I deploy a next-forge monorepo to Vercel?

Create three separate Vercel projects with root directories set to apps/app, apps/web, and apps/api. Add environment variables per project or use Vercel Team Environment Variables, and update the NEXT_PUBLIC inter-app URLs to production domains.

Why does my next-forge build fail with environment variable errors?

Each package validates its environment variables at build time using @t3-oss/env-nextjs with Zod schemas in keys.ts files. A missing required variable like DATABASE_URL causes a descriptive build error, so verify the corresponding .env files.