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

starter-backendkit

v1.3.2

Published

Scaffold a production-ready Node.js backend — choose Express + MongoDB or Express + PostgreSQL (raw SQL)

Readme

starter-backendkit

Scaffold a production-ready Node.js backend in seconds.

Usage

npx starter-backendkit my-app

or install globally:

npm i -g starter-backendkit
backendkit my-app

Pick a tech stack, and you get a ready-to-run project.

Stacks

Pick from four starter options:

  • Node.js + Express + MongoDB + React — Fullstack monorepo combining Express + MongoDB API with a Vite + React SPA styled with custom Vanilla CSS.
  • Node.js + Express + MongoDB — Backend only: REST API with Mongoose, JWT auth, Zod validation, and error middleware.
  • Node.js + Express + PostgreSQL + React — Fullstack monorepo combining Express + PostgreSQL API (raw SQL) with a Vite + React SPA styled with custom Vanilla CSS.
  • Node.js + Express + PostgreSQL — Backend only: REST API with raw pg client queries, JWT auth, Zod validation, and database init scripts.

What's inside the templates

Fullstack Stacks (+React)

my-app/
├── backend/            # Express REST API
├── frontend/           # Vite + React SPA (AuthContext, page router, Lucide icons, custom CSS)
├── package.json        # Root package coordinating installation and concurrent execution
└── README.md

Backend-Only Stacks

src/
├── app.js          # Express app entry
├── middleware/     # Auth, validation, and error handlers
├── utils/          # JWT tokens, connection layers
└── modules/        # Module folders containing auth, users, and posts routes/logic

After scaffolding

Backend-Only Stacks:

cd my-app
cp .env.example .env   # fill in your database & jwt secrets
npm install
npm run db:init        # PostgreSQL stack only — creates tables
npm run dev

Fullstack Stacks:

cd my-app
npm install            # installs root dependencies, frontend, and backend packages
cp backend/.env.example backend/.env # fill in secrets
npm run db:init --prefix backend     # PostgreSQL stack only — creates tables
npm run dev            # launches both client and server concurrently

🛠️ Developer Guide (Contributing)

If you are developing this CLI tool or want to add/edit the tech stack templates, here is what you need to know:

1. Project Folder Structure

  • bin/cli.js: The CLI script entry point. It uses @clack/prompts to guide the user, resolves output paths, copies the selected template, and updates the generated project's package.json.
  • templates/: Contains the project boilerplates:
    • node-mongo/: Express + MongoDB boilerplate template.
    • node-postgres/: Express + PostgreSQL boilerplate template.

2. Important: .gitignore Renaming Caveat

NPM automatically ignores and removes any files named .gitignore during the publishing process.

  • Rule: Always rename .gitignore to gitignore (no leading dot) inside your template folders under templates/.
  • The CLI script (bin/cli.js) automatically renames it back to .gitignore when scaffolding the user's project.

3. Local Development & Testing

To test your changes locally:

  1. Navigate to the starter-backendkit folder.
  2. Link the package globally on your system:
    npm link
  3. Now, you can test the CLI command anywhere on your machine:
    backendkit my-test-app
  4. Once you are done testing, unlink the package:
    npm unlink -g starter-backendkit

4. Adding a New Tech Stack Template

  1. Place your new boilerplate template in the templates/ folder (e.g. templates/node-mysql). Ensure any .gitignore file inside is named gitignore.
  2. Open bin/cli.js and add your new stack to the STACKS array:
    const STACKS = [
      { value: 'node-mongo', label: 'Node.js + Express + MongoDB' },
      { value: 'node-postgres', label: 'Node.js + Express + PostgreSQL (raw SQL)' },
      { value: 'node-mysql', label: 'Node.js + Express + MySQL' }, // Example
    ];
  3. Add the next steps/commands for your new stack in the NEXT_STEPS object in bin/cli.js so they print properly at the end.

5. Publishing Changes to NPM

  1. Make sure your local tests pass.
  2. Increment the version number in package.json (e.g., from 1.2.1 to 1.2.2 or 1.3.0).
  3. Publish the package:
    npm login
    npm publish

License

MIT