Next-Forge is a Next.js SaaS boilerplate, free and open-source, designed to provide everything you need to build your new SaaS app as thoroughly as possible. It covers authentication, database & ORM, payments, documentation, blog, observability, analytics, emails, and even feature flags & dark mode. It has thousands of stars on GitHub, providing strong social proof.
Next-Forge is a monorepo, meaning it contains multiple packages in a single repository. The monorepo is managed by Turborepo, a tool for handling monorepos.
Authentication is managed by Clerk, which provides a complete authentication and user management solution that integrates seamlessly with Next.js applications.
For managing the database, it uses Prisma ORM (with Neon) and runs a migration command to scaffold the database. It also supports Prisma Studio for visually managing the database.
Next-Forge uses Mintlify to generate beautiful documentation. Each page is an .mdx file written in Markdown, with built-in UI components and an API playground.
Next-Forge comes with react.email built in, allowing you to create and send beautiful emails using React and TypeScript. It uses Resend to send transactional emails.
For UI, it uses Tailwind CSS and shadcn/ui to style all components. The dark mode implementation uses Tailwind’s darkMode: 'class'
strategy, which toggles dark mode by adding a dark
class to the HTML element.
Next-Forge includes a pre-configured AI package that uses ai-sdk to provide a simple interface for interacting with AI models. For example, you can use it to build your own AI chatbot.
For payments, it uses Stripe, the most popular payment processor in the SaaS space.
It supports Google Analytics to track user behavior, page views, session duration, and other engagement metrics, providing insights into user activity and marketing effectiveness. It also supports PostHog for session replays.
By default, Next-Forge uses Vercel’s cron jobs feature to trigger Next.js serverless functions on a schedule. However, you can use other background job services if needed.
Next-Forge includes a powerful internationalization package that enables you to add multiple language support to your application with minimal configuration. It is built on Next.js Internationalization’s routing system and Languine’s translation system.
Next-Forge uses Sentry for error tracking and performance monitoring. It helps identify, debug, and resolve issues by providing detailed error reports, stack traces, and performance metrics across both server and client environments.
Next-Forge offers a notifications package that allows you to send in-app notifications to your users. By default, it uses Knock, a cross-channel notification platform that supports in-app, email, SMS, push, and chat notifications.
If you need to create an API, Next-Forge has a rate-limit package powered by @upstash/ratelimit, a connectionless (HTTP-based) rate-limiting library designed specifically for serverless and edge environments.
Next-Forge uses Vitest for unit testing. It’s a fast and lightweight testing framework compatible with Jest’s API.
You will need to create accounts with the following services and set the API keys in your environment variables: