MCPcopy
hub / github.com/vercel/next-forge

github.com/vercel/next-forge @v6.0.2 sqlite

repository ↗ · DeepWiki ↗ · release v6.0.2 ↗
951 symbols 2,367 edges 377 files 0 documented · 0%
README

▲ / next-forge

Production-grade Turborepo template for Next.js apps.

Overview

next-forge is a production-grade Turborepo template for Next.js apps. It's designed to be a comprehensive starting point for building SaaS applications, providing a solid, opinionated foundation with minimal configuration required.

Built on a decade of experience building web applications, next-forge balances speed and quality to help you ship thoroughly-built products faster.

Philosophy

next-forge is built around five core principles:

  • Fast — Quick to build, run, deploy, and iterate on
  • Cheap — Free to start with services that scale with you
  • Opinionated — Integrated tooling designed to work together
  • Modern — Latest stable features with healthy community support
  • Safe — End-to-end type safety and robust security posture

Demo

Experience next-forge in action:

  • Web — Marketing website
  • App — Main application
  • Storybook — Component library
  • API — API health check

Features

next-forge comes with batteries included:

Apps

  • Web — Marketing site built with Tailwind CSS and TWBlocks
  • App — Main application with authentication and database integration
  • API — RESTful API with health checks and monitoring
  • Docs — Documentation site powered by Mintlify
  • Email — Email templates with React Email
  • Storybook — Component development environment

Packages

  • Authentication — Powered by Clerk
  • Database — Type-safe ORM with migrations
  • Design System — Comprehensive component library with dark mode
  • Payments — Subscription management via Stripe
  • Email — Transactional emails via Resend
  • Analytics — Web (Google Analytics) and product (Posthog)
  • Observability — Error tracking (Sentry), logging, and uptime monitoring (BetterStack)
  • Security — Application security (Arcjet), rate limiting, and secure headers
  • CMS — Type-safe content management for blogs and documentation
  • SEO — Metadata management, sitemaps, and JSON-LD
  • AI — AI integration utilities
  • Webhooks — Inbound and outbound webhook handling
  • Collaboration — Real-time features with avatars and live cursors
  • Feature Flags — Feature flag management
  • Cron — Scheduled job management
  • Storage — File upload and management
  • Internationalization — Multi-language support
  • Notifications — In-app notification system

Getting Started

Prerequisites

  • Node.js 20+
  • Bun (or npm/yarn/pnpm)
  • Stripe CLI for local webhook testing

Installation

Create a new next-forge project:

npx next-forge@latest init

Setup

  1. Configure your environment variables
  2. Set up required service accounts (Clerk, Stripe, Resend, etc.)
  3. Run the development server

For detailed setup instructions, read the documentation.

Structure

next-forge uses a monorepo structure managed by Turborepo:

next-forge/
├── apps/           # Deployable applications
│   ├── web/        # Marketing website (port 3001)
│   ├── app/        # Main application (port 3000)
│   ├── api/        # API server
│   ├── docs/       # Documentation
│   ├── email/      # Email templates
│   └── storybook/  # Component library
└── packages/       # Shared packages
    ├── design-system/
    ├── database/
    ├── auth/
    └── ...

Each app is self-contained and independently deployable. Packages are shared across apps for consistency and maintainability.

Documentation

Full documentation is available at next-forge.com/docs, including:

  • Detailed setup guides
  • Package documentation
  • Migration guides for swapping providers
  • Deployment instructions
  • Examples and recipes

Contributing

We welcome contributions! See the contributing guide for details.

Contributors

Made with contrib.rocks.

License

MIT

Extension points exported contracts — how you extend this code

NotificationsProviderProps (Interface)
(no doc)
packages/notifications/components/provider.tsx
ContactTemplateProps (Interface)
(no doc)
packages/email/templates/contact.tsx
JsonLdProps (Interface)
(no doc)
packages/seo/json-ld.tsx
BetterStackResponse (Interface)
(no doc)
packages/observability/status/types.ts
Liveblocks (Interface)
(no doc)
packages/collaboration/config.ts
Query (Interface)
(no doc)
packages/cms/basehub-types.d.ts
MessageProps (Interface)
(no doc)
packages/ai/components/message.tsx
AnalyticsProviderProps (Interface)
(no doc)
packages/analytics/provider.tsx

Core symbols most depended-on inside this repo

cn
called by 262
packages/design-system/lib/utils.ts
cn
called by 151
docs/lib/utils.ts
log
called by 17
docs/app/api/chat/tools.ts
run
called by 9
scripts/utils.ts
createMetadata
called by 7
packages/seo/metadata.ts
keys
called by 7
packages/observability/keys.ts
getDictionary
called by 7
packages/internationalization/index.ts
useOpenInContext
called by 6
docs/components/ai-elements/open-in-chat.tsx

Shape

Function 770
Interface 178
Class 2
Method 1

Languages

TypeScript100%

Modules by API surface

packages/cms/basehub-types.d.ts115 symbols
docs/components/ai-elements/prompt-input.tsx54 symbols
packages/design-system/components/ui/sidebar.tsx25 symbols
packages/design-system/components/ui/menubar.tsx16 symbols
docs/components/ai-elements/message.tsx16 symbols
packages/design-system/components/ui/dropdown-menu.tsx15 symbols
packages/design-system/components/ui/context-menu.tsx15 symbols
docs/components/ui/dropdown-menu.tsx15 symbols
scripts/initialize.ts14 symbols
docs/components/ai-elements/open-in-chat.tsx13 symbols
packages/design-system/components/ui/alert-dialog.tsx11 symbols
scripts/update.ts10 symbols

Dependencies from manifests, versioned

@ai-sdk/openai3.0.41 · 1×
@ai-sdk/react2.0.115 · 1×
@arcjet/next1.2.0 · 1×
@auto-it/first-time-contributor11.3.6 · 1×
@biomejs/biome2.4.6 · 1×
@clack/prompts1.1.0 · 1×
@clerk/nextjs7.0.1 · 1×
@clerk/themes2.4.57 · 1×
@clerk/types4.101.20 · 1×
@formatjs/intl-localematcher0.8.1 · 1×
@hookform/resolvers5.2.2 · 1×

Datastores touched

dbnameDatabase · 1 repos

For agents

$ claude mcp add next-forge \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact