A production-ready Next.js 16 starter with TypeScript, Tailwind CSS 4, and sensible defaults.
- Next.js 16 with App Router and React 19
- TypeScript with strict mode
- Tailwind CSS 4 with PostCSS
- ESLint 9 with import sorting
- Prettier with Tailwind plugin
- Husky + lint-staged for pre-commit hooks
- Commitlint for conventional commits
- SEO ready with sitemap and robots.txt
pnpm install
pnpm devOpen http://localhost:3000 to see your app.
Option 1: GitHub Template
- Click "Use this template" on GitHub
- Create your new repository
- Clone and start building
Option 2: Clone directly
git clone https://github.com/yukebrillianth/next-template.git my-project
cd my-project
rm -rf .git && git init
pnpm installOption 3: degit
npx degit yukebrillianth/next-template my-project
cd my-project
pnpm installAfter cloning:
- Update
nameinpackage.json - Update site info in
constants/index.ts - Copy
.env.exampleto.env.local - Replace favicon and OG image in
public/
├── app/ # Next.js App Router
├── components/
│ ├── ui/ # Reusable UI components
│ └── layouts/ # Layout components
├── lib/
│ ├── cn.ts # clsx + tailwind-merge
│ ├── env.ts # Type-safe env vars
│ ├── helpers.ts # Utility functions
│ └── seo.ts # SEO metadata helper
├── hooks/ # Custom React hooks
├── types/ # TypeScript types
└── constants/ # Site config
| Command | Description |
|---|---|
pnpm dev |
Start dev server |
pnpm build |
Production build |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Fix lint issues |
pnpm format |
Format with Prettier |
Copy .env.example to .env.local and fill in your values:
cp .env.example .env.localEdit lib/env.ts to add your environment variables with type-safe validation.
- Update
constants/index.tswith your site info - Replace favicon and OG image in
public/ - Modify
app/sitemap.tsto include your routes
To self-host with Docker:
-
Enable standalone output in
next.config.ts:output: 'standalone',
-
Build and run:
docker build -t my-app . docker run -p 3000:3000 my-app
MIT