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

create-express-starter-kit

v1.0.3

Published

CLI to scaffold production-ready Express backends with auth, DB, caching, validation, and Docker support.

Downloads

764

Readme

create-express-starter-kit

A powerful CLI tool that interactively scaffolds a production-ready Express.js backend. By answering a few quick questions, it generates a robust, modular, and fully configured codebase tailored to your specific stack requirements.

📦 Usage

You can generate your project in an empty directory without installing the package globally. Run one of the following commands:

pnpm dlx create-express-starter-kit

OR

npx create-express-starter-kit

✨ Features & Available Integrations

The CLI prompts you with several configuration choices to automatically wire up your project dependencies, middleware, and project structure:

  • Package Manager 📦:
    • npm
    • pnpm
    • yarn
  • Authentication 🔐:
    • None
    • Custom JWT-based Auth (with Access & Refresh Tokens, bcrypt, and cookies)
    • Clerk Auth Support
  • Database 🗄️:
    • MongoDB (via Mongoose)
    • PostgreSQL (via Prisma ORM - automatically initializes schemas)
    • None
  • In-Memory Cache / DB ⚡:
    • Redis (via ioredis)
    • Valkey
    • None
  • Validation 🛡️:
    • Zod (generates validation middlewares and example schemas)
    • None
  • File Uploads ☁️:
    • Multer + Cloudinary
    • Multer + AWS S3
    • None
  • Docker 🐳:
    • Automatically generates a docker-compose.yml for your selected databases so you can start them with one click (includes MongoDB, Postgres, pgAdmin, Redis Stack, and Valkey configurations).

Base Folder Structure

When the setup begins, the CLI scaffolding lays down a lean, base Express app using domain-driven design:

.
├── controllers/
│   └── example.controller.js
├── middlewares/
│   └── example.middleware.js
├── public/
├── routers/
│   └── example.route.js
├── utils/
│   ├── ApiError.js
│   ├── ApiResponse.js
│   └── asyncHandler.js
├── app.js
└── index.js

🔄 How Selections Modify the Codebase

Based on your exact selections, files are cleanly swapped or generated so you are never left with useless "dead code":

Custom JWT Auth Replaces example files with full Register/Login/Logout/Refresh token functionality.

.
├── controllers/
│   └── user.controller.js
├── middlewares/
│   └── auth.middleware.js
├── routers/
│   └── user.route.js
├── app.js          (updated)
└── index.js        (updated)

Clerk Auth Rewrites app.js to mount Clerk's strict express middleware.

.
└── app.js          (updated with @clerk/express)

Database (MongoDB/Mongoose) Adds database connection and relevant model schemas.

.
├── models/
│   └── user.model.js  (or example.model.js)
└── utils/
    └── connectDB.js

Database (PostgreSQL/Prisma) Initializes Prisma schema and singleton database clients.

.
├── prisma/
│   └── schema.prisma
└── utils/
    ├── connectDB.js
    └── prismaClient.js

Validation (Zod) Injects validation middleware and Zod schema definitions.

.
├── middlewares/
│   └── validate.middleware.js
└── schemas/
    └── user.schema.js

In-Memory Cache (Redis / Valkey) Drops a configured client instance strictly for the chosen service.

.
└── utils/
    └── redis.js       (or valkey.js)

File Uploads (Cloudinary / AWS S3) Generates local disk storage middleware and dedicated SDK upload service.

.
├── middlewares/
│   └── multer.middleware.js
└── utils/
    └── cloudinary.js  (or uploadS3.js)

Docker Writes a custom compose file defining services uniquely based on databases/caches opted into.

.
└── docker-compose.yml

🛠️ What it Does Under the Hood

  1. Initializes the Project: Creates your package.json configured with ESM (type: "module") and sets up a dev script using node --watch.
  2. Installs Dependencies: Dynamically installs only the packages you need (e.g., express, cors, zod, mongoose, prisma, multer, etc.) using your chosen package manager (npm, pnpm, or yarn).
  3. Scaffolds Structure: Sets up a clean domain-driven directory structure including controllers/, routers/, models/, middlewares/, utils/, and error-handling utilities like ApiError and ApiResponse.
  4. Writes Boilerplate: Injects full, ready-to-use boilerplate code (e.g., fully-functional JWT Login/Register/Refresh flows, Prisma connections, Zod error validators) based on your exact technology stack.
  5. Generates Environment Variables: Appends the necessary secrets, Database URIs, and config keys directly into a .env file so you know exactly what is required.

🚀 Getting Started

Once the CLI finishes running:

  1. Open the .env file and fill in your missing credentials (like DB connection strings, JWT secrets, Cloudinary/AWS keys).
  2. Start up your Docker containers (if generated):
    docker-compose up -d
  3. Run the development server:
    npm run dev

📄 License

MIT