zbeyens / next-forge

A production-grade boilerplate for modern Next.js apps.

Home Page:https://github.com/haydenbleasel/next-forge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

next-forge

A production-grade boilerplate for modern Next.js apps.

next-forge is a Next.js project boilerplate for modern web application. It is designed to be a comprehensive starting point for new apps, providing a solid, opinionated foundation with a minimal amount of configuration.

Features

  • β–² Framework is Next.js 14 (using App Directory and React Server Components) β€” a React framework for production-grade apps. Designed to be deployed on Vercel, but you can take it almost anywhere.
  • 🀝 Full TypeScript support, including strict mode.
  • πŸ“¦ React components from shadcn/ui, built on Radix UI, Tailwind CSS and cva.
  • πŸ‘©β€βš–οΈ Linting from eslint-config-harmony, which provides a strict set of configuration for ESLint, Prettier and Stylelint.
  • πŸ“€ Database uses Prisma as the ORM. Can be connected to any supported database β€” I recommend PlanetScale.
  • πŸ“§ Emails templated by react.email and sent using Resend. Additionally, Loops form for a waitlist.
  • πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Authentication provided by Clerk, which provides a secure, scalable and customizable authentication system.
  • 🟒 Log Drain and Status provided by BetterStack.
  • 🐞 Error capturing provided by Sentry.
  • πŸ’Έ Payments provided by Stripe.
  • πŸ“ˆ Analytics provided by Vercel Analytics and Google Analytics.
  • πŸ€– AI provided by Vercel AI, using OpenAI by default.
  • πŸ’¬ Feedback through Canny.
  • πŸ“ MDX content through Contentlayer.
  • πŸ”” Notifications provided by Knock.
  • πŸ”„ Cron jobs provided by Vercel.

... plus a stack of other features for customization, security and performance.

Philosophy

next-forge is a culmination of my experience building web apps over the last decade and focuses on a few key principles:

  1. The project should be fast. This doesn't just mean fast to build, run and deploy. It also means it should be fast to validate ideas, iterate and scale. This is important for finding product-market fit and growing a business.
  2. The project should be cheap, at least to start. It should avoid a flat cost, or have a generous free tier. I try to make all my projects self-sustaining, so the goal is to avoid any recurring costs upfront and find services that scale with me.
  3. The project should be opinionated. This means that the tooling should be designed to work together, and the project should be designed to work with the tooling. This is important for reducing friction and increasing productivity.
  4. The project should be modern. This means that the tooling should be actively maintained, and the project should be designed to take advantage of the latest features. This is important for reducing technical debt and increasing longevity.

Prerequisites

You will need the following things properly installed on your computer.

Usage

First, scaffold the app with:

pnpm create next-app --example https://github.com/haydenbleasel/next-forge

Once it is downloaded, rename .env.example to .env. This will turn the example environment variables into your local ones. This file is not committed to GitHub by default (and shouldn't be). You can do this in Terminal with:

mv .env.example .env

Next, update the environment variables in .env with your own values.

Then, update any reference of /CompanyName/ in the legal docs. You can do this with:

grep -rl '/CompanyName/' blog/ | xargs sed -i '' 's|/CompanyName/|Acme|g'

Finally, run the development server with:

pnpm dev

Open http://localhost:3000 with your browser to see the result. You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

About

A production-grade boilerplate for modern Next.js apps.

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


Languages

Language:TypeScript 76.7%Language:MDX 21.9%Language:JavaScript 1.4%Language:CSS 0.0%