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-node-express-modular

v1.0.6

Published

A production-ready, modular, and reusable Node.js Express starter package.

Readme

Create Node Express Modular Starter

A CLI tool to generate a production-ready, modular, and reusable Node.js Express starter project for building scalable backend and SaaS applications.

Built with TypeScript, Clean Architecture, and industry best practices.


🚀 Quick Start

Generate a new project in seconds using npx:

npx create-node-express-modular my-app

🚀 Features

  • Modular Architecture
    Feature-based modules (Controller, Service, Model, Validation, Interface, Routes).

  • Authentication & Authorization
    Secure JWT-based auth (Access & Refresh Tokens) with role-based access control.

  • Strict Validation
    End-to-end request validation using Zod (body, query, params).

  • Centralized Error Handling
    Global error handler for Zod, Mongoose, and custom App errors.

  • Security First
    Helmet, Rate Limiting, CORS configuration, and secure cookies.

  • Database Best Practices
    Mongoose with clean schema design, indexing, and connection handling.

  • File Upload Support
    Multer + Cloudinary integration for secure media uploads.

  • Logging
    Production-ready logging using Winston.

  • Email & OTP Utilities
    Built-in helpers for email sending and OTP workflows.

  • Great Developer Experience
    ESLint, Prettier, TypeScript types, and clean project structure.


📂 Project Structure

src/
├── config/             # Environment configuration (Zod validated)
├── errors/             # Custom error classes & handlers
├── interface/          # Shared interfaces & types
├── middlewares/        # Auth, validation, error handlers
├── modules/            # Feature modules (Auth, User, etc.)
│   ├── auth/
│   └── user/
├── routes/             # Centralized router
├── utils/              # Shared utilities (JWT, Logger, Mail, etc.)
├── app.ts              # Express app setup
└── server.ts           # Entry point

🛠️ Getting Started (Generated Project)

After running the npx command, follow these steps inside your new project folder:

  1. Install dependencies:

    npm install
  2. Set up Environment Variables: Copy .env.example to .env and fill in the required values.

    cp .env.example .env

    [!NOTE] Make sure to configure MONGO_URI, ACCESS_TOKEN_SECRET, and REFRESH_TOKEN_SECRET.

  3. Run the server:

    npm run dev

📜 Scripts

  • npm run dev: Start development server with hot-reload.
  • npm run build: Compile TypeScript to JavaScript.
  • npm start: Start the production server (after build).
  • npm run lint: Run ESLint.
  • npm run lint:fix: Fix linting errors.
  • npm run format: Format code with Prettier.

🤝 Contributing

Contributions are welcome! If you want to contribute to the CLI tool itself:

  1. Clone the repository.
  2. Install dependencies: npm install.
  3. Use npm link to test the CLI locally.
  4. Submit a pull request.

📄 License

This project is licensed under the ISC License.