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

js-mvc-app

v1.0.1

Published

A CLI tool to scaffold complete Node.js MVC projects with TypeScript, just like Laravel

Readme

Create Node MVC

A powerful CLI tool to scaffold complete Node.js MVC projects with multiple language and framework options, just like Laravel does.

🚀 Installation

npm install -g create-node-mvc

📋 Usage

create-node-mvc my-app

This will start an interactive prompt to configure your project:

Language Options

  • 🔷 TypeScript (Recommended) - Full type safety and modern features
  • 🟨 JavaScript - Classic Node.js with CommonJS modules

Framework Options

  • ⚡ Express.js - Simple & Fast traditional MVC framework
  • 🏗️ NestJS - Enterprise-grade framework with decorators and modules

Database Options

  • 🍃 MongoDB with Mongoose ODM
  • 🐬 MySQL with Sequelize/TypeORM
  • 🐘 PostgreSQL with Sequelize/TypeORM
  • 📱 SQLite with Sequelize/TypeORM

Project Types

  • 🌐 API Only - REST endpoints only
  • 🎨 Full MVC - With views and frontend assets
  • 📊 GraphQL API - GraphQL with Apollo (NestJS only)
  • 🔄 Microservices - Microservice architecture (NestJS only)

✨ Supported Combinations

| Language | Framework | Structure | Best For | | -------------- | ----------- | --------------- | ----------------------- | | TypeScript | Express | Traditional MVC | Full-stack web apps | | JavaScript | Express | Traditional MVC | Simple APIs & websites | | TypeScript | NestJS | Module-based | Enterprise applications | | JavaScript | NestJS | Module-based | Modern APIs |

🎯 Features

Core Features

  • Multiple languages: TypeScript & JavaScript support
  • Multiple frameworks: Express.js & NestJS architectures
  • Authentication: JWT tokens with bcrypt password hashing
  • Database flexibility: MongoDB, MySQL, PostgreSQL, SQLite
  • Validation: Joi (Express) or class-validator (NestJS)
  • Error handling: Comprehensive error middleware and logging
  • Security: Helmet, CORS, rate limiting built-in

Optional Extras

  • 🐳 Docker - Complete containerization setup
  • 🔍 ESLint & Prettier - Code formatting and linting
  • 🧪 Jest Testing - Unit and integration test setup
  • 🪝 Git Hooks - Husky pre-commit hooks
  • 📚 API Documentation - Swagger/OpenAPI (NestJS)

📂 Generated Project Structures

Express.js Structure (Traditional MVC)

my-app/
├── src/
│   ├── config/           # Database and app configuration
│   ├── controllers/      # Route controllers
│   ├── models/          # Database models
│   ├── routes/          # Express routes
│   ├── middlewares/     # Custom middlewares
│   ├── utils/           # Utilities (TypeScript)
│   ├── validators/      # Joi validators (JavaScript)
│   └── app.ts/js        # Express application
├── tests/ (optional)
├── .env.example
├── tsconfig.json (TypeScript only)
└── package.json

NestJS Structure (Module-based)

my-app/
├── src/
│   ├── auth/            # Authentication module
│   │   ├── dto/         # Data transfer objects
│   │   ├── guards/      # Auth guards
│   │   ├── strategies/  # Passport strategies
│   │   ├── auth.controller.ts
│   │   ├── auth.service.ts
│   │   └── auth.module.ts
│   ├── users/           # Users module
│   │   ├── dto/         # User DTOs
│   │   ├── entities/    # User entities
│   │   ├── users.controller.ts
│   │   ├── users.service.ts
│   │   └── users.module.ts
│   ├── config/          # Configuration
│   ├── app.module.ts    # Root module
│   └── main.ts/js       # NestJS bootstrap
├── test/ (optional)
├── tsconfig.json (TypeScript only)
└── package.json

🚀 Quick Start Examples

Create a TypeScript Express API

create-node-mvc my-api
# Select: TypeScript → Express → MongoDB → API Only
cd my-api
npm install
npm run dev

Create a NestJS Enterprise App

create-node-mvc my-enterprise-app
# Select: TypeScript → NestJS → PostgreSQL → API Only → Docker + Testing
cd my-enterprise-app
npm install
npm run start:dev

Create a Simple JavaScript API

create-node-mvc my-simple-api
# Select: JavaScript → Express → MongoDB → API Only
cd my-simple-api
npm install
npm start

📖 Available Scripts

After generating your project, you can use these commands:

Express.js Projects

npm start          # Start production server
npm run dev        # Start development server with nodemon/ts-node
npm run build      # Compile TypeScript (TypeScript only)
npm test           # Run tests (if testing enabled)
npm run lint       # Run ESLint (if linting enabled)

NestJS Projects

npm run start          # Start production server
npm run start:dev      # Start development server with watch
npm run start:debug    # Start with debugging
npm run build          # Build the application
npm run test           # Run unit tests
npm run test:e2e       # Run end-to-end tests

🎛️ Configuration

Environment Variables

Your generated project includes a .env.example file. Copy it to .env and configure:

# Database
DATABASE_URL=mongodb://localhost:27017/your-app
# or for SQL databases
DATABASE_URL=postgresql://user:password@localhost:5432/your-app

# JWT
JWT_SECRET=your-super-secret-jwt-key

# Server
PORT=3000
NODE_ENV=development

# CORS (optional)
CORS_ORIGIN=http://localhost:3000

Database Setup

  • MongoDB: Ensure MongoDB is running locally or provide a connection string
  • PostgreSQL/MySQL: Create a database and provide connection details
  • SQLite: Database file will be created automatically

🔧 Customization

Adding New Routes (Express)

// src/routes/example.ts
import { Router } from "express";
const router = Router();

router.get("/", (req, res) => {
  res.json({ message: "Hello World" });
});

export default router;

Adding New Modules (NestJS)

# Generate new module
nest g module products
nest g controller products
nest g service products

🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

📄 Development

To work on this CLI tool:

git clone https://github.com/your-username/create-node-mvc.git
cd create-node-mvc
npm install
npm run dev

🆚 Comparison with Other Tools

| Feature | create-node-mvc | create-next-app | @nestjs/cli | | ------------------- | ------------------- | --------------- | --------------- | | Multiple Languages | ✅ TS & JS | ❌ TS only | ❌ TS only | | Multiple Frameworks | ✅ Express & NestJS | ❌ Next only | ❌ NestJS only | | Database Support | ✅ 4 databases | ❌ None | ❌ Manual setup | | Authentication | ✅ Built-in JWT | ❌ Manual | ❌ Manual | | Docker Setup | ✅ Optional | ❌ Manual | ❌ Manual | | Testing Setup | ✅ Pre-configured | ❌ Manual | ✅ Basic |

📋 Roadmap

  • [ ] React/Vue frontend integration
  • [ ] GraphQL support for Express
  • [ ] Prisma ORM support
  • [ ] WebSocket support
  • [ ] Microservices templates
  • [ ] CI/CD pipeline templates

🏆 License

MIT © [Zebix]


Made with ❤️ for the Node.js community

Like Laravel's Artisan for Node.js 🚀