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

node-student-scaffold

v1.0.0

Published

A tiny CLI that scaffolds a beginner-friendly Express + MongoDB starter API for students.

Readme

node-student-scaffold

A tiny CLI that scaffolds a beginner-friendly Express + MongoDB starter API for students.

Run it inside an empty (or existing) Git repository and it creates the whole project in the current directory — no nested project folder.

npx node-student-scaffold

What it creates

.
├── src/
│   ├── controllers/
│   │   └── user.controller.js
│   ├── models/
│   │   └── user.model.js
│   ├── routes/
│   │   └── user.routes.js
│   ├── config/
│   │   └── db.js
│   ├── app.js
│   └── server.js
├── .env.example
├── .gitignore
├── package.json
└── README.md
  • CommonJS (require) — no TypeScript, no bundlers, no framework magic.
  • A User CRUD example: GET /api/users, GET /api/users/:id, POST /api/users, PUT /api/users/:id, DELETE /api/users/:id plus GET /health.
  • MongoDB is optional. If MONGO_URI is set in .env it uses MongoDB (Mongoose); if not, the CRUD example still works using an in-memory array so students can learn without a database.

Package structure

node-student-scaffold/
├── bin/
│   └── cli.js          # the CLI entry point (declared in package.json "bin")
├── templates/          # the project files copied verbatim into the current dir
│   ├── src/
│   ├── .env.example
│   ├── .gitignore
│   ├── package.json
│   └── README.md
├── test/
│   └── cli.test.js     # smoke tests (node --test, zero dependencies)
├── package.json
└── README.md

How the CLI works

  1. npx node-student-scaffold runs bin/cli.js.
  2. It checks the current directory: if it already contains files (ignoring .git), it asks "This directory already contains files. Continue? (y/N)". Files are never silently overwritten — answer is anything but y/yes, it aborts.
  3. It copies everything from templates/ into process.cwd() using fs.cpSync (recursive: true). The .env.example, .gitignore, and src/… files land directly in the current directory — no nested folder.
  4. Any .env you already have is untouched (the templates never include a .env).

Test locally

npm install         # install dev tooling (none required for the CLI itself)
npm link            # make the `node-student-scaffold` command available globally
npm test            # run the smoke tests

# Then try it in a scratch folder:
mkdir /tmp/demo && cd /tmp/demo
node-student-scaffold       # or: npx node-student-scaffold
npm install
npm run dev         # visit http://localhost:3000/health

Publish to npm

npm version patch
npm publish        # requires an npm account + `npm login` first

After publishing, anyone runs npx node-student-scaffold in an empty repo to get the starter project.

Student workflow

git clone <my-github-repo>
cd <repo>

npx node-student-scaffold
npm install
npm run dev

Then open http://localhost:3000/health — and read the generated README.md for the API examples.

License

MIT