β‘ Scaffold production-ready Express.js TypeScript backends in seconds
npx create-express-forge my-api
# or
npm create express-forge my-api
# or (short alias)
npx cef my-apiInteractive prompts let you choose:
| Option | Choices |
|---|---|
| Architecture | Modular (feature-based) Β· MVC |
| ORM | Prisma Β· Sequelize Β· None |
| Database | PostgreSQL Β· MySQL Β· SQLite Β· None |
| Logger | Winston Β· Pino Β· None |
| Testing | Vitest Β· Jest Β· None |
| Docker | Dockerfile + docker-compose |
- β
TypeScript +
tsxhot-reload dev server - β Zod env validation on startup β fails fast on bad config
- β
Global centralized error handler β
ApiError,ZodError, unknown errors all handled - β
Request validation middleware via
validate(schema) - β
ApiErrorβ custom class with static factories (.notFound(),.unauthorized(), etc.) - β
ApiResponseβ consistent JSON response helpers - β
asyncHandlerβ wraps async routes, no try/catch needed - β Helmet + CORS + compression + rate limiter
- β Graceful shutdown (SIGTERM / SIGINT)
- β Multi-stage Dockerfile with healthcheck
- β docker-compose with correct DB service
create-express-forge/
βββ packages/
β βββ create-express-forge/ β The published CLI
β βββ typescript-config/ β Shared internal TS config
β βββ eslint-config/ β Shared internal ESLint config
βββ examples/
β βββ modular-postgres-prisma/ β Pre-generated example
βββ .github/workflows/ β CI + Release
See CONTRIBUTING.md.
| Branch | npm tag | Description |
|---|---|---|
main |
latest |
Stable releases |
next |
next |
Pre-releases / beta |
MIT Β© Yatharth Lakhate