npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-express-ts-api-kit

v1.1.0

Published

Interactive CLI to scaffold an Express.js + TypeScript backend API

Downloads

21

Readme

create-express-ts-api-kit

Interactive CLI to scaffold an Express + TypeScript backend API.

Quick Start (npx)

Use this command as the primary install/run flow:

npx create-express-ts-api-kit@latest my-backend

Then follow prompts.

To skip prompts and use flags:

npx create-express-ts-api-kit@latest my-backend --yes --auth --auth-provider custom --auth-mode basic --auth-mechanism session_jwt --auth-transport dual --session-storage redis --database mongoose

Alternative explicit bin usage:

npx --package create-express-ts-api-kit create-express-ts-api my-backend

What This CLI Can Generate

  • Express + TypeScript backend skeleton
  • Config, route index, global error handler, response helper
  • Optional health endpoints (basic or detailed)
  • Optional auth module
  • Optional Prisma or Mongoose setup
  • Optional Swagger/OpenAPI docs endpoint
  • Optional Redis integration
  • Optional Nodemailer helper
  • Optional Socket.IO and MQTT starter files
  • Optional Zod validation setup
  • Optional i18n error messages (TR/EN)
  • Optional Docker and docker-compose files
  • Optional GitHub Actions VPS deploy template
  • Optional sample users module (soft delete / restore)

Auth Architectures

When --auth-provider custom is selected:

  • jwt_refresh JWT access token + refresh token
  • session_only Session-based auth, no JWT
  • session_jwt Hybrid: JWT + session validation
  • session_jwt_refresh Hybrid: JWT + session + refresh

Auth transport modes:

  • cookie
  • bearer
  • dual (cookie + bearer)

Session storage options (for session-based modes):

  • redis
  • memory
  • database

Database Modes

  • none
  • mongoose (MongoDB)
  • prisma (MongoDB with Prisma)

If auth-provider=authjs, Prisma is enforced automatically.

Feature Flags in Interactive Mode

The prompt flow can enable:

  • Health endpoint
  • Detailed health checks
  • Auth module and auth endpoints
  • Role mode and role list
  • Forgot/reset password flow
  • Email verification endpoints
  • Brute-force protection
  • Audit log service
  • Permission middleware (role + Prisma role-permission setup)
  • Socket.IO
  • MQTT
  • Redis integration
  • Nodemailer integration
  • Zod integration
  • Swagger docs
  • i18n errors
  • Docker files
  • GitHub workflow template
  • Soft-delete users module
  • Nodemon-based dev mode
  • Auto install dependencies
  • Auto init git

CLI Options

--help, -h
--yes, -y
--project <name>
--port <number>
--prefix <value>

--auth / --no-auth
--auth-provider <custom|authjs>
--auth-mode <basic|role>
--auth-mechanism <jwt_refresh|session_only|session_jwt|session_jwt_refresh>
--auth-transport <cookie|bearer|dual>
--session-storage <redis|memory|database>

--database <none|mongoose|prisma>
--prisma-version <latest|6.19>

--install / --no-install
--git / --no-git
--force

Example Commands

Custom auth + hybrid session/jwt + dual transport:

npx create-express-ts-api-kit@latest my-api --yes --auth --auth-provider custom --auth-mode basic --auth-mechanism session_jwt --auth-transport dual --session-storage redis --database mongoose --install --git

Role-based + Prisma + role-permission template:

npx create-express-ts-api-kit@latest my-rbac-api --yes --auth --auth-provider custom --auth-mode role --auth-mechanism session_jwt --auth-transport dual --session-storage database --database prisma --prisma-version latest --install

AuthJS + Prisma:

npx create-express-ts-api-kit@latest my-authjs-api --yes --auth --auth-provider authjs --database prisma --prisma-version latest --install

Minimal API without auth:

npx create-express-ts-api-kit@latest my-minimal-api --yes --no-auth --database none --install

After Generation

cd my-backend
npm run dev

If Prisma is selected:

npx prisma generate

Node Requirement

  • Node.js >= 18