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

@iesparag/create-backend

v1.0.0

Published

One-command scaffold for a Node.js + Express + MongoDB + Socket.io backend (ESM, MVC).

Readme

create-backend

A small CLI I use to spin up new Node.js backends without copy-pasting the same boilerplate every time. Run one command, get a working Express + MongoDB + Socket.io API with the folder structure, middlewares and auth already in place.

Since I only use it for backends, the generated folder gets a -backend suffix by default (my-api becomes my-api-backend). Use --no-suffix if you don't want that.

Stack: Node.js (ESM), Express, Mongoose, Socket.io, JWT, Zod.

Usage

Three ways to run it depending on whether it's published / installed:

# via npx (once published, nothing to install)
npx @iesparag/create-backend my-api

# installed globally (or `npm link` from source)
npm i -g @iesparag/create-backend
create-backend my-api

# straight from source, no install
node bin/create.js my-api

All of them create ./my-api-backend. Then:

cd my-api-backend
cp .env.example .env      # set MONGODB_URI and JWT_SECRET
npm install
npm run dev               # http://localhost:5000

Flags: --no-suffix, -h/--help, -v/--version. If you don't pass a name it asks for one.

Publishing

Published under a scoped name (@iesparag/create-backend) since the plain create-backend was already taken on the registry. Scoped packages are private by default, so the first publish needs --access public:

npm login
npm pack --dry-run     # sanity check what gets shipped
npm publish --access public

To test the "no global install" path without publishing: npm pack, then in some other project npm i ./create-backend-1.0.0.tgz.

What the generated project looks like

src/
├── config/            env validation (zod) + mongoose connection
├── controllers/       request/response only, no business logic
├── services/          business logic
├── models/            mongoose schemas (User with auth built in)
├── routes/            /api/v1 routes + an aggregator
├── middlewares/       error, 404, auth + authorize, validate, rate limit
├── validations/       zod schemas per resource
├── sockets/           socket.io server + example handlers
├── utils/             ApiError, ApiResponse, asyncHandler, logger
├── app.js             express app + middleware pipeline
└── server.js          http + socket + db connect + graceful shutdown

It ships with working User register/login/me endpoints and a small Socket.io demo (ping with ack, join room, broadcast). To add a new feature I just follow the same four files: model, service, controller, route, then mount it in routes/index.js.

Notes

  • bin/create.js is the generator. No dependencies, just Node built-ins.
  • template/ is what gets copied. The gitignore lives there as gitignore (without the dot) because npm strips dotfiles on publish; the generator writes it back out as .gitignore when scaffolding.
  • Other starter kits can live next to this one under starter-kits/.