npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

nextjs-boilerplate-kit

v1.6.2

Published

πŸš€ Interactive CLI tool to generate modern Next.js 15 apps with authentication, payments, dashboard, PWA, and more. Choose your stack with TypeScript, Tailwind CSS, shadcn/ui, and enterprise features.

Downloads

2

Readme

πŸš€ nextjs-boilerplate-kit

npm version Downloads License Node.js Version

The ultimate CLI tool for generating modern, production-ready Next.js applications with enterprise-grade features, modular architecture, and best practices built-in.

✨ What Makes This Special?

nextjs-boilerplate-kit is not just another Next.js starter template. It's a modular, interactive CLI tool that lets you build exactly what you need, when you need it. Choose your authentication, payments, features, and more through an intuitive command-line interface.

🎯 Interactive Project Generation

npx nextjs-boilerplate-kit my-app
# ✨ Interactive prompts guide you through:
# πŸ” Authentication: NextAuth.js, Supabase, or None
# πŸ‘₯ Role-Based Auth: Admin/User roles (if Supabase selected)
# πŸ“ ORM: Drizzle, Prisma, Mongoose, or None (hidden if Supabase selected)
# πŸ’³ Payments: One-time, Subscriptions, or None  
# πŸ“© Email: Nodemailer for transactional emails
# πŸŒ™ Dark Mode: Theme switching
# πŸ“Š Dashboard: Analytics dashboard
# πŸ“± PWA: Progressive Web App features
# πŸ“š Storybook: Component development
# 🐳 Docker: Containerization
# πŸ” Sentry: Error monitoring

πŸš€ Quick Start

Prerequisites

  • Node.js >= 20.0.0
  • npm, yarn, or pnpm

Complete CLI Flow

Run the command and follow the interactive prompts:

npx nextjs-boilerplate-kit my-awesome-app

Here's the complete interactive flow you'll experience:

🌟 Welcome to nextjs-boilerplate-kit!
   Let's create your modern Next.js application

===============================
CORE APPLICATION CONFIGURATION
===============================

πŸ” Choose your authentication provider:
❯ NextAuth.js - Complete auth with OAuth providers
  Supabase Auth - Real-time auth with database
  None - Add authentication later

πŸ‘₯ Enable Role-Based Authentication (Admin/User roles)? (if Supabase selected)
❯ Yes
  No

πŸ“ Choose your ORM (Object-Relational Mapping): (hidden if Supabase selected)
❯ None - Add database operations later
  Drizzle - Lightweight, type-safe TypeScript ORM
  Prisma - Powerful database toolkit with introspection
  Mongoose - MongoDB object modeling with TypeScript

===============================
PAYMENT & COMMUNICATION
===============================

πŸ’³ Choose your Stripe integration:
❯ None - Add payments later
  One-time payments - Single payments and purchases
  Subscriptions - Recurring billing and subscriptions

πŸ“© Include Email module (Nodemailer) for transactional emails?
❯ Yes
  No

===============================
UI & USER EXPERIENCE
===============================

πŸŒ™ Enable dark mode toggle in your app?
❯ Yes
  No

πŸ“Š Include a Dashboard page (graphs, tables, stats)?
❯ Yes
  No

πŸ“± Include PWA (Progressive Web App) support?
❯ Yes
  No

===============================
DEVELOPMENT & DEPLOYMENT
===============================

πŸ“š Include Storybook for UI component development?
❯ Yes
  No

🐳 Include Docker configuration for containerization?
❯ Yes
  No

πŸ” Include Sentry for error monitoring and performance tracking?
❯ Yes
  No

πŸš€ Creating project in 'my-awesome-app'...

πŸŽ‰ Project created successfully!

πŸ“‹ Configuration Summary:
   πŸ” Auth: NextAuth
   πŸ’³ Payments: None
   πŸ“© Email: Enabled
   πŸ“Š Dashboard: Enabled
   πŸ“± PWA: Enabled
   πŸ“š Storybook: Enabled
   🐳 Docker: Enabled
   πŸ” Sentry: Enabled
   πŸ“ ORM: None
   πŸŒ™ Dark Mode: Enabled

πŸš€ Next Steps:
   cd my-awesome-app
   npm install
   cp .env.example .env.local
   # Configure environment variables in .env.local
   npm run dev

πŸ’‘ Tip: Visit http://localhost:3000 to see your app!

Made with πŸ’œ by CodeHuddle
Lets build the future together!⚑

Setup & Run

cd my-awesome-app
npm install
cp .env.example .env.local
npm run dev

πŸŽ‰ That's it! Visit http://localhost:3000 to see your application.

πŸ—οΈ Architecture & Features

πŸ” Modular Authentication System

Choose from multiple authentication providers, each with complete implementations:

