A minimal, opinionated starter for building modern Next.js applications with TypeScript and sensible defaults for linting, formatting, and testing.
- Next.js + TypeScript
- Tailwind CSS (optional)
- ESLint + Prettier configured
- Husky pre-commit hooks
- Testing setup (Jest / Vitest)
- Environment variable pattern (.env.local)
- Opinionated src/ structure
- Node.js 18+
- npm, yarn or pnpm
- Clone the repo: git clone
- Install dependencies: npm install
yarn
pnpm install 3. Copy env example: cp .env.example .env.local 4. Start development server: npm run dev
- npm run dev — start dev server
- npm run build — production build
- npm run start — run production server
- npm run lint — run ESLint
- npm run format — run Prettier
- npm run test — run tests
- npm run typecheck — TypeScript type check
Create a .env.local with values required for your app:
NEXT_PUBLIC_API_URL=https://api.example.com
DATABASE_URL=...
src/
- pages/ or app/
- components/
- lib/ (helpers, api)
- styles/
- hooks/ public/ .next.config.js tsconfig.json package.json .eslintrc.cjs .prettierrc
- Follow commit message convention
- Run lint and tests before opening PR
- Keep changes small and documented
Specify a license (e.g., MIT) in LICENSE file.