next-forge Documentation

repository·main·Indexed 27 days ago

https://github.com/vercel/next-forge

A production-grade Turborepo template for Next.js applications designed for building SaaS products. It provides an opinionated foundation with integrated tooling for authentication (Clerk), payments (Stripe), email (Resend), and observability (Sentry). The template includes Geistdocs, a documentation template built with Next.js and Fumadocs featuring AI chat, GitHub Discussions integration, and MDX support.

Tokens
83.9K
Snippets
282
Records
507
Agent score
93%

What's inside next-forge

  1. Overview of Geistdocs documentation template

    main
    Geistdocs is a modern documentation template built with Next.js and Fumadocs. It is designed for quickly creating Vercel-style documentation sites with a consistent UI and built-in features like AI chat and GitHub Discussions integration.
  2. Overview of next-forge Apps and Ports

    main

    The next-forge monorepo contains several deployable applications located in the /apps/ directory. Each app runs on a specific default port during local development:

    AppPortPurpose
    app3000Main authenticated SaaS application
    web3001Marketing website with CMS and SEO
    api3002Serverless API for webhooks, cron jobs
    email3003React Email preview server
    docs3004Documentation site (Mintlify)
    storybook6006Design system component workshop
    studio3005Prisma Studio for database editing
  3. Key features of Geistdocs

    main

    Geistdocs provides the following built-in capabilities for documentation sites:

    • MDX-powered documentation: Write content in MDX with full component support.
    • AI-powered chat: An integrated AI assistant that understands your documentation content.
    • GitHub Discussions integration: Allows users to provide feedback directly to your GitHub repository.
    • Modern UI: Accessible components built with Radix UI.
    • Advanced search: Fast, fuzzy search functionality across all documentation.
    • Dark mode: Built-in theme switching support.
    • Responsive design: Mobile-first approach.
    • Performance: Built on Next.js 16 with App Router.
    • RSS: Built-in RSS feed generation.
  4. Web application integrations and features

    main

    The web application in next-forge comes pre-integrated with several core packages to provide a production-ready marketing site:

    • Design System: Uses the @repo/design-system components, hooks, and utilities.
    • CMS: Integrated with the cms package to power a type-safe blog.
    • SEO: Uses the seo package for search engine optimization.
    • Analytics: Connected to the analytics package to track visitor behavior.
    • Observability: Connected to the observability package for error capture and performance tracking.
  5. Understand Sitemap Generation in next-forge

    main

    next-forge uses Next.js's built-in sitemap.ts functionality to automatically generate a sitemap during each build. The generation process aggregates routes from three primary sources:

    1. Page Collection: Scans the app directory for valid routes, excluding directories starting with _ (private routes) or ( (route groups).
    2. Blog Posts: Fetches published posts via blog.getPosts() from @repo/cms and generates URLs using the _slug field under the /blog/ path.
    3. Legal Pages: Fetches legal pages via legal.getPosts() from @repo/cms and generates URLs using the _slug field under the /legal/ path.

    Each entry in the resulting sitemap includes a full URL and a lastModified timestamp set to the current date.