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-types-backend

v1.1.19

Published

A CLI tool to quickly setup an Express.js backend in TypeScript, using essential configurations and user's preferences.

Readme

🚀 TypeScript-Express Backend Setup CLI

A CLI tool to quickly setup an Express.js backend in TypeScript, using essential configurations and user's preferences.

⚡ Installation

You can directly run the CLI (using npx) or install globally (using npm install -g) :

# Run directly using npx
npx create-types-backend@latest

# OR Install globally (optional)
npm install -g create-types-backend

📦 Features

Generates a well-structured Express-TypeScript backend
Supports automatic setup using -y flag
Includes Express.js, Typescript, DotEnv and essential configurations
Sets up tsx for hot-reloading while development
Resolves default import alias by mapping src -> @

⚙️ Optional support for:

- Custom Error Handler + Try-Catch Wrapper
- CORS
- MongoDB (with Mongoose)
- JWT, bcrypt, cookie-parser
- Multer
- Cloudinary
- ES-Lint
- Prettier
- Docker (with separate Development and Production configurations)
- Git

🚀 Usage

➡️ Creating a new project

npx create-types-backend  : Manual setup with flexibility to choose required configurations.

OR

npx create-types-backend  -y : Run in default mode with all preferences set to 'DEFAULT' values.

OR

npx create-types-backend  myapp : Enter project name through CLI argument

➡️ Starting the Development Server

Just follow these 3 steps:

-   cd into the newly created backend directory
-   add your MONGODB_URI in .env file (if using MongoDB)
-   npm run dev OR npm run docker:dev (if using docker)

🛠️ Project Structure

myapp/
│── src/
    ├── config/                     # Configuration files (e.g., database)
       	├──db.ts		            # MongoDB connection setup
       	├──multer.ts	            # Multer setup
    ├── constants/                  # Constant values
        ├──cookie-options.ts	    # Cookie options for JWT
    ├── controllers/                # Route handlers
       	├──user.ts	                # Example controller
    ├── helpers/                    # Helper functions
    ├── middlewares/                # Express middlewares
       	├──errorHandler.ts	        # Custom error handler
    ├── models/                     # Mongoose models
       	├──user.ts	                # Example mongoose model
    ├── routes/                     # API routes
       	├──user.ts	                # Example route
    ├── types/                      # TypeScript types
       	├──file.d.ts	            # FileTypes definition (reqd for cloudinary)
       	├──user.d.ts	            # UserTypes definition (acc. to example mongoose schema)
    ├── utils/                      # Reusable utilities
       	├──cloudinary.ts	        # Cloudinary upload and delete controllers
        ├──generate-token.ts	    # Generate JWT token and set cookie
       	├──try-catch.ts	            # Try-Catch wrapper for async functions
    ├── app.ts                      # Main entry point of express app
│── .dockerignore                   # Docker ignore file
│── .env                            # Environment variables
│── .env.example                    # Example environment variables
│── .gitignore                      # Git ignore file
│── .prettierrc                     # Prettier configuration
│── Dockerfile.dev                  # Dockerfile for Development
│── Dockerfile                      # Dockerfile for Production
│── compose.dev.yaml                # Docker Compose file configured for Development
│── compose.prod.yaml               # Docker Compose file configured for Production
│── eslint.config.js                # ESLint configuration for code linting
│── package.json                    # Project metadata & dependencies
│── tsconfig.json                   # TypeScript configuration

🤝 Contributing

Want to improve this CLI? Feel free to fork the project, make changes, and submit a pull request (PR).

Steps to Contribute:

  1. Fork this repository.
  2. Clone your fork locally.
  3. Create a new branch for your feature/fix.
  4. Commit your changes and push them.
  5. Submit a pull request for review.

📜 License

This project is open-source and available under the ISC License.

👨‍💻 Author

Raghav Bhagat
🔗 GitHub: [https://github.com/rbhagat32]
🔗 NPM: [https://www.npmjs.com/~raghavbhagat32]
🔗 LinkedIn: [https://www.linkedin.com/in/rbhagat32]