Projects

Custom Next.js Template

20231 min read

React
TypeScript
Tailwind CSS
Next.js
shadcn UI
Zustand

The template most of the other projects here start from.

The template most of the other projects here start from.

It exists because the first hour of a new Next.js app is always the same hour: wiring TypeScript paths, getting ESLint and Prettier to stop contradicting each other, adding a dark theme that does not flash white before hydration, installing shadcn/ui, and setting up a pre-commit hook so none of it decays by week three. Doing that once and keeping it in a repository turns the hour into a single command — create-next-app -e pointed here.

Ships with next-themes, absolute imports, Husky hooks, Tailwind and the shadcn component set already configured. There is a Vite sibling for projects that do not need a server.

Unglamorous, and by a wide margin the most reused thing on this page.

Introduction#

Sadge Template is a custom Next.js starter template for new web projects.

You can also find Sadge Vite template here

Features#

  • Dark theme with next-themes
  • TypeScript support
  • ESLint and Prettier
  • Absolute imports
  • Husky pre-commit hooks
  • Tailwind CSS
  • Shadcn-ui components

Prerequisites#

You need the following installed on your machine:

Usage create-next-app#

To create a new project from this template, use create-next-app with the -e flag:

npx create-next-app -e https://github.com/Vette1123/next-js-starter-template --use-pnpm