A Next.js template with TypeScript, Tailwind CSS, testing infrastructure, and development tooling pre-configured.
- Next.js 15 - Latest version with App Router
- TypeScript - Type safety and better developer experience
- Tailwind CSS - Utility-first CSS framework
- ESLint + Prettier - Code linting and formatting
- Husky - Pre-commit hooks for code quality
- Jest + React Testing Library - Comprehensive testing setup
- Docker - Containerization ready
- Environment Variables - Dotenv configuration
- VS Code Settings - Standardized editor configuration
- Centralized Font Management - Optimized Geist fonts
-
Clone and install dependencies:
git clone <your-repo-url> cd next-template npm install
-
Set up environment variables:
cp .env_template .env
-
Start the development server:
npm run dev
-
Open your browser: Visit http://localhost:3001 to see your application.
npm run dev- Start development server (uses custom port from .env)npm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm test- Run Jest testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage report
This template includes a complete testing setup with Jest and React Testing Library:
# Run all tests
npm test
# Watch mode for development
npm run test:watch
# Generate coverage report
npm run test:coverageTest files should be placed in __tests__ directories or use .test.tsx suffixes.
The project uses Husky to run code quality checks before commits:
- ESLint for code linting
- Prettier for code formatting
- Next.js recommended rules
- TypeScript support
- Prettier integration
Build and run with Docker:
# Build the image
docker build -t next-template .
# Run the container
docker run -p 3000:3000 next-templateFor detailed information about the project structure and organization guidelines, see PROJECT_STRUCTURE.md.