An Interactive Express.js API Generator

μž‘μ„±μž

μΉ΄ν…Œκ³ λ¦¬:

← ν”Όλ“œλ‘œ
DEV Community · Madhusha Prasad · 2026-07-13 개발(SW)

Madhusha Prasad

πŸš€ I Built exp-gen β€” An Interactive Express.js API Generator

After spending a lot of time creating the same Express.js project structure over and over again, I decided to automate the entire process.

Introducing exp-gen πŸŽ‰

A fast, interactive CLI that scaffolds production-ready Express.js APIs in seconds.

πŸŽ₯ Demo

Demo

✨ Features

βœ… Interactive CLI powered by @clack/prompts

βœ… Supports both TypeScript and JavaScript

βœ… Database selection during project creation

  • MongoDB (Mongoose)
  • MySQL
  • SQLite
  • PostgreSQL (JavaScript)
  • Prisma support coming soon

βœ… Generates a clean Layered Architecture

configs/
controllers/
dtos/
interfaces/
middlewares/
models/
repositories/
routes/
services/
utils/

Enter fullscreen mode Exit fullscreen mode

βœ… Optional automatic dependency installation

No more manually creating folders or copying boilerplate.

πŸ“¦ Installation

npm install -g @madhusha_99/exp-gen

Enter fullscreen mode Exit fullscreen mode

Run it anywhere:

exp

# or

gen

# or

express-draft

Enter fullscreen mode Exit fullscreen mode

πŸ–₯ Example

The CLI will ask you:

βœ” Project Name
βœ” TypeScript or JavaScript?
βœ” Select Database
βœ” Install dependencies?

Enter fullscreen mode Exit fullscreen mode

…and generates everything for you.

After that:

cd my-api
npm run dev

Enter fullscreen mode Exit fullscreen mode

You’re ready to start building.

πŸ— Generated Architecture

Instead of a flat Express project, exp-gen creates a scalable layered architecture.

  • Configurations
  • Controllers
  • DTOs
  • Interfaces
  • Models
  • Repositories
  • Services
  • Routes
  • Middlewares
  • Utilities

Perfect for medium and large backend projects.

🀝 Open Source Contributions Welcome

I’d love to grow this into a community project.

Contributions are welcome for:

  • Prisma template
  • PostgreSQL improvements
  • Better authentication templates
  • Docker support
  • Testing templates (Jest/Vitest)
  • CI/CD templates
  • New project templates

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

NPM:
https://www.npmjs.com/package/@madhusha_99/exp-gen

I’d really appreciate any feedback from the community.

  • What features would you like to see?
  • What templates should be added next?
  • Any suggestions to improve the developer experience?

If you find it useful, consider giving the repository a ⭐.

Happy coding! πŸš€

nodejs #expressjs #typescript #javascript #opensource #cli #npm #backend #webdev #developers #devcommunity

μ›λ¬Έμ—μ„œ 계속 β†—

μΆ”μΆœ λ³Έλ¬Έ Β· 좜처: dev.to Β· https://dev.to/madhushaprasad/an-interactive-expressjs-api-generator-4adk

μ½”λ©˜νŠΈ

λ‹΅κΈ€ 남기기

이메일 μ£Όμ†ŒλŠ” κ³΅κ°œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. ν•„μˆ˜ ν•„λ“œλŠ” *둜 ν‘œμ‹œλ©λ‹ˆλ‹€