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-liver

v1.5.1

Published

School-level full-stack scaffolding CLI generator

Downloads

299

Readme

StackForge

School-level full-stack scaffolding CLI generator. Generates complete React + Express + MySQL management systems from terminal prompts.


Install and Run

Option 1: Run directly with npx (after publishing)

npx stackforge

Option 2: Run locally during development

cd stackforge
npm install
node index.js

What It Generates

Running the CLI creates two folders:

your-project-backend/
your-project-frontend/

Backend includes:

  • Express.js server with CORS and sessions
  • MySQL database connection pool
  • CRUD controller and routes for your main entity
  • Authentication (login, register, logout, session middleware)
  • Optional: reports, invoice, payments controllers and routes
  • .env file template

Frontend includes:

  • Vite + React 18 project
  • Tailwind CSS
  • React Router DOM v6
  • Axios service layer
  • Dashboard with sidebar, navbar, stats cards
  • Full CRUD list page with table and delete confirmation
  • Form page with insert and update support
  • Relationship dropdowns auto-populated via Axios
  • Login and Register pages
  • Protected routes via AuthContext
  • Optional: Reports, Invoices, Payments pages

Database includes:

  • MySQL schema file (schema.sql)
  • Users table (if auth enabled)
  • Referenced tables stubs (for relationship fields)
  • Main entity table with foreign keys
  • Optional: invoices, payments tables
  • ERD explanation as comments

CLI Questions

Project name?
Database name?
Include authentication?
Main entity name? (e.g. student)
Main entity plural name? (e.g. students)
How many fields?

For each field:
  Field name?
  Field type?        [VARCHAR, INT, DECIMAL, DATE, TEXT, BOOLEAN]
  Required?
  Is this a relationship field?
    If yes:
      Referenced table?
      Display field from referenced table?

Include reports module?
Include invoice module?
Include payments module?

After Generation

1. Set up the database

Open MySQL and run:

source path/to/your-project-backend/database/schema.sql

2. Configure the backend

Edit your-project-backend/.env:

DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=your_database_name
SESSION_SECRET=change_this_to_something_secure
PORT=5000

3. Start the backend

cd your-project-backend
npm install
npm run dev

Backend runs at: http://localhost:5000

4. Start the frontend

cd your-project-frontend
npm install
npm run dev

Frontend runs at: http://localhost:5173


Supported Field Types

| Type | MySQL Type | HTML Input | |----------|-----------------|-------------| | VARCHAR | VARCHAR(255) | text | | INT | INT | number | | DECIMAL | DECIMAL(10,2) | number | | DATE | DATE | date | | TEXT | TEXT | textarea | | BOOLEAN | TINYINT(1) | checkbox |


Relationships

StackForge supports simple one-to-many relationships.

Example:

Field name:          package_id
Referenced table:    packages
Display field:       package_name

This generates:

  • package_id INT stored in database
  • package_name displayed in frontend dropdown
  • LEFT JOIN in GET queries
  • Axios dropdown fetch in form page

Publishing to npm

1. Create an npm account

Go to https://www.npmjs.com and create a free account.

2. Login in terminal

npm login

3. Make index.js executable

The #!/usr/bin/env node line is already at the top of index.js.

On Mac/Linux, also run:

chmod +x index.js

4. Update package.json

Edit package.json and set a unique name:

{
  "name": "your-unique-package-name",
  "version": "1.0.0",
  ...
}

Check if the name is available:

npm search your-unique-package-name

5. Publish

npm publish

6. Test your published package

npx your-unique-package-name

7. Update version and republish

npm version patch   # 1.0.0 -> 1.0.1
npm publish

Project Structure

stackforge/
  index.js                      Main CLI entry
  package.json
  README.md
  generator/
    promptEngine.js             All CLI questions
    schemaGenerator.js          MySQL schema generator
    backendGenerator.js         Express backend generator
    frontendGenerator.js        React frontend generator
  utils/
    helpers.js                  Utility functions

Version 1 Limitations

Version 1 is intentionally simple and school-level:

  • One main CRUD entity per project
  • Simple one-to-many relationships only
  • No many-to-many relationships
  • No nested relationships
  • No chained joins
  • No automatic AI form generation
  • No analytics engine
  • No plugin system

Tech Stack (Generated Projects)

Frontend: React 18, Vite, Tailwind CSS, React Router DOM v6, Axios

Backend: Node.js, Express.js, MySQL2, Express-Session, Bcryptjs, dotenv


License

MIT