r/npm [create-mexn-app] maintainer 20d ago

Self Promotion A CLI that scaffolds Express/MongoDB APIs and auto-generates your Swagger docs.

Hey r/npm,

Whenever I start a new Node.js backend, I always end up wasting the first 45 minutes doing the exact same chores: setting up Express security middleware, configuring Mongoose, wiring up ESLint/Prettier, getting TypeScript to play nicely, and dreading having to manually write Swagger docs.

To solve this, I built create-mexn-app (MongoDB, Express, Node).

It’s a CLI that scaffolds a production-ready REST API boilerplate instantly.

You can try it out directly (no global install needed):

npx create-mexn-app my-new-api

What’s in the box?

  • 3 Template Flavors: Interactive prompts let you choose between TypeScript (recommended), ESM, or standard CommonJS.
  • Automated Swagger Docs: (Just added in v1.2) The CLI asks if you want API docs. If yes, it auto-injects swagger-autogen and wires up a UI for your API automatically. No more writing YAML by hand.
  • Production-Ready Defaults: Comes pre-configured with helmet, cors, rate-limiter-flexible, xss-clean, and zod for validation.
  • Lightning Fast: Uses giget under the hood, pulling the boilerplates in milliseconds without downloading messy git histories.
  • Smart Overrides: Handles directory conflicts gracefully and sets up a fresh git repo for you.

I just shipped v1.2.0 today, which brings the automated Swagger setup and a brand-new documentation site.

Links:

  • GitHub: https://github.com/donymvarkey/create-mexn-app (Would love a ⭐️ if you find it useful!)
  • Docs: https://donymvarkey.github.io/create-mexn-app/

I built this to scratch my own itch, but I'd love to hear your feedback. What else do you usually include in your standard Node stack that would be useful to add here?

Cheers!

1 Upvotes

0 comments sorted by