create-express-modular generates a modular TypeScript backend with your ORM, validator, JWT auth and Docker — guarded by an opinionated architecture from day one.
npm install -g create-express-modular
cem my-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
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.
Production-ready modular Express API engine compiled with TypeScript.
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.
OpenAPI 3.0 docs mounted at /docs with bearerAuth pre-wired. Every module you generate ships @openapi annotations for its whole CRUD surface.
Every feature lives in its own folder with route, controller, service, model, validation, interface and constants — auto-wired into the router.
The build pipeline enforces naming conventions, detects orphan modules, and refuses to compile a malformed app.
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.
cem check runs typecheck, ESLint v9 flat config and Prettier in one rapid pipeline with inline error reporting.
Multistage Dockerfile and docker-compose with the correct database sidecar generated automatically.
AGENTS.md and CLAUDE.md are generated with your exact stack choices so Cursor, Claude Code and Copilot stay on-convention.
Every operation you'd reach for during real development — generation, deletion, inspection, build, check — is one short command.
Browse all commands$ cem my-api -yScaffold instantly with recommended defaults$ cem devStart the dev server with hot reload$ cem buildRun guards + compile TypeScript$ cem startProduction server with preflight checks$ cem checkTypecheck, lint and format in one go$ cem listModules, middlewares, env and Swagger status$ cem add module <Name...>Scaffold one or many feature modules$ cem add middleware <name...>Generate custom middlewares$ cem add env <KEY...>Add typed env variables everywhere$ cem rm <kind> <name...>Safely delete with auto-unwiringSkip the boilerplate. Spin up your next Express backend with batteries included.
FAQ
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 →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 →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 →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 →create-express-modular, and developed at github.com/Levi9111/npm-create-express-modular ↗. You can use it in personal and commercial projects for free.