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

@madhusha_99/exp-gen

v1.4.0

Published

This is a very simple and small generator for creating Express.js projects with TypeScript or Javascript. You can use it to quickly start a new API project.

Readme

exp-gen 🚀

NPM version

exp-gen a lightning-fast, interactive CLI tool designed to scaffold Express.js REST APIs in seconds.

Whether you're starting a project with TypeScript or JavaScript, exp-gen generates a clean layered architecture, configures your preferred database boilerplate so you can start coding immediately, and now includes a built-in web-based Regex Simulator to help you build and debug regular expressions visually.


✨ Features

  • 🚀 Interactive CLI powered by @clack/prompts
  • ⚡ Scaffold Express.js APIs in seconds
  • 🟦 TypeScript support
  • 🟨 JavaScript support
  • 🗂 Professional layered architecture
  • 🍃 MongoDB (Mongoose)
  • 🐬 MySQL
  • 🪶 SQLite
  • 🐘 PostgreSQL (JavaScript projects)
  • 📦 Optional automatic dependency installation
  • 🔬 Built-in Regex Simulator
  • 🌐 Opens automatically in your browser
  • 🎨 Modern developer-friendly UI
  • 📖 Live regex explanation & validation

🚀 Installation

Install globally using npm:

npm install -g @madhusha_99/exp-gen

🚀 Usage

After installation you can launch the CLI using any of the following commands:

exp

or

gen

or

express-draft

When the CLI starts you'll be greeted with an interactive menu.

🚀 Scaffold a new Express API

🔬 Run Regex Simulator

🚀 Scaffold Express API

Choose Scaffold a new Express API and answer a few questions.

The CLI will ask for:

  • Project name
  • Language
  • Database
  • Install dependencies

Supported languages

  • TypeScript (Recommended for type safety) – Currently available with MongoDB (Mongoose) and No Database templates. More database integrations will be added in future releases.
  • JavaScript – Full template support for all currently available databases, including MongoDB (Mongoose), MySQL (mysql2), SQLite (sqlite3), PostgreSQL (pg), and No Database.

🗄️ Supported Databases

| Database | JavaScript | TypeScript | Driver / ORM | Status | | ------------------- | :--------: | :--------: | ------------ | :-----: | | MongoDB | ✅ | ✅ | Mongoose | Stable | | MySQL | ✅ | ❌ | mysql2 | Stable | | SQLite | ✅ | ❌ | sqlite3 | Stable | | PostgreSQL | ✅ | ❌ | pg | Stable | | None (No Database) | ✅ | ✅ | — | Stable | | Prisma (MongoDB) | 🚧 | 🚧 | Prisma ORM | Planned | | Prisma (MySQL) | 🚧 | 🚧 | Prisma ORM | Planned | | Prisma (PostgreSQL) | 🚧 | 🚧 | Prisma ORM | Planned | | Prisma (SQLite) | 🚧 | 🚧 | Prisma ORM | Planned |

Preview

Scaffold Express API Demo


📁 Project Structure

  • configs/: Environment variables and database connection logic.
  • controllers/: Bridges the routes and the business logic; handles requests/responses.
  • dtos/: Data Transfer Objects for validating and shaping incoming data.
  • interfaces/: TypeScript interfaces and types for strict type safety.
  • middlewares/: Custom Express middlewares (Auth, Error handling, Logging).
  • models/: Database schemas (e.g., Mongoose/MongoDB models).
  • repositories/: The data access layer; handles direct database operations.
  • routes/: API endpoint definitions and mapping to controllers.
  • services/: Core Business Logic layer; where the heavy lifting happens.
  • utils/: Shared helper functions and utility classes.
  • app.ts: The application entry point.

The generated architecture follows a clean layered design making projects easier to maintain and scale.


🔬 Regex Simulator

Starting from v1.4.0, exp-gen includes a fully interactive Regex Simulator.

Simply choose:

🔬 Run Regex Simulator

The CLI automatically starts a lightweight local server and opens the Regex Simulator in your default web browser.

No additional dependencies are required. The simulator is built into exp-gen and runs entirely on your local machine.

Preview

Regex Simulator Demo

Regex Simulator Web


Features in Regex Simulator

  • ⚡ Live regex matching
  • 📖 Regex rule explanations
  • 🎯 Capture group visualization
  • 🔍 Match position detection
  • 🚨 Friendly validation errors
  • 🧠 Beginner-friendly regex guidance
  • 🏷 Regex flag helper
  • 🌙 Modern dark developer UI
  • 🌐 Runs completely locally

Example

(?<name>\w+)-(\d+)

Input:

hello-123
world-456
invalid-value

Output:

✓ Match 1
hello-123

Group 1:
hello

Group 2:
123

The simulator also explains regex tokens such as:

| Token | Description | | ----------- | ------------------- | | \d | Digit | | \w | Word character | | . | Any character | | + | One or more | | * | Zero or more | | ? | Optional | | ^ | Start of input | | $ | End of input | | () | Capture group | | (?<name>) | Named capture group |


🚀 Example Workflow

exp
✔ What would you like to do?

❯ 🚀 Scaffold a new Express API
  🔬 Run Regex Simulator

or

✔ What would you like to do?

  🚀 Scaffold a new Express API
❯ 🔬 Run Regex Simulator

📦 After Scaffolding

Navigate into your project

cd my-project

If dependencies were installed

npm run dev

Otherwise

npm install
npm run dev

🤝 Contributing

We love open source! exp-gen is a community-driven project, and we welcome contributions to make it better.

You can help by:

  • Adding new database templates
  • Improving generated project templates
  • Improving the Regex Simulator
  • Reporting bugs
  • Suggesting new CLI features

Clone the project

git clone https://github.com/Open-Core-Lab/exp-gen.git

Install dependencies

npm install

Run locally

npm run dev

📋 Roadmap

Upcoming features include:

  • Prisma support
  • Docker template generation
  • JWT Authentication template
  • Swagger/OpenAPI generation
  • Testing templates (Vitest/Jest)
  • Redis integration
  • Prisma PostgreSQL template
  • Environment profile generator
  • More Regex Simulator utilities

⭐ Support

If you enjoy using exp-gen, consider giving the repository a ⭐ on GitHub.

It helps the project grow and supports future development.

Repository: exp-gen


📄 License

This project is licensed under the MIT License.

Happy coding! 🚀

Maintained with ❤️ by Madhusha Prasad