# Next Forge > next-forge expert guidance — production-grade Turborepo monorepo SaaS starter by Vercel. Use when working in a next-forge project, scaffolding with `npx next-forge init`, or editing @repo/* workspace packages. Fuente: https://skillsagentes.com/skills/vercel/vercel-plugin/next-forge Markdown: https://skillsagentes.com/skills/vercel/vercel-plugin/next-forge.md Repositorio: https://github.com/vercel/vercel-plugin Autor: vercel Licencia: NOASSERTION Actualizado: hace 4 meses Coste de contexto: 53 tok instalada, 2.3k tok al activarse, 17.3k tok con todos los archivos del bundle Bundle: 11 archivos, 68 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add vercel/vercel-plugin --skill next-forge --agent claude-code # Cursor npx -y skills add vercel/vercel-plugin --skill next-forge --agent cursor # Codex npx -y skills add vercel/vercel-plugin --skill next-forge --agent codex # Gemini CLI npx -y skills add vercel/vercel-plugin --skill next-forge --agent gemini # Windsurf npx -y skills add vercel/vercel-plugin --skill next-forge --agent windsurf # Cline npx -y skills add vercel/vercel-plugin --skill next-forge --agent cline ``` ## Antes de instalar - Necesita en el PATH: bun, npx ## Archivos - SKILL.md — 9 KB - overlay.yaml — 4 KB - references/architecture.md — 5 KB - references/customization.md — 7 KB - references/packages.md — 8 KB - references/setup.md — 4 KB - upstream/SKILL.md — 5 KB - upstream/references/architecture.md — 5 KB - upstream/references/customization.md — 7 KB - upstream/references/packages.md — 8 KB - upstream/references/setup.md — 4 KB ## SKILL.md Reproducido tal cual desde vercel/vercel-plugin bajo NOASSERTION. Esta sección es el documento original y está en inglés. # next-forge next-forge is a production-grade Turborepo template for building Next.js SaaS applications. It provides a monorepo structure with multiple apps, shared packages, and integrations for authentication, database, payments, email, CMS, analytics, observability, security, and more. ## Quick Start Initialize a new project: ```bash npx next-forge@latest init ``` The CLI prompts for a project name and package manager (bun, npm, yarn, or pnpm). After installation: 1. Set the `DATABASE_URL` in `packages/database/.env` pointing to a PostgreSQL database (Neon recommended). 2. Run database migrations: `bun run migrate` 3. Add any optional integration keys to the appropriate `.env.local` files. 4. Start development: `bun run dev` All integrations besides the database are optional. Missing environment variables gracefully disable features rather than causing errors. ## Architecture Overview The monorepo contains apps and packages. Apps are deployable applications. Packages are shared libraries imported as `@repo/`. **Apps** (in `/apps/`): | App | Port | Purpose | |-----|------|---------| | `app` | 3000 | Main authenticated SaaS application | | `web` | 3001 | Marketing website with CMS and SEO | | `api` | 3002 | Serverless API for webhooks, cron jobs | | `email` | 3003 | React Email preview server | | `docs` | 3004 | Documentation site (Mintlify) | | `storybook` | 6006 | Design system component workshop | | `studio` | 3005 | Prisma Studio for database editing | **Core Packages**: `auth`, `database`, `payments`, `email`, `cms`, `design-system`, `analytics`, `observability`, `security`, `storage`, `seo`, `feature-flags`, `internationalization`, `webhooks`, `cron`, `notifications`, `collaboration`, `ai`, `rate-limit`, `next-config`, `typescript-config`. For detailed structure, see `references/architecture.md`. ## Key Concepts ### Environment Variables Environment variable files live alongside apps and packages: - `apps/app/.env.local` — Main app keys (Clerk, Stripe, etc.) - `apps/web/.env.local` — Marketing site keys - `apps/api/.env.local` — API keys - `packages/database/.env` — `DATABASE_URL` (required) - `packages/cms/.env.local` — BaseHub token - `packages/internationalization/.env.local` — Languine project ID Each package has a `keys.ts` file that validates environment variables with Zod via `@t3-oss/env-nextjs`. Type safety is enforced at build time. ### Inter-App URLs Local URLs are pre-configured: - `NEXT_PUBLIC_APP_URL=http://localhost:3000` - `NEXT_PUBLIC_WEB_URL=http://localhost:3001` - `NEXT_PUBLIC_API_URL=http://localhost:3002` - `NEXT_PUBLIC_DOCS_URL=http://localhost:3004` Update these to production domains when deploying (e.g., `app.yourdomain.com`, `www.yourdomain.com`). ### Server Components First `page.tsx` and `layout.tsx` files are always server components. Client interactivity goes in separate files with `'use client'`. Access databases, secrets, and server-only APIs directly in server components and server actions. ### Graceful Degradation All integrations beyond the database are optional. Clients use optional chaining (e.g., `stripe?.prices.list()`, `resend?.emails.send()`). If the corresponding environment variable is not set, the feature is silently disabled. ## Common Tasks ### Running Development ```bash bun run dev # All apps bun dev --filter app # Single app (port 3000) bun dev --filter web # Marketing site (port 3001) ``` ### Database Migrations After changing `packages/database/prisma/schema.prisma`: ```bash bun run migrate ``` This runs Prisma format, generate, and db push in sequence. ### Adding shadcn/ui Components ```bash npx shadcn@latest add [component] -c packages/design-system ``` Update existing components: ```bash bun run bump-ui ``` ### Adding a New Package Create a new directory in `/packages/` with a `package.json` using the `@repo/` naming convention. Add it as a dependency in consuming apps. ### Linting and Formatting ```bash bun run lint # Check code style (Ultracite/Biome) bun run format # Fix code style ``` ### Testing ```bash bun run test # Run tests across monorepo ``` ### Building ```bash bun run build # Build all apps and packages bun run analyze # Bundle analysis ``` ### Deployment Deploy to Vercel by creating separate projects for `app`, `web`, and `api` — each pointing to its respective root directory under `/apps/`. Add environment variables per project or use Vercel Team Environment Variables. For detailed setup and customization instructions, see: - `references/setup.md` — Installation, prerequisites, environment variables, database and Stripe CLI setup - `references/packages.md` — Detailed documentation for every package - `references/customization.md` — Swapping providers, extending features, deployment configuration - `references/architecture.md` — Full monorepo structure, Turborepo pipeline, scripts ## Dónde encaja - Categoría: [Bases de datos](https://skillsagentes.com/categorias/bases-de-datos.md) — Diseño de esquemas, migraciones y optimización de consultas. - Creador: [vercel](https://skillsagentes.com/creators/vercel.md) — 79 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Knowledge Update](https://skillsagentes.com/skills/vercel/vercel-plugin/knowledge-update.md): Corrects outdated LLM knowledge about the Vercel platform and introduces new products. Injected at session start. - [Vercel Connect](https://skillsagentes.com/skills/vercel/vercel-plugin/vercel-connect.md): Vercel Connect expert guidance — securely obtain scoped OAuth tokens for third-party services (Slack, GitHub, MCP servers, OAuth, Snowflake) on behalf of apps or users via Vercel OIDC. Use when wiring up third-party API access, connecting to MCP servers, sending Slack messages, accessing GitHub APIs, receiving webhook events from Slack/Linear/GitHub and forwarding them to your agents and apps, or building eve agent connections. - [Vercel Functions](https://skillsagentes.com/skills/vercel/vercel-plugin/vercel-functions.md): Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel. - [Cdn Caching](https://skillsagentes.com/skills/vercel/vercel-plugin/cdn-caching.md): Debug Vercel CDN caching — cache hit rate, stale content, revalidation behavior, ISR + PPR, per-request cache reasons (cacheReason) and PPR state (ppr_state), and costs. - [Eve](https://skillsagentes.com/skills/vercel/vercel-plugin/eve.md): eve framework guidance for durable AI agents and agent-powered applications. Use when creating, editing, or debugging an eve project, when the user explicitly asks for eve, or when the build-agents skill has selected eve as the default framework. Covers eve's filesystem-first runtime, durable sessions, tools, skills, connections, channels, sandboxes, subagents, schedules, evals, frontend clients, and Agent Runs observability. Do not use for incidental agent mentions, generic agent-building prompts, or established non-eve stacks unless the user asks for comparison or migration. ## Skills relacionadas - [Bootstrap](https://skillsagentes.com/skills/vercel/vercel-plugin/bootstrap.md): Project bootstrapping orchestrator for repos that depend on Vercel-linked resources (databases, auth, and managed integrations). Use when setting up or repairing a repository so linking, environment provisioning, env pulls, and first-run db/dev commands happen in the correct safe order. - [Knowledge Update](https://skillsagentes.com/skills/vercel/vercel-plugin/knowledge-update.md): Corrects outdated LLM knowledge about the Vercel platform and introduces new products. Injected at session start. - [Next Cache Components](https://skillsagentes.com/skills/vercel/vercel-plugin/next-cache-components.md): Next.js 16 Cache Components guidance — PPR, use cache directive, cacheLife, cacheTag, updateTag, and migration from unstable_cache. Use when implementing partial prerendering, caching strategies, or migrating from older Next.js cache patterns. - [Next Upgrade](https://skillsagentes.com/skills/vercel/vercel-plugin/next-upgrade.md): Upgrade Next.js to the latest version following official migration guides and codemods. Use when upgrading Next.js versions, running codemods, or migrating between major releases. - [Benchmark Agents](https://skillsagentes.com/skills/vercel/vercel-plugin/benchmark-agents.md): Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features — Workflow SDK, AI Gateway, MCP, Chat SDK, Queues, Flags, Sandbox, and multi-agent orchestration. Designed to stress-test skill injection for complex, multi-system builds. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)