A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.
💫 Built with love by Yeasin and other contributor
If you found any issue or have any suggestion, please open an issue or a pull request.
- ⚡ Next.js 15 with App Router & Server Components
- 🔷 TypeScript 5.8 with strict configuration
- ⚛️ React 19 with latest features
- 🎯 Tailwind CSS with custom design system
- 🧩 shadcn/ui components with Radix UI primitives
- 🌙 Dark mode support with next-themes
- 🎭 Lucide React icons
- 🐘 Drizzle ORM with PostgreSQL support
- 🌐 Multi-provider support (Neon, PlanetScale, Turso, Xata)
- 🔄 Database migrations and seeding
- 🎛️ Drizzle Studio for database management
- 👤 better-auth integration for auth management
- 🔒 Secure authentication flows
- 📧 Email templates with React Email
- 🗣️ next-intl for i18n support
- 🌐 Locale routing and translations
- ⚡ Vitest for unit testing with jsdom
- 🎭 Playwright for E2E testing
- 🧪 Testing Library for React components
- 📚 Storybook for component development
- 📊 Coverage reports with v8
- 🎯 ESLint with Next.js & TypeScript configs
- 💅 Prettier with Tailwind plugin
- 🔍 Knip for unused code detection
- 🦅 Codehawk for code analysis
- 📦 Bundle Analyzer for optimization
- 🏥 Health checks and monitoring
- 📈 Performance monitoring with React Scan
- 🔒 Security headers configured
- 📊 OpenTelemetry integration
- ⚡ Edge runtime support
- Node.js 18+ or Bun
- PostgreSQL database
- Git
# Clone the repository
git clone https://github.com/yeasin2002/nextjs-starter-template.git
cd nextjs-starter-template
# Quick setup (recommended)
npm run setup
# Or manual setup:
# Install dependencies
npm install
# or
bun install
# Copy environment variables
cp .env.example .env # Linux/Mac
# copy .env.example .env # Windows
# Set up your database URL and other environment variables
# Edit .env file with your configuration
# Generate database schema
npm run db:generate
# Run database migrations
npm run db:migrate
# Seed the database (optional)
npm run db:seed
# Start development server
npm run devVisit http://localhost:3000 to see your application.
npm run setup # Quick project setup
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run type-check # TypeScript type checking
npm run clean # Clean build artifactsnpm run db:generate # Generate database migrations
npm run db:migrate # Apply database migrations
npm run db:studio # Open Drizzle Studio
npm run db:seed # Seed database with sample datanpm run test # Run unit tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
npm run test:e2e # Run E2E tests
npm run test:e2e:ui # Run E2E tests with UInpm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues automatically
npm run format # Format code with Prettier
npm run format:check # Check code formatting
npm run knip # Check for unused code
npm run codehawk # Analyze code qualitynpm run storybook # Start Storybook dev server
npm run build-storybook # Build Storybook for productionnpm run analyze # Analyze bundle size├── .kiro/ # Kiro AI assistant configuration
├── .storybook/ # Storybook configuration
├── config/ # Application configuration
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # Reusable React components
│ │ └── ui/ # shadcn/ui components
│ ├── db/ # Database configuration & schema
│ ├── hooks/ # Custom React hooks
│ ├── i18n/ # Internationalization
│ ├── lib/ # Utility libraries
│ ├── styles/ # Global CSS
│ ├── types/ # TypeScript definitions
│ └── utils/ # Helper functions
├── tests/ # E2E and integration tests
└── scripts/ # Build and deployment scripts
Copy .env.example to .env and configure:
- Database connection
- Optional: Sentry, PostHog, Stripe, etc.
- Set your
DATABASE_URLin.env - Run migrations:
npm run db:migrate - Optional: Seed data:
npm run db:seed
- Better Auth
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to 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.
- Next.js - The React framework
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI components
- Drizzle ORM - TypeScript ORM