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-smart-api

v4.4.3

Published

CLI tool to quickly generate production-ready Node.js REST APIs with CRUD, authentication, validation, testing, and microservices support

Downloads

451

Readme

🚀 create-smart-api

Smart Node.js Backend Generator for Production-Ready APIs

Build scalable backend APIs in seconds with an interactive CLI that generates clean, production-ready Node.js projects using Express or Fastify.


📦 Overview

create-smart-api is a powerful CLI toolkit that helps developers scaffold modern backend applications with:

  • Clean architecture
  • CRUD generation
  • Authentication
  • Validation
  • Swagger docs
  • Testing setup
  • Plugin support
  • Interactive schema builder

Perfect for rapid backend development.


✨ Key Highlights

🔥 Smart Interactive CLI

Generate complete backend projects with guided prompts.

🧠 Interactive Schema Builder

Create models visually with:

  • Add/Edit/Delete fields
  • Bulk field input mode
  • Table preview before generation
  • Auto typo correction for field types

⚡ Production Ready

Generated projects include:

  • Folder structure
  • Database config
  • Environment setup
  • Real connected CRUD APIs

🎯 Features

  • Express.js / Fastify support
  • CommonJS + ESM support
  • MongoDB / MySQL / MSSQL support
  • Sequelize + Mongoose support
  • CRUD generator
  • Auth generator
  • Validation generator
  • Swagger/OpenAPI setup
  • Jest testing support
  • Plugin system
  • Microservice scaffolding

📥 Installation

Run instantly with npx

npx create-smart-api create my-api

Short alias

npx create-smart-api c my-api

Global install

npm install -g create-smart-api

⚡ Quick Start

create-smart-api create my-api

or

create-smart-api c my-api

🏗️ Project Setup Wizard

The CLI will guide you through:

  • Project name
  • Framework selection
  • Module system
  • Database choice
  • CRUD generation
  • Port configuration

Supported databases:

  • MongoDB
  • MySQL
  • MSSQL

🧠 Smart CRUD Generator

Generate complete CRUD module instantly:

create-smart-api generate:crud user

or shortcut:

create-smart-api g:c user

Schema Builder Example

Interactive Mode

Field name: name
Type: string
Required? Yes
Unique? No

Quick Input Mode

name:string,email:string,age:number,status:enum

Schema Preview Table

| # | Field | Type | Req | Uniq | Default | Extra | | --- | ------ | ------ | --- | ---- | ------- | --------------- | | 1 | name | string | Yes | No | - | - | | 2 | email | string | Yes | Yes | - | - | | 3 | status | enum | No | No | active | active,inactive |


Edit Before Generate

Options include:

  • Edit field
  • Add field
  • Delete field
  • Continue

⚙️ CLI Commands

Create Project

create-smart-api create my-api
create-smart-api c my-api

Generate CRUD

create-smart-api generate:crud user
create-smart-api g:c user

Generate Auth

create-smart-api generate:auth
create-smart-api g:a

Generate Service

create-smart-api generate:service user
create-smart-api g:s user

Generate Route

create-smart-api generate:route user
create-smart-api g:r user

Generate Model

create-smart-api generate:model user
create-smart-api g:m user

Generate Validation

create-smart-api generate:validation user
create-smart-api g:v user

Generate Test

create-smart-api generate:test user
create-smart-api g:t user

Generate Swagger

create-smart-api generate:swagger

Add Plugin

create-smart-api add:plugin redis
create-smart-api add:p redis

🔌 Plugin Support

Currently supported plugins:

  • Redis
  • Kafka

Example:

create-smart-api add:plugin kafka

🧩 Database Support

MongoDB (Mongoose)

  • Schema models
  • Enum support
  • Defaults
  • Validation ready

MySQL / MSSQL (Sequelize)

  • Typed models
  • Constraints
  • Auto mappings

🔗 Relationship Support

Define model relationships interactively:

Related model name: User
Relation type:
❯ 1:1
  1:N
  N:N

Auto-create missing related models if needed.


🧪 Testing

Generated apps support Jest:

npm test

🛠️ Auto Command Suggestions

Mistyped command?

Example:

create-smart-api genrate:crud user

CLI automatically suggests:

Did you mean: generate:crud ?

And can rerun automatically after confirmation.


🚀 Roadmap

Upcoming features:

  • GraphQL generator
  • Redis cache layer
  • Advanced microservices templates
  • AI-powered API generation
  • Docker support
  • CI/CD templates

🤝 Contributing

Contributions are welcome!

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Submit PR

📄 License

MIT License


👨‍💻 Author

Created with ❤️ by Chirag Chauhan

GitHub: https://github.com/cvchauhan


⭐ Support

If you like this project:

👉 Star the repository 👉 Share with developers 👉 Contribute ideas


Build APIs Faster. Smarter. Cleaner.

npx create-smart-api create my-next-api