An open API service indexing awesome lists of open source software.

https://github.com/yeasin2002/bulletproof-nextjs-starter

A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.
https://github.com/yeasin2002/bulletproof-nextjs-starter

better-auth boilerplate bulletproof-react codehawks drizzle-orm hono next-js next-template nextjs nextjs-boilerplate nextjs-starter-template storybook tailwindcss vitest

Last synced: about 1 month ago
JSON representation

A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.

Awesome Lists containing this project

README

          

# ๐Ÿš€ Next.js Starter Template

A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.
### โญ **Star this repository if it helped you!**

> ๐Ÿ’ซ **Built with love by [Yeasin](https://github.com/yeasin2002)** and other contributor

##### If you found any issue or have any suggestion, please open an [issue](https://github.com/yeasin2002/nextjs-starter-template/issues) or a [pull request](https://github.com/yeasin2002/nextjs-starter-template/pulls).

##### Feel free to reach out to me on [Linkedin](https://www.linkedin.com/in/yeasin2002/) or [Gmail](mailto:mdkawsarislam2002@gmail.com) if you have any questions or feedback.

## โœจ Features

### ๐Ÿ—๏ธ **Core Framework**
- โšก **Next.js 15** with App Router & Server Components
- ๐Ÿ”ท **TypeScript 5.8** with strict configuration
- โš›๏ธ **React 19** with latest features

### ๐ŸŽจ **UI & Styling**
- ๐ŸŽฏ **Tailwind CSS** with custom design system
- ๐Ÿงฉ **shadcn/ui** components with Radix UI primitives
- ๐ŸŒ™ **Dark mode** support with next-themes
- ๐ŸŽญ **Lucide React** icons

### ๐Ÿ—„๏ธ **Database & ORM**
- ๐Ÿ˜ **Drizzle ORM** with PostgreSQL support
- ๐ŸŒ **Multi-provider** support (Neon, PlanetScale, Turso, Xata)
- ๐Ÿ”„ **Database migrations** and seeding
- ๐ŸŽ›๏ธ **Drizzle Studio** for database management

### ๐Ÿ” **Authentication**
- ๐Ÿ‘ค **better-auth** integration for auth management
- ๐Ÿ”’ **Secure** authentication flows
- ๐Ÿ“ง **Email templates** with React Email

### ๐ŸŒ **Internationalization**
- ๐Ÿ—ฃ๏ธ **next-intl** for i18n support
- ๐ŸŒ **Locale routing** and translations

### ๐Ÿงช **Testing Suite**
- โšก **Vitest** for unit testing with jsdom
- ๐ŸŽญ **Playwright** for E2E testing
- ๐Ÿงช **Testing Library** for React components
- ๐Ÿ“š **Storybook** for component development
- ๐Ÿ“Š **Coverage reports** with v8

### ๐Ÿ”ง **Development Tools**
- ๐ŸŽฏ **ESLint** with Next.js & TypeScript configs
- ๐Ÿ’… **Prettier** with Tailwind plugin
- ๐Ÿ” **Knip** for unused code detection
- ๐Ÿฆ… **Codehawk** for code analysis
- ๐Ÿ“ฆ **Bundle Analyzer** for optimization

### ๐Ÿณ **DevOps & Deployment**

- ๐Ÿฅ **Health checks** and monitoring
- ๐Ÿ“ˆ **Performance monitoring** with React Scan

### ๐Ÿ›ก๏ธ **Security & Performance**
- ๐Ÿ”’ **Security headers** configured

- ๐Ÿ“Š **OpenTelemetry** integration
- โšก **Edge runtime** support

## ๐Ÿš€ Quick Start

### Prerequisites
- Node.js 18+ or Bun
- PostgreSQL database
- Git

### Installation

```bash
# 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 dev
```

Visit [http://localhost:3000](http://localhost:3000) to see your application.

## ๐Ÿ“œ Available Scripts

### ๐Ÿ”ง **Development**
```bash
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 artifacts
```

### ๐Ÿ—„๏ธ **Database**
```bash
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
```

### ๐Ÿงช **Testing**
```bash
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
```

### ๐Ÿ’… **Code Quality**
```bash
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
```

### ๐Ÿ“š **Storybook**
```bash
npm run storybook # Start Storybook dev server
npm run build-storybook # Build Storybook for production
```

### ๐Ÿ“Š **Analysis**
```bash
npm run analyze # Analyze bundle size
```

## ๐Ÿ“ Project Structure

```
โ”œโ”€โ”€ .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
```

## ๐Ÿ”ง Configuration

### Environment Variables
Copy `.env.example` to `.env` and configure:
- Database connection
- Optional: Sentry, PostHog, Stripe, etc.

### Database Setup
1. Set your `DATABASE_URL` in `.env`
2. Run migrations: `npm run db:migrate`
3. Optional: Seed data: `npm run db:seed`

### Authentication
- Better Auth

## ๐Ÿš€ Deployment

### Vercel Deployment
1. Connect your repository to Vercel
2. Set environment variables in Vercel dashboard
3. Deploy automatically on push to main branch

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Commit changes: `git commit -m 'Add amazing feature'`
4. Push to branch: `git push origin feature/amazing-feature`
5. Open a Pull Request

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- [Next.js](https://nextjs.org/) - The React framework
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
- [shadcn/ui](https://ui.shadcn.com/) - Beautiful UI components
- [Drizzle ORM](https://orm.drizzle.team/) - TypeScript ORM
---