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 🙏

© 2025 – Pkg Stats / Ryan Hefner

greycodejs-installer

v0.1.4

Published

Installer for the GreyCode.js Framework

Downloads

9

Readme

GreyCodeJS Framework

GreyCodeJS is a lightweight, flexible Node.js framework built on Express that simplifies web application development with a clean architecture and powerful CLI tools.

Features

  • Simple MVC Structure: Organized models, views, and controllers
  • Built-in CLI: Create models, controllers, and routes with simple commands
  • Express Integration: Built on top of Express.js for robust HTTP handling
  • Database Support: Configured with Sequelize ORM for database operations
  • Middleware Support: Easy integration for custom middlewares
  • Modular Design: Clean separation of concerns with a well-defined directory structure

Quick Start

Installation

# Install the GreyCodeJS installer globally
npm install -g greycodejs-installer

# Create a new project
greycodejs new my-project

# Navigate to your project
cd my-project

# Start development server
npm run dev

Manual Installation

# Clone the repository
git clone https://github.com/kculz/greycodejs.git my-project

# Navigate to your project
cd my-project

# Install dependencies
npm install

# Start development server
npm run dev

Project Structure

my-project/
├── bin/           # CLI tools
├── config/        # Configuration files
├── controllers/   # Route controllers
├── core/          # Core framework files
├── middlewares/   # Custom middleware
├── models/        # Data models
├── public/        # Static assets
├── routes/        # Route definitions
├── seeds/         # Database seeders
├── templates/     # Templates/ Views
├── .env.example   # Environment variables examples
├── app.js         # Application entry point
└── package.json   # Project dependencies

Using the CLI

GreyCodeJS comes with a powerful CLI to help you generate code and perform common tasks:

# Create a new model
npm run cli -- create-model User

# Create a new controller
npm run cli -- create-controller UserController

# Create a new route
npm run cli -- create-route users

# Run database migrations
npm run cli -- migrate

# Generate seeders
npm run cli -- create-seed users

Configuration

Database

Edit the config/database.js file to configure your database connection:

module.exports = {
  database: 'your_database',
  username: 'username',
  password: 'password',
  host: 'localhost',
  dialect: 'mysql', // mysql, postgres, sqlite, etc.
  logging: false
};

Environment Variables

Copy .env.example to .env and adjust the settings as needed:

PORT=3000
NODE_ENV=development
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=greycodejs
DB_USERNAME=root
DB_PASSWORD=

Creating a Model

Using the CLI:

npm run cli -- create-model User

Or manually create a file in models/User.js:

module.exports = (sequelize, DataTypes) => {
  const User = sequelize.define('User', {
    name: {
      type: DataTypes.STRING,
      allowNull: false
    },
    email: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true
    },
    password: {
      type: DataTypes.STRING,
      allowNull: false
    }
  });
  
  return User;
};

Creating a Controller

Using the CLI:

npm run cli -- create-controller UserController

Creating a Route

Using the CLI:

npm run cli -- create-route users

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Acknowledgments

  • Express.js
  • Sequelize ORM
  • Commander.js