A clean and ready-to-go Next.js starter template with TypeScript, ESLint, Prettier, testing tools, and a few essential libraries pre-installed — so you can focus on building your app instead of configuring tools from scratch.
This template comes pre-configured with:
You can create a new Next.js app using this template with the following command:
# pnpm
pnpm create next-app -e https://github.com/joaogabriel-sg/next-template
After finishing the installation, navigate to the project directory and run the setup script:
cd my-next-app
pnpm setup:project
To start the Next.js development server, run:
pnpm dev
The app will be available at http://localhost:5173 by default.
pnpm setup:project
— install deps and enable git hookspnpm dev
— start development serverpnpm build
— create production buildpnpm start
— start production serverpnpm lint
— run ESLintpnpm format
— run Prettierpnpm format:check
— check Prettier formattingpnpm typeCheck
— run TypeScript checkspnpm test:unit
— run unit tests (Vitest)pnpm test:unit:watch
— watch modepnpm test:unit:coverage
— run unit tests with coveragepnpm test:unit:coverage:watch
— watch mode + coveragepnpm test:e2e
— run Playwright e2e testspnpm test:e2e:ui
— run e2e tests with UIpnpm test:e2e:report
— show test coverage reportpreinstall
— prevent installing with npm or yarn, use pnpm insteadTo improve DX and avoid long relative imports like ../../../components
, this project uses a path alias:
import { Button } from "~/components/ui/Button";
The alias is configured in:
tsconfig.json
— for TypeScript configurationnext.config.js
— for Next.js configurationThis project is licensed under the MIT License - see the LICENSE file for more information.