Express · TypeScript · OpenAPI

Scaffold production Express APIs in one command. 

create-express-modular generates a modular TypeScript backend with your ORM, validator, JWT auth and Docker — guarded by an opinionated architecture from day one.

bash
npm install -g create-express-modular
cem my-api
~/taskflow-api
  ──────────────────────────────────────────────────────
  [CEM]  taskflow-api  dev server

  ◆  Project   taskflow-api
  ◆  Entry     src/server.ts
  ◆  Started   01 June 2026 21:20:00
  ──────────────────────────────────────────────────────

 ▲ Server running on http://localhost:5000 21:20:01
 ◈ MongoDB connected
◆OpenAPI 3.0◆Mongoose · Prisma · Drizzle◆Zod · Joi◆JWT + bcrypt◆npm · yarn · pnpm · bun◆Docker◆ESLint v10◆Architecture guards◆HTTP compression◆Connection pooling◆AGENTS.md · CLAUDE.md◆OpenAPI 3.0◆Mongoose · Prisma · Drizzle◆Zod · Joi◆JWT + bcrypt◆npm · yarn · pnpm · bun◆Docker◆ESLint v10◆Architecture guards◆HTTP compression◆Connection pooling◆AGENTS.md · CLAUDE.md
// first run

A welcome page that proves it works.

Every scaffolded project serves a branded status page at / — live project name and version, server status, your stack badges, quick links to Swagger and health, and the routes already mounted.

About the welcome page
System active
Env: devPort 5000
>my-api

Production-ready modular Express API engine compiled with TypeScript.

Express.jsTypeScript 5OpenAPI 3.0Modular Architecture
OpenAPI Specs Health Status
CLI command center
$ cem add module <name>
$ cem add middleware <name>
$ cem list
◆ Core server endpoints
GET/docs
GET/health
ALL/api/v1/*
my-api v1.0.0create-express-modular
// why cem

An opinionated foundation, without the boilerplate.

Zero-prompt quick mode

cem my-api -y scaffolds the full recommended stack instantly — Mongoose, Zod, JWT cookies, Docker and Swagger. Override any of it with flags like --db prisma or --no-docker.

Swagger out of the box

OpenAPI 3.0 docs mounted at /docs with bearerAuth pre-wired. Every module you generate ships @openapi annotations for its whole CRUD surface.

Modular by design

Every feature lives in its own folder with route, controller, service, model, validation, interface and constants — auto-wired into the router.

Architecture guards

The build pipeline enforces naming conventions, detects orphan modules, and refuses to compile a malformed app.

Beautiful DX

tsx-powered dev server with near-instant restarts, a batch 2-pass installer (~80% faster setup), and a CLI that looks good in your terminal.

Quality built-in

cem check runs typecheck, ESLint v10 flat config and Prettier in one rapid pipeline with inline reporting, paired with cem fix for instant code repair.

Dockerized deploys

Multistage Dockerfile and docker-compose with the correct database sidecar generated automatically.

AI-assistant ready

AGENTS.md and CLAUDE.md are generated with your exact stack choices so Cursor, Claude Code and Copilot stay on-convention.

// the cli

A complete command surface.

Every operation you'd reach for during real development — generation, deletion, inspection, build, check — is one short command.

Browse all commands
$ cem my-api -y
$ cem dev
$ cem build
$ cem start
$ cem check
$ cem fix
$ cem eject
$ cem list
$ cem add module <Name...>
$ cem add middleware <name...>
$ cem add env <KEY...>
$ cem rm <kind> <name...>

Ready to ship faster?

Skip the boilerplate. Spin up your next Express backend with batteries included.

FAQ

Frequently asked questions

The canonical answers about installing and using create-express-modular.

create-express-modular (CLI command: cem) is a Node.js CLI that scaffolds modular, production-ready Express + TypeScript backends. It generates a domain-driven project with your choice of ORM (Mongoose, Prisma or Drizzle), validator (Zod or Joi), JWT authentication with bcrypt, Swagger/OpenAPI 3.0 docs and Docker — all wired together. Read the overview →
Install it globally with: npm install -g create-express-modular. This exposes the global command cem. You can also run it once without installing using npx create-express-modular my-api. npm, yarn, pnpm and bun are all supported and auto-detected. Installation guide →
Run cem my-api and answer the prompts, or run cem my-api -y for quick mode, which uses the recommended stack: Mongoose, Zod, JWT with HTTP-only cookies, Docker and Swagger. Override with flags such as --db prisma, --db drizzle, --validator joi, --no-docker or --header for bearer-header auth. Quick start guide →
cem <name> scaffolds a project; cem dev runs the dev server with live reload; cem build runs the guards and compiles to dist/; cem start runs the production server; cem check runs typecheck, lint and format checks; cem list (alias cem ls) lists modules, middlewares, env vars and Swagger status; cem add module <Name...>, cem add env <KEY...> and cem add middleware <name...> generate code; cem remove (alias cem rm) deletes and unwires them. add and remove accept multiple names at once. Full CLI reference →
npm, yarn, pnpm and bun are all supported and auto-detected. The scaffolder installs dependencies in a single batched pass for a much faster setup.
A modular src/app/modules/<name>/ layout with route, controller, service, model, validation, interface and constants auto-wired into the central router; a JWT auth module with bcrypt hashing and refresh tokens; a stack-aware global error handler; Swagger/OpenAPI 3.0 at /docs with bearerAuth; a cem-cli.json manifest; a branded welcome page at /; a multistage Dockerfile with docker-compose; and AGENTS.md / CLAUDE.md context files for AI coding assistants. Walk through the tutorial →
Yes. It is MIT licensed, published on npm as create-express-modular, and developed at github.com/Levi9111/npm-create-express-modular ↗. You can use it in personal and commercial projects for free.