A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.
π« Built with love by Yeasin
- β‘ 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
- π€ Clerk integration for user 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
- π³ Docker with multi-stage builds
- π Docker Compose for development/production
- π₯ Health checks and monitoring
- π Performance monitoring with React Scan
- π Security headers configured
- π Standalone output for Docker
- π 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
# Install dependencies
npm install
# or
bun install
# Copy environment variables
cp .env.example .env
# 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 dev
Visit http://localhost:3000 to see your application.
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 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 data
npm 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 UI
npm 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 quality
npm run docker:build # Build Docker image
npm run docker:dev # Run development container
npm run docker:prod # Run production container
npm run docker:test # Run test container
npm run storybook # Start Storybook dev server
npm run build-storybook # Build Storybook for production
npm 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
- Clerk authentication keys
- Optional: Sentry, PostHog, Stripe, etc.
- Set your
DATABASE_URL
in.env
- Run migrations:
npm run db:migrate
- Optional: Seed data:
npm run db:seed
- Create a Clerk account at clerk.com
- Add your Clerk keys to
.env
- Customize sign-in/sign-up URLs as needed
# Build production image
npm run docker:build
# Run production container
npm run docker:prod
- 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
- Clerk - Authentication platform
β Star this repository if it helped you!