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

isam-nestjs-starter-cli

v1.0.2

Published

πŸš€ Generate production-ready NestJS applications with authentication, database integration, email service, and complete module generation

Readme

Isam NestJS Starter CLI

πŸš€ A powerful CLI tool to generate production-ready NestJS applications with authentication, database integration, email service, and complete module generation.

npm version License: MIT

✨ Features

  • πŸ” JWT Authentication - Complete auth system with email verification
  • πŸ“§ Email Service - SMTP integration with HTML templates
  • πŸ—„οΈ Multi-Database Support - PostgreSQL, MySQL, SQLite, MongoDB
  • πŸ—οΈ Module Generator - Generate complete CRUD modules instantly
  • πŸ”’ Security First - Built-in guards, permissions, and validation
  • πŸ“š TypeScript - Full TypeScript support with strict mode
  • 🐳 Docker Ready - Includes Dockerfile and docker-compose
  • πŸ“– Comprehensive Docs - Detailed documentation and examples

πŸš€ Quick Start

Installation

npm install -g isam-nestjs-starter-cli

Create Your First Project

# Create project with authentication and email
isam-nestjs-starter create my-app --auth --database postgres --email

# Navigate to project
cd my-app

# Install dependencies
npm install

# Start development server
npm run start:dev

Generate Modules

# Generate a complete CRUD module
isam-nestjs-starter generate module products

πŸ“‹ Commands

Create Project

isam-nestjs-starter create <project-name> [options]

Options:

  • --auth - Include authentication module
  • --database <type> - Database type (postgres, mysql, sqlite, mongodb)
  • --email - Include email service
  • --upload - Include file upload module

Examples:

# Full-featured project
isam-nestjs-starter create ecommerce-api --auth --database postgres --email --upload

# Minimal project
isam-nestjs-starter create simple-api --database sqlite

# Interactive mode (prompts for options)
isam-nestjs-starter create my-project

Generate Module

isam-nestjs-starter generate module <module-name>

Generates:

  • Controller with CRUD endpoints
  • Service with business logic
  • Entity with TypeORM decorators
  • Repository for database operations
  • DTOs with validation
  • Permissions for access control
  • Audit middleware

πŸ—οΈ Generated Project Structure

my-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ common/           # Shared utilities and decorators
β”‚   β”œβ”€β”€ config/           # Configuration files
β”‚   β”œβ”€β”€ modules/
β”‚   β”‚   β”œβ”€β”€ auth/         # Authentication module
β”‚   β”‚   β”œβ”€β”€ email/        # Email service
β”‚   β”‚   └── users/        # User management
β”‚   β”œβ”€β”€ app.module.ts
β”‚   └── main.ts
β”œβ”€β”€ .env.example
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
└── package.json

πŸ” Authentication Features

  • User Registration with email verification
  • JWT Token authentication
  • Password Reset via email
  • Email Verification system
  • Role-based access control
  • Permissions system

API Endpoints

POST /auth/register      # User registration
POST /auth/login         # User login
POST /auth/verify-email  # Email verification
POST /auth/forgot-password # Password reset request
POST /auth/reset-password  # Password reset

πŸ“§ Email Service

Built-in email service with:

  • SMTP Configuration for multiple providers
  • HTML Templates with variable substitution
  • Email Verification templates
  • Password Reset templates
  • Welcome Email templates

Configuration

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASS=your-app-password
[email protected]

πŸ—„οΈ Database Support

Supported Databases

  • PostgreSQL (recommended)
  • MySQL
  • SQLite (for development)
  • MongoDB

Configuration Example

DB_TYPE=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=your_username
DB_PASSWORD=your_password
DB_DATABASE=your_database

πŸ—οΈ Module Generation

Generate complete modules with a single command:

isam-nestjs-starter generate module products

Creates:

src/modules/products/
β”œβ”€β”€ controllers/products.controller.ts    # CRUD endpoints
β”œβ”€β”€ services/products.service.ts          # Business logic
β”œβ”€β”€ entities/product.entity.ts            # Database entity
β”œβ”€β”€ repositories/products.repository.ts   # Data access
β”œβ”€β”€ dto/                                  # Data transfer objects
β”œβ”€β”€ permissions/products.permissions.ts   # Access control
└── middlewares/products-audit.middleware.ts # Logging

πŸ”’ Security Features

  • JWT Authentication with configurable expiration
  • Password Hashing with bcrypt
  • Input Validation with class-validator
  • CORS Configuration
  • Rate Limiting ready
  • Security Headers with Helmet
  • SQL Injection protection via TypeORM

🐳 Docker Support

Generated projects include:

Dockerfile:

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "start:prod"]

docker-compose.yml:

version: '3.8'
services:
  app:
    build: .
    ports:
      - "3000:3000"
  postgres:
    image: postgres:15
    environment:
      POSTGRES_DB: myapp

πŸ“š Documentation

Comprehensive documentation is available at:

πŸ“– Full Documentation

Or browse individual sections:

πŸš€ Deployment

Production Build

npm run build
npm run start:prod

Docker Deployment

docker build -t my-app .
docker run -p 3000:3000 my-app

Cloud Deployment

Supports deployment to:

  • AWS Elastic Beanstalk
  • Heroku
  • DigitalOcean App Platform
  • Google Cloud Run

🀝 Contributing

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

Development Setup

git clone https://github.com/isamch/nestjs-starter-cli.git
cd nestjs-starter-cli
npm install
npm link

πŸ“„ License

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

πŸ†˜ Support

🎯 Examples

E-commerce API

isam-nestjs-starter create ecommerce-api --auth --database postgres --email
cd ecommerce-api
isam-nestjs-starter generate module products
isam-nestjs-starter generate module orders
isam-nestjs-starter generate module categories

Blog API

isam-nestjs-starter create blog-api --auth --database postgres --email
cd blog-api
isam-nestjs-starter generate module posts
isam-nestjs-starter generate module comments

Simple CRUD API

isam-nestjs-starter create simple-api --database sqlite
cd simple-api
isam-nestjs-starter generate module tasks

Made with ❀️ by Isam Chajia

Generate production-ready NestJS applications in seconds!