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

4bnode

v4.0.3

Published

A professional tool to generate a Node.js app by 4Brains Technologies

Downloads

167

Readme

4bnode

  ██╗  ██╗██████╗ ███╗   ██╗ ██████╗ ██████╗ ███████╗
  ██║  ██║██╔══██╗████╗  ██║██╔═══██╗██╔══██╗██╔════╝
  ███████║██████╔╝██╔██╗ ██║██║   ██║██║  ██║█████╗
  ╚════██║██╔══██╗██║╚██╗██║██║   ██║██║  ██║██╔══╝
       ██║██████╔╝██║ ╚████║╚██████╔╝██████╔╝███████╗
       ╚═╝╚═════╝ ╚═╝  ╚═══╝ ╚═════╝ ╚═════╝ ╚══════╝

A professional CLI tool and visual dashboard to generate, manage, and test Node.js/Express applications.

Built by 4Brains Technologies.

Quick Start

npx 4bnode init my-app
cd my-app
npm run dev

Your app runs at http://localhost:3000 with a built-in visual dashboard at http://localhost:3000/_dev.

CLI Commands

Create a Project

npx 4bnode init <name>

Scaffolds a new Express project with:

  • ES Module syntax
  • Environment config (.env.development, .env.production)
  • CORS, JSON body parser (50MB limit)
  • Static file serving from public/
  • Built-in dev dashboard at /_dev

Add Features

Use the interactive menu:

npx 4bnode add

Or add directly:

| Command | Description | |---------|-------------| | 4bnode add api <name> | Create a new API endpoint | | 4bnode add mongo | Configure MongoDB connection | | 4bnode add crud | Add CRUD operations to a route | | 4bnode add login | Add JWT authentication & login | | 4bnode add socket | Integrate Socket.IO | | 4bnode add websocket | Add native WebSocket support | | 4bnode add serialport | Serial port communication |

API Endpoint Creation

4bnode add api users

When creating an API endpoint:

  • Select HTTP method (GET, POST, PUT, DELETE, PATCH)
  • Choose fields from existing model (if available)
  • Add custom fields received from client
  • File fields auto-configure multer for multipart uploads
  • All routes use /api/ prefix

Schema Management

4bnode schema              # Interactive create/view/edit
4bnode schema user         # Create or edit 'user' schema

Supported field types: String, Number, Boolean, Date, Array, ObjectId, Mixed, Buffer

Field constraints: required, unique, default

Presets available: user, product, post

List Project Info

4bnode list                # Show all models, routes & config
4bnode list models         # List models only
4bnode list routes         # List routes only

Dashboard Passkey

During npx 4bnode init, you'll be prompted to set a 6-digit passkey to protect the dev dashboard.

To change the passkey later, run inside your project:

4bnode passkey

Start Dev Dashboard

4bnode ui

Runs npm run dev and opens the visual dashboard. Must be run inside a 4bnode project.

Visual Dashboard

Access at http://localhost:3000/_dev when running npm run dev.

Dashboard Features

Overview - Project status, configured features, quick stats

Database - MongoDB connection setup, URI management

Schemas - Create, view, edit MongoDB schemas with field management. Add/remove fields, toggle required/unique, set defaults.

API Routes - Full route management:

  • Create new routes (Methods, CRUD, Login, Register)
  • Add methods to existing routes with field selection
  • Select fields from models or add custom fields
  • File upload fields auto-configure multer
  • View route source code, edit inline
  • Share endpoint docs with frontend team (Markdown format)
  • Delete routes (removes file + index.js registration)

API Tester - Built-in Postman-like API testing tool:

  • REST API, Socket.IO, and WebSocket testing
  • Body types: JSON, Form Data, URL Encoded, Raw, Binary
  • File uploads: Choose file, send as File or Base64
  • Auto-detect fields: Matches URL to route and pre-fills body/form fields from route code
  • Path variables: Auto-detects :id params, shows editable fields
  • Query params: Key-value editor, auto-fills from req.query
  • Headers: Key-value editor with quick presets (Bearer Auth, JSON, Form Data, URL Encoded, Accept)
  • Response viewer: Body + Headers tabs, copy response, save responses
  • Collection management: Save requests, organize with responses, delete with confirmation
  • Share collection: Generate shareable API documentation page with:
    • Endpoint details, headers, body fields
    • Code examples (cURL, Fetch, Axios) with copy button
    • Form data / file upload code generation
    • Saved response examples
    • Search/filter endpoints
    • Persistent URL (updates on re-share)
  • Import from routes: One-click import endpoints from your project routes
  • All data persisted in .4bnode/ JSON files (not localStorage)

Real-time - Socket.IO and WebSocket configuration

SerialPort - Serial port setup with path and baud rate config

Environment - View and edit .env.development and .env.production

Generated Project Structure

my-app/
├── index.js                    # Express app entry point
├── dev-api.js                  # Dev dashboard API (auto-included)
├── package.json
├── .env.development            # Dev environment variables
├── .env.production             # Production environment variables
├── .4bnode/                    # Dashboard data (tester, shared collections)
├── public/                     # Static files
│   ├── index.html              # Dashboard UI
│   ├── fonts/
│   └── images/
├── uploads/                    # File uploads (when using multer)
└── src/
    ├── db.js                   # MongoDB connection (after `add mongo`)
    ├── models/                 # Mongoose schemas
    ├── routes/                 # API route files
    └── middleware/
        └── auth.js             # JWT auth middleware (after `add login`)

Real-time Communication

Socket.IO

4bnode add socket

Access in routes via req.io:

router.get('/notify', (req, res) => {
  req.io.emit('message', 'Hello from server');
  res.json({ sent: true });
});

WebSocket

4bnode add websocket

Access in routes via req.wss:

router.get('/broadcast', (req, res) => {
  req.wss.clients.forEach(client => {
    if (client.readyState === WebSocket.OPEN) {
      client.send('Hello from server');
    }
  });
  res.json({ sent: true });
});

Help

4bnode -h
4bnode --help

License

Proprietary License

(c) 2025 4Brains Technologies. All rights reserved.

Unauthorized copying, distribution, modification, or use of this code is strictly prohibited.

For licensing or commercial use: [email protected]