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

design-backend-app

v1.1.4

Published

Intelligent Backend Architecture Generator

Downloads

1,386

Readme

npm version License PRs Welcome Issues

📖 Table of Contents


💡 Why DevForge?

Modern backend development is bogged down by repetitive tasks: configuring TypeScript, setting up ORMs, writing JWT middleware, structuring folders, and wiring up Swagger docs. DevForge (design-backend-app) eliminates this overhead entirely.

Unlike basic boilerplate generators, DevForge is an intelligent engine. If you ask it to generate an authentication module, it dynamically inspects your chosen ORM (Prisma/Mongoose/Sequelize) and writes the exact database queries, bcrypt hashing, and JWT token generation logic needed for your specific tech stack.


✨ Key Features

  • True Database Intelligence: Generates models and CRUD operations specifically tailored for Mongoose, Prisma, or Sequelize.
  • Framework Agnostic Foundations: Currently supports Express.js and Fastify, with an architecture designed to easily adopt Hono and NestJS in the future.
  • Production-Ready Auth: One command generates complete Registration, Login, and Logout flows using standard JWTs or Session cookies.
  • Role-Based Access Control (RBAC): Generate middleware and controllers that automatically enforce role-based security out-of-the-box.
  • Dynamic Plugin Ecosystem: Add enterprise features like Docker, Redis, BullMQ, and AWS S3 instantly without touching configuration files.
  • Auto-Generated Swagger UI: Endpoints generated by DevForge automatically contain detailed OpenAPI JSDoc comments grouped by tags.

🚀 Quick Start

You don't need to install anything globally. You can bootstrap a new project directly using npx:

npx design-backend-app my-backend

(Or navigate to an empty directory and run npx design-backend-app init ./)

Once the CLI generates your codebase and installs dependencies:

cd my-backend
npm run dev

Your server will start (default port 3000), and your API documentation will be instantly available at http://localhost:3000/api-docs!


⚙️ Interactive Setup Wizard

When you run the initialization command, DevForge will ask you a series of questions to tailor the project exactly to your needs:

  1. Framework: Express.js or Fastify
  2. Language: TypeScript (JavaScript coming soon)
  3. Architecture:
    • MVC (Classic Model-View-Controller)
    • Modular (Domain-Driven Design for scalable microservices)
  4. Scale (if Modular is chosen): Small, Medium, or Enterprise
  5. Database: MongoDB (Mongoose), PostgreSQL (Prisma), MySQL (Sequelize), or None
  6. Authentication: JWT, Session, or None
  7. RBAC: Define custom roles (e.g., user, admin, superadmin)

🗂 Architecture Patterns

1. MVC (Model-View-Controller)

The industry standard for straightforward, monolithic web applications.

src/
├── controllers/    # Handles HTTP requests and responses
├── models/         # Database schemas and abstractions
├── routes/         # Express/Fastify router configurations
├── middleware/     # Auth, Validation, and logging middleware
├── utils/          # Helper functions (JWT, hashers)
└── app.ts          # Application entry point

2. Modular (Domain-Driven Design)

Designed for maximum scalability. Code is grouped tightly by business domain, making it incredibly easy to split into microservices later.

src/
├── modules/
│   ├── users/
│   │   ├── domain/            # Models, Types, Interfaces
│   │   ├── application/       # Business Logic (Services)
│   │   └── infrastructure/    # Controllers, Routes
├── middleware/
└── app.ts

🛠 CLI Command Reference

Once your project is created, DevForge tracks its state via a hidden .devforge.json file. You can run CLI commands from within your project directory using npx design-backend-app <command>.

1. Generate Component

Dynamically scaffold new features. DevForge automatically wires new routes into your app.ts file!

Commands:

  • Generate an Authentication Flow:

    npx design-backend-app generate auth

    Creates a fully working auth.controller integrating bcrypt, your chosen database, and token generation.

  • Generate a generic Module:

    npx design-backend-app generate module inventory

    Creates controllers, routes, and services for a new domain.

  • Generate a complete CRUD Module:

    npx design-backend-app generate module products --crud

    Generates the database model file AND the controller logic required to Create, Read, Update, and Delete products.

  • Generate Background Workers / Queues:

    npx design-backend-app generate queue emails
  • Generate Upload Handlers:

    npx design-backend-app generate upload documents

2. Plugin System

Why spend hours reading documentation to configure Redis or Docker? Let DevForge inject the best-practice setup directly into your code.

Add a plugin:

npx design-backend-app add swagger

Remove a plugin:

npx design-backend-app remove swagger

(Removes the configuration files, cleans up app.ts, and uninstalls dependencies)


🧩 Available Plugins

| Plugin Name | Description | Packages Installed | |---|---|---| | swagger | Injects an automated OpenAPI/Swagger UI at /api-docs. | swagger-ui-express, swagger-jsdoc | | docker | Creates an optimized Dockerfile and docker-compose.yml for local dev & production. | None (System level) | | redis | Sets up a Redis client connection pool in src/config/redis.ts. | ioredis | | bullmq | Configures BullMQ for robust background job processing. | bullmq, ioredis | | logger | Replaces console.log with a structured winston logging utility. | winston | | rate-limit | Adds basic API rate-limiting middleware to app.ts. | express-rate-limit | | validation | Sets up request validation middleware using Zod. | zod | | aws-s3 | Generates an S3 service wrapper for AWS uploads. | @aws-sdk/client-s3 | | nodemailer | Sets up a reusable email dispatcher utility. | nodemailer | | code-quality | Installs and configures ESLint, Prettier, and Husky pre-commit hooks. | eslint, prettier, husky |


📝 Automated API Documentation

Whenever you generate a module using --crud or generate an auth flow, DevForge automatically annotates your routes with OpenAPI (Swagger) Comments.

For example, generating an auth module automatically produces code like this:

/**
 * @openapi
 * /api/auth/register:
 *   post:
 *     tags:
 *       - Auth
 *     summary: Register a new user
 *     description: Creates a new user account.
 *     responses:
 *       201:
 *         description: Successfully registered.
 */
authRouter.post('/register', register);

If you have the swagger plugin installed, this endpoint instantly appears beautifully formatted in your Swagger UI!


🤝 Contributing

We actively welcome community contributions! If you want to build a new plugin, add a new framework (like NestJS or Hono), or fix a bug:

  1. Read our Contributing Guidelines.
  2. Review our Code of Conduct.
  3. Check the Issues Tab for feature requests or bug reports.

To run the CLI locally for development:

git clone https://github.com/PuneethKrishnaS/design-backend-app.git
cd design-backend-app
npm install
npm run dev
node dist/index.js --help

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.