A batteries-included Next.js template for building production-ready applications with TypeScript, TailwindCSS, and modern development tools.
- Next.js 15 with App Router
- React 19 with Server Components
- TypeScript for type safety
- Tailwind CSS for styling
- Biome for lightning-fast linting and formatting
- pnpm for fast, disk space efficient package management
- Lefthook for Git hooks
- Commitizen for conventional commits
- Semantic Release for automated versioning
- Vitest for unit testing
- Playwright for end-to-end testing
- Testing Library for component testing
- Customizable components using shadcn/ui
- Dark mode support out of the box
- Responsive layout templates
- Type checking in development
- Fast refresh with Turbopack
- Automated code formatting and linting
- Git hooks for code quality
- VSCode configurations and recommendations
node >= 18.0.0
pnpm >= 8.0.0# Create a new project
pnpm create next-app -e https://github.com/shabirkhan-dev/next-ts-template
# Or clone directly
git clone https://github.com/shabirkhan-dev/next-ts-template.git my-project
cd my-project
pnpm install# Start development server with Turbopack
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start# Run unit tests
pnpm test
# Run E2E tests
pnpm test:e2e
# Run tests with UI
pnpm test:ui
# Generate coverage report
pnpm coverage# Type checking
pnpm typecheck
# Lint files
pnpm lint
# Format files
pnpm format
# Fix linting issues
pnpm lint:fix├── src/
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components
│ │ └── ... # Other components
│ ├── lib/ # Utility functions
│ ├── styles/ # Global styles
│ └── types/ # TypeScript types
├── public/ # Static files
├── tests/ # Test files
│ ├── e2e/ # Playwright tests
│ └── unit/ # Vitest tests
├── .github/ # GitHub workflows
└── ... config files
next.config.js- Next.js configurationtailwind.config.ts- Tailwind CSS configurationbiome.json- Biome configurationlefthook.yml- Git hooks configurationvitest.config.ts- Vitest configurationplaywright.config.ts- Playwright configurationtsconfig.json- TypeScript configuration
| Script | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm test |
Run unit tests |
pnpm test:e2e |
Run E2E tests |
pnpm lint |
Lint code |
pnpm format |
Format code |
pnpm commit |
Create conventional commit |
pnpm clean |
Clean build files |
This template is optimized for deployment on Vercel. Just push to your repository and connect it to Vercel for automatic deployments.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using Commitizen (
pnpm commit) - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Authentication setup
- API route examples
- Protected routes
- Form handling
- Data fetching patterns
- Error handling
- Loading states
- SEO optimization
- Optimized images with next/image
- Automatic font optimization
- Route prefetching
- Bundle analyzing
- Code splitting
- Tree shaking
- Headers configuration
- CSP setup
- Environment variables handling
- Rate limiting example
- API route protection
- Production-ready configuration
- Modern development tools
- Best practices implemented
- Type safety out of the box
- Comprehensive testing setup
- Automated workflows
- Consistent code style
- Regular updates
For support, email your-email@example.com or open an issue in the repository.
Shabir Khan
- Website: https://shabirkhan.dev
- Email: shabirkhan.dev@gmail.com
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Shabir Khan