| Provider | Features | Best For | |----------|----------|----------| | NextAuth.js | OAuth, credentials, session management | Full-featured apps with multiple providers | | Supabase | Real-time auth, database integration | Modern apps with real-time features | | Supabase + Roles | Role-based access control (Admin/User) | Enterprise applications | | None | No authentication | Simple apps or custom auth later |

Example CLI Flow:

πŸ” Choose your authentication provider:
❯ NextAuth.js - Complete auth with OAuth providers
  Supabase Auth - Real-time auth with database  
  None - Add authentication later

πŸ“ Smart Database ORM Integration

Intelligent ORM selection with modern test interfaces:

| ORM | Features | Use Case | |-----|----------|----------| | Drizzle | Lightweight, type-safe TypeScript ORM with zero runtime overhead | Fast, minimal database operations | | Prisma | Powerful database toolkit with introspection and migrations | Feature-rich applications with complex queries | | Mongoose | MongoDB object modeling with TypeScript support and schema validation | MongoDB applications with flexible schema design | | None | No database operations (auto-selected with Supabase Auth) | Simple apps or custom database setup later |

Smart Logic:

  • Supabase Auth β†’ Automatically selects None ORM (Supabase handles database)
  • Other Auth β†’ Shows ORM selection prompt
  • Modern Test Pages with setup instructions and interactive CRUD operations

Features Included:

  • Users-Only CRUD operations with React Query hooks
  • API Routes for user management (/api/users)
  • Modern Test Pages with setup instructions (/test-orm)
  • Type-Safe Queries with full TypeScript support
  • Database Schema definitions and migrations
  • Setup Instructions for each ORM with proper commands

Example CLI Flow:

πŸ“ Choose your ORM (Object-Relational Mapping): (hidden if Supabase selected)
❯ None - Add database operations later
  Drizzle - Lightweight, type-safe TypeScript ORM
  Prisma - Powerful database toolkit with introspection
  Mongoose - MongoDB object modeling with TypeScript

πŸ’³ Flexible Payment Integration

Integrated Stripe payments with complete flows:

| Integration | Features | Pages Included | |-------------|----------|----------------| | One-time Payments | Single payments, purchases | /test-payment, /payment/success, /payment/cancel | | Subscriptions | Recurring billing, subscription management | /test-subscription, /payment/success, /payment/cancel | | None | No payment integration | - |

Interactive Landing Page: When you select Stripe integration, your landing page automatically includes clickable links to test payment functionality.

πŸ“Š Optional Dashboard Module

Modern analytics dashboard with:

  • KPI Cards with metrics and trends
  • Interactive Charts using Recharts
  • Activity Timeline for user actions
  • Sales Table with data visualization
  • Responsive Design with sidebar navigation

πŸ“± Progressive Web App (PWA)

Complete PWA implementation:

  • Web App Manifest for app-like experience
  • Service Worker for offline functionality
  • Install Prompt component for app installation
  • Offline Support with caching strategies

πŸ“š Storybook Integration

Component development environment:

  • Pre-configured Storybook setup
  • Component Stories for UI development
  • Interactive Documentation for your design system
  • Visual Testing capabilities

🐳 Docker Containerization

Production-ready containerization:

  • Multi-stage Build for optimized images
  • Development Environment with hot reloading
  • Production Configuration for deployment
  • Generic Templates - easily customizable

πŸ” Sentry Error Monitoring

Comprehensive error tracking and performance monitoring:

  • Error Tracking with automatic error capture
  • Performance Monitoring for optimization insights
  • Source Maps for detailed stack traces
  • Session Replay for debugging user interactions
  • Custom Configuration - easily customizable

πŸŒ™ Smart Dark Mode

Intelligent theme system:

  • System Preference Detection
  • localStorage Persistence
  • Smooth Transitions with CSS variables
  • Conditional Inclusion - only adds toggle if enabled

πŸ› οΈ Technology Stack

Core Framework

  • Next.js 15 - Latest React framework with App Router
  • React 19 - Latest React with concurrent features
  • TypeScript - Full type safety
  • Tailwind CSS v4 - Utility-first styling

UI & Components

  • shadcn/ui - Beautiful, accessible components
  • Radix UI - Low-level UI primitives
  • Lucide React - Beautiful icon library
  • Class Variance Authority - Component variants

State Management

  • Zustand - Lightweight state management
  • TanStack Query - Server state management
  • React Hook Form - Performant forms
  • Zod - TypeScript-first validation

