next-forge

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

Updated Aug 21, 2025
One-click install
npx skills add https://github.com/Adithiya-S/AI-Study-Companion --skill next-forge-adithiya-s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-forge
Source: https://github.com/Adithiya-S/AI-Study-Companion/tree/main/.agents/skills/next-forge/upstream
Command: npx skills add https://github.com/Adithiya-S/AI-Study-Companion --skill next-forge-adithiya-s

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 local development across the seven apps (app, web, api, email, docs, storybook, studio). - Architecture & Package Guidance: Explains the monorepo structure, the @repo/* package conventions, Turborepo pipeline tasks, and how integrations like Clerk, Stripe, BaseHub, Resend, PostHog, and Arcjet fit together. - Customization & Deployment: Covers swapping providers (e.g., Prisma to Drizzle, Clerk to Auth.js, Stripe to Paddle), adding new apps or packages, and deploying to Vercel with per-app projects and shared environment variables. - Use Case: You want to launch a SaaS product with subscriptions and a marketing site. Use this Skill to scaffold the monorepo, connect Neon PostgreSQL and Stripe, then deploy the app, web, and api projects to Vercel. ## Quick Start Ask the assistant to initialize a new next-forge project and explain which environment variables are required to run it locally.

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 Prisma 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 is modular by design. Replace the packages/auth directory with Supabase Auth, Auth.js, or Better Auth, then update the AuthProvider in the design system and the webhook handlers in the api app.

Does next-forge work if I skip optional integrations like Stripe or PostHog?

Yes, all integrations besides the database are optional. Clients use optional chaining such as stripe?.prices.list(), so missing environment variables gracefully disable features instead of 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.