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

@bodhx/create-microservices-node-mongo

v1.0.0

Published

A CLI tool to scaffold a fully functional Node.js + MongoDB microservices architecture project

Readme

@bodhx/create-microservices-node-mongo

A CLI tool to scaffold a fully functional Node.js + MongoDB microservices architecture project in seconds – with optional integrations like JWT, Nodemailer, S3, Logger, and more!

✨ Features

  • Interactive CLI prompts to customize your setup
  • Scaffold multiple microservices with clean folder structures
  • Optional integrations: JWT auth, email (Nodemailer), S3, logging, and more
  • Auto-generate models, routes, controllers with full CRUD + pagination
  • Auto-connect services with internal service-to-service communication
  • Plug-and-play development setup with pre-configured scripts and dependencies

🚀 Getting Started

Run the CLI using:

npx @bodhx/create-microservices-node-mongo

🧠 CLI Flow

The CLI guides you through an interactive setup:

1. Basic Project Info

  • Project Name
  • Author Name
  • Project Description

2. Microservices Setup

  • Number of Microservices
  • Prompted:
    • Microservice 1 name
    • Microservice 2 name
    • ...and so on (based on entered number)

3. Feature Integrations (Optional)

For each microservice, you'll be asked:

  • Include JWT Authentication? (yes/no)
  • Include Nodemailer Service? (yes/no)
  • Include S3 Integration? (yes/no)
  • Include Logger Utility? (yes/no)
  • Include other common utilities? (yes/no)
    • (CORS, Helmet, Swagger, Rate Limiting, dotenv)

4. Port Configuration

You'll enter the Port Number for each microservice, in order.

5. Project Structure Options

Option 1: Generate Microservice Structure Only

  • Creates the full folder & file layout for each microservice
  • Adds service registry/connection logic
  • Generates package.json, scripts, Docker config (optional later), etc.

Option 2: Add Models, Routes, and Controllers Now

  • CLI asks:
    • How many models for service 1?
    • Model names (one by one)
    • Repeat for all services
  • Auto-generates:
    • Models (with default name field for now)
    • RESTful routes (GET, POST, PUT, DELETE)
    • Controllers with:
      • CRUD logic
      • Pagination support
      • Validation (basic)

📁 Folder Structure

Example (for 2 services):

my-microservices-project/
│
├── service-auth/
│   ├── models/
│   ├── routes/
│   ├── controllers/
│   ├── utils/
│   └── app.js
│
├── service-user/
│   ├── models/
│   ├── routes/
│   ├── controllers/
│   ├── utils/
│   └── app.js
│
├── shared/
│   └── logger.js
│
├── package.json
└── README.md

🧰 Tech Stack

  • Node.js (Express.js)
  • MongoDB (Mongoose)
  • JWT Authentication (optional)
  • Nodemailer (optional)
  • AWS S3 SDK (optional)
  • Winston or Morgan for logging (optional)
  • dotenv, helmet, cors, etc. (common utilities)

🔧 Scripts in package.json

"scripts": {
  "start": "node service-name/app.js",
  "dev": "nodemon service-name/app.js",
  "start:all": "concurrently \"nodemon service-1/app.js\" \"nodemon service-2/app.js\""
}

Will be auto-configured based on user input.

🔮 Future Enhancements

  • AI-powered field suggestion for models
  • Docker + Kubernetes setup scaffolding
  • Built-in Swagger docs per service
  • Service Discovery via Consul or NATS
  • Redis integration
  • CLI config save/restore templates