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: 4 months ago
JSON representation
A production-ready Next.js boilerplate with modern tooling, comprehensive testing, and enterprise-grade features.
- Host: GitHub
- URL: https://github.com/yeasin2002/bulletproof-nextjs-starter
- Owner: yeasin2002
- Created: 2025-07-26T16:43:52.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T09:20:15.000Z (4 months ago)
- Last Synced: 2025-08-20T11:25:25.378Z (4 months ago)
- Topics: better-auth, boilerplate, bulletproof-react, codehawks, drizzle-orm, hono, next-js, next-template, nextjs, nextjs-boilerplate, nextjs-starter-template, storybook, tailwindcss, vitest
- Language: TypeScript
- Homepage: https://bulletproof-nextjs-starter.vercel.app/
- Size: 2.01 MB
- Stars: 134
- Watchers: 0
- Forks: 34
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
---