Monorepo foundation with Turborepo
Start from a production-grade Next.js monorepo rather than assembling routing, shared code, and tooling from scratch.
next-forge is a production-grade Turborepo template for Next.js apps. Build SaaS with a structured monorepo foundation, separate apps, shared packages, and opinionated defaults.
next-forge is a production-grade Turborepo template for Next.js apps. It provides a monorepo starting point for new SaaS projects, with a focus on shipping quickly without giving up a structured codebase.
The template is designed around separate apps and shared packages, so teams can keep product surfaces independent while still reusing common code. The docs describe it as a comprehensive, opinionated foundation with minimal configuration and a workflow that favors clear boundaries between apps and packages.
Start from a production-grade Next.js monorepo rather than assembling routing, shared code, and tooling from scratch.
Run multiple self-contained apps in one repository, with recommended subdomains and separate environment variables for each app.
Keep shared code in packages such as the database layer, which centralizes schema, migrations, middleware, hooks, components, and environment exports.
Use Turborepo boundaries to help catch workspace violations with `bun run boundaries`.
Ship with app templates for web, API, email, docs, studio, and Storybook, each focused on a different part of the product stack.
Use a documented setup that includes Next.js Server Actions, Prisma, Resend, Clerk, shadcn/ui, BaseHub, Storybook, and other tools already wired into the template.
Use the template when you want to launch a new SaaS product with a ready-made web app, API, docs, and supporting tooling instead of assembling each piece manually.
Use the monorepo layout when several products or surfaces need shared packages but still need to remain deployable as separate apps.
Use the API, email, and studio apps together when a product needs backend endpoints, transactional email templates, and a database editor in the same codebase.
Use the docs, web, and Storybook apps when you need a public site, maintainable documentation, and isolated component previews for frontend work.
Use the boundary checks and app-specific environment conventions when you want a disciplined repository structure that helps avoid accidental cross-app coupling.
next-forge uses Next.js Server Actions instead of tRPC because the project favors a native Next.js approach with tighter framework integration and less complexity.
The default tools were chosen by the project author based on experience using them in production applications. The docs say those defaults may change over time as tools and preferences evolve.
The documentation says the `suppressHydrationWarning` on each `html` tag follows the recommendation from `next-themes` to avoid theme-related hydration warnings caused by determining theme on the client side.
The FAQ says some dependencies are present to prevent Turbopack warnings about packages that are used but not installed in the project itself, which could otherwise fail in production.
Yes. The structure docs say each app and package should be self-contained, and the repository includes a contributing guide and documentation pages for working with the template.