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

make-backend-kit

v1.1.0

Published

Generate a production-ready Express backend in less than a minute with clean architecture, auth, Docker support, and sensible defaults.

Readme

🚀 create-backend-app

Generate a production-ready Express backend in under 60 seconds.

A powerful CLI tool that scaffolds fully-configured Express.js backends with clean architecture, JWT authentication, Google OAuth, Docker support, and zero npm audit vulnerabilities — right out of the box.


✨ Features

| Feature | Details | |---|---| | Language | TypeScript (strict) or JavaScript | | Module System | ES Modules (import/export) or CommonJS (require) | | Architecture | Modular (domain-driven) or MVC | | Programming Style | Class Based (ES6 classes) or Function Based (pure/async functions) | | Authentication | JWT signup, login, logout with access + refresh tokens | | Google OAuth 2.0 | Credential login + redirect/callback flow | | Email Verification | OTP-based email verification via Nodemailer | | Forgot Password | Reset token + magic link email flow | | Database | MongoDB with Mongoose ODM | | Logger | Pino (structured JSON) or console.log | | API Docs | Swagger UI at /docs | | Testing | Jest + Supertest with health check spec | | Docker | Dockerfile, docker-compose.yml, watch-package script | | Code Comments | Optional step-by-step inline documentation | | 0 Vulnerabilities | Clean npm audit with zero warnings or vulnerabilities |


📦 Quick Start

npx create-backend-app

Or install globally:

npm install -g create-backend-app
create-backend-app

Then follow the interactive prompts:

======================================================
  🚀 CREATE-BACKEND-APP — Backend Boilerplate Generator
======================================================
  Production-ready Express backend in under 60 seconds

? Project name › my-backend
? Choose a setup › Recommended / Custom / Reuse Previous

🛠️ Setup Modes

⚡ Recommended (One Click)

Scaffolds with industry-standard defaults:

  • TypeScript • ES Modules • Modular • Class Based
  • Multi Token Auth • Google OAuth • Email Verification • Forgot Password
  • MongoDB • Pino Logger • Swagger • Jest • Docker

🔧 Custom (Step-by-Step)

Choose every layer of your backend:

? Language           → TypeScript / JavaScript
? Module System      → ES Modules / CommonJS
? Folder Structure   → Modular / MVC
? Programming Style  → Class Based / Function Based
? Authentication     → Yes / No
  ├─ Token Strategy  → Multi Token / Single Token
  ├─ Email Verify    → Yes / No
  ├─ Forgot Password → Yes / No
  └─ Google Auth     → Yes / No
? Database           → MongoDB (Mongoose)
? Logger             → Pino / None
? API Docs           → Swagger / None
? Testing            → Jest / None
? Code Comments      → Yes / No
? Docker             → Yes / No
? Install Deps       → Yes / No

🔁 Reuse Previous

Your last configuration is saved automatically. Pick "Reuse Previous" to scaffold instantly with the same settings.


📁 Generated Project Structure

Modular Architecture (Domain-Driven)

my-backend/
├── .gitignore
├── server/
│   ├── .env
│   ├── .env.example
│   ├── .gitignore
│   ├── package.json
│   ├── tsconfig.json
│   ├── eslint.config.js
│   ├── prettier.config.js
│   ├── jest.config.js
│   ├── README.md
│   ├── server.ts
│   └── src/
│       ├── app.ts
│       ├── __tests__/
│       │   └── health.test.ts
│       ├── modules/
│       │   └── public/
│       │       └── auth/
│       │           ├── auth.controller.ts
│       │           ├── auth.router.ts
│       │           ├── auth.validator.ts
│       │           └── auth.types.ts
│       └── shared/
│           ├── config/
│           │   ├── env.config.ts
│           │   ├── db.config.ts
│           │   ├── logger.config.ts
│           │   └── mail.config.ts
│           ├── constants/
│           │   ├── env.constants.ts
│           │   ├── StatusCodes.constants.ts
│           │   └── tokens.constants.ts
│           ├── dao/
│           │   ├── user.dao.ts
│           │   ├── session.dao.ts
│           │   └── token.dao.ts
│           ├── errors/
│           │   ├── BadRequest.error.ts
│           │   ├── Unauthorized.error.ts
│           │   ├── Forbidden.error.ts
│           │   ├── NotFound.error.ts
│           │   └── Conflict.error.ts
│           ├── middlewares/
│           │   ├── index.middleware.ts
│           │   ├── auth.middleware.ts
│           │   ├── refresh.middleware.ts
│           │   ├── error.middleware.ts
│           │   ├── NotFound.middleware.ts
│           │   └── validate.middleware.ts
│           ├── models/
│           │   ├── user.model.ts
│           │   ├── sessions.model.ts
│           │   └── token.model.ts
│           ├── responses/
│           │   ├── Ok.response.ts
│           │   ├── Created.response.ts
│           │   └── NoContent.response.ts
│           ├── routers/
│           │   ├── index.router.ts
│           │   └── health.router.ts
│           ├── sanitizers/
│           │   └── user.sanitizer.ts
│           └── utils/
│               ├── ApiError.util.ts
│               ├── ApiResponse.util.ts
│               ├── buildTokenPayload.util.ts
│               ├── createSession.util.ts
│               ├── googleAuth.util.ts
│               ├── hashing.util.ts
│               ├── sendMail.util.ts
│               ├── token.util.ts
│               └── validateErrors.util.ts
├── Dockerfile              # (if Docker enabled)
├── docker-compose.yml      # (if Docker enabled)
└── .dockerignore            # (if Docker enabled)

🔐 Authentication Flow

Multi Token Strategy (Recommended)

  • Access Token — Short-lived JWT sent in response body
  • Refresh Token — Long-lived JWT stored in httpOnly cookie
  • Session — Server-side session stored in MongoDB

Endpoints Generated

| Method | Route | Description | |---|---|---| | POST | /api/v1/auth/signup | Register a new user | | POST | /api/v1/auth/login | Login with email/password | | GET | /api/v1/auth/me | Get authenticated user profile | | POST | /api/v1/auth/refresh | Refresh access token | | POST | /api/v1/auth/logout | Logout (clear session) | | POST | /api/v1/auth/logout-all | Logout from all sessions | | POST | /api/v1/auth/google/login | Login via Google credential | | GET | /api/v1/auth/google/redirect | Redirect to Google OAuth | | GET | /api/v1/auth/google/callback | Google OAuth callback | | POST | /api/v1/auth/forgot-password | Send password reset email | | POST | /api/v1/auth/reset-password | Reset password with token |


🐳 Docker Support

When Docker is enabled, the generator creates:

  • Dockerfile — Multi-stage production Node.js image
  • docker-compose.yml — App + MongoDB containers with volumes
  • .dockerignore — Optimized build context
# Start everything
docker-compose up --build

# Run in background
docker-compose up -d

🧪 Testing

Generated projects include a Jest test suite with:

  • Jest 30 with ES Modules support
  • Supertest for HTTP endpoint testing
  • Pre-configured health check test spec
npm test

📋 After Scaffolding

cd my-backend/server
npm install        # if not auto-installed
npm run dev        # start development server

Environment Variables

Copy .env.example to .env and configure:

PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/my-backend
JWT_SECRET=your_secret_key
JWT_REFRESH_SECRET=your_refresh_secret_key

# Google OAuth (if enabled)
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/api/v1/auth/google/callback

🧹 Zero Warnings, Zero Vulnerabilities

Every generated project ships with npm overrides that guarantee:

found 0 vulnerabilities

No deprecation warnings. No audit issues. Clean from day one.


📄 License

MIT