Database & ORM

  • Drizzle ORM - Lightweight, type-safe TypeScript ORM with zero runtime overhead
  • Prisma - Powerful database toolkit with introspection and migrations
  • Mongoose - MongoDB object modeling with TypeScript support and schema validation
  • PostgreSQL - Primary database support for Drizzle and Prisma
  • MongoDB - NoSQL database support for Mongoose
  • Smart ORM Selection - Auto-selects None ORM when Supabase Auth is chosen
  • Database Migrations - Schema versioning and updates
  • Type-Safe Queries - Full TypeScript integration
  • Modern Test Pages - Interactive database testing with setup instructions

Development Tools

  • Vitest - Fast unit testing
  • Playwright - E2E testing
  • ESLint - Code linting
  • Prettier - Code formatting
  • Husky - Git hooks
  • Commitizen - Conventional commits

Production Ready

  • Bundle Analysis with @next/bundle-analyzer
  • Docker configuration
  • CI/CD templates
  • SEO Optimization
  • Performance Monitoring ready

πŸ“ Project Structure

my-awesome-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ [locale]/          # Internationalization
β”‚   β”‚   β”‚   β”œβ”€β”€ (auth)/        # Authentication routes
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sign-in/   # Sign in pages
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sign-up/   # Sign up pages
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/ # Dashboard (if enabled)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ admin/     # Admin routes (Supabase Roles)
β”‚   β”‚   β”‚   β”‚   └── user/      # User routes (Supabase Roles)
β”‚   β”‚   β”‚   β”œβ”€β”€ test-payment/  # Stripe test pages
β”‚   β”‚   β”‚   β”œβ”€β”€ test-subscription/ # Subscription test
β”‚   β”‚   β”‚   └── test-email/    # Email testing
β”‚   β”‚   └── api/               # API routes
β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ auth/             # Authentication components
β”‚   β”‚   └── dashboard/        # Dashboard components
β”‚   β”œβ”€β”€ lib/                  # Utility libraries
β”‚   β”œβ”€β”€ hooks/                # Custom React hooks
β”‚   β”œβ”€β”€ stores/               # Zustand stores
β”‚   β”œβ”€β”€ types/                # TypeScript definitions
β”‚   β”œβ”€β”€ validations/          # Zod schemas
β”‚   └── locales/              # Translation files
β”œβ”€β”€ public/                   # Static assets
β”œβ”€β”€ tests/                    # Test files
β”œβ”€β”€ .storybook/              # Storybook configuration
└── docs/                    # Documentation

🎯 Available Scripts

| Script | Description | |--------|-------------| | npm run dev | Start development server with Turbo | | npm run build | Build for production | | npm run start | Start production server | | npm run lint | Run ESLint | | npm run lint:fix | Fix ESLint errors | | npm run test | Run unit tests with Vitest | | npm run test:e2e | Run E2E tests with Playwright | | npm run storybook | Start Storybook development | | npm run generate:component | Generate new component | | npm run build-stats | Build with bundle analysis |

🌍 Internationalization

Built-in i18n support with next-intl:

  • Multiple Languages - English, French, and more
  • Locale-based Routing - /en/, /fr/ paths
  • Dynamic Translations - Server and client components
  • SEO-friendly - Proper meta tags per locale

πŸ§ͺ Testing Strategy

Comprehensive testing setup:

Unit Testing (Vitest)

npm run test
# Fast unit tests with React Testing Library

E2E Testing (Playwright)

npm run test:e2e
# End-to-end testing across browsers

Component Testing (Storybook)

npm run storybook
# Visual component development and testing

πŸ”§ Configuration Examples

Environment Variables

The CLI automatically generates .env.example with the right variables for your selected modules:

# Authentication (NextAuth.js)
NEXTAUTH_SECRET=your-secret-here
NEXTAUTH_URL=http://localhost:3000

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key

# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...

# Email (Nodemailer)
SMTP_HOST="smtp_...

# Mongoose (MongoDB)
MONGODB_URI="mongodb://localhost:27017/nextjs-app"

πŸš€ Production Deployment

Vercel (Recommended)

# Deploy to Vercel
npx vercel

# Set environment variables in Vercel dashboard

Docker

# Build Docker image
docker build -t my-app .

# Run container
docker run -p 3000:3000 my-app

Other Platforms

  • Netlify - Static site generation
  • Railway - Full-stack deployment
  • AWS - Container deployment
  • DigitalOcean - App Platform

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

πŸ‘₯ Developers

Meet the team behind nextjs-boilerplate-kit:

πŸ™ Acknowledgments

  • Next.js Team - For the amazing framework
  • Vercel - For hosting and deployment
  • shadcn/ui - For beautiful components
  • Radix UI - For accessible primitives
  • Tailwind CSS - For utility-first styling

πŸ’œ Made with β™₯ by CodeHuddle
πŸš€ Happy coding β€’ Join our amazing community!

⭐ Star us on GitHub β€’ πŸ“¦ NPM Package β€’ 🌐 Code Huddle