Skip to content

FumCLI is a Command Line Interface (CLI) tool that generates boilerplate code for a Node.js and React project. With FumCLI, developers can easily create a starter Express server, CRUD operations for an entity, and generate the necessary files and folders for a full-stack web application.

License

Notifications You must be signed in to change notification settings

Development-Firm/fumcli

Repository files navigation

FumCLI

FumCLI is a Command Line Interface (CLI) tool that generates boilerplate code for a Node.js and React project. With FumCLI, developers can easily create a starter Express server, CRUD operations for an entity, and generate the necessary files and folders for a full-stack web application.

Installation

To use FumCLI, you must have Node.js installed. Once Node.js is installed, you can install FumCLI globally using npm:

npm install -g fumcli

Usage

FumCLI provides several commands that generate different types of boilerplate code.

Create a starter Express server

To create a starter Express server, use the -s or --starter flag:

fumcli -s

This command generates the following files and directories:

- config.env
- app.js
- server.js
- controllers/handlerFactory.js
- controllers/errorController.js
- utils/appError.js
- utils/apiFeatures.js
- utils/catchAsync.js
- routes/
- models/
- img/

Generate CRUD operations for an entity

To generate CRUD operations for an entity, use the gen-crud command:

fumcli gen-crud -n <entity_name> -a <attributes>

The -n or --name option specifies the name of the entity. The -a or --attributes option specifies the attributes of the entity in the format of name:type,name:type,....

The following additional options are also available:

  • -m or --models: Generate models for the entity
  • -c or --controller: Generate a controller for the entity
  • -r or --routes: Create routes folder

Add user feature to the starter template

To add a user feature to the existing starter template, use the add-user command:

fumcli add-user -t <template_number>

The -t or --template option specifies the number of the template you want to use. By default, it selects template 1. This command generates the necessary files and folders for the user feature, including frontend pages and backend models and APIs. It automatically integrates and applies authentication using JWT.

Display help information

To display help information, use the -h or --help option:

fumcli -h

License

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

About

FumCLI is a Command Line Interface (CLI) tool that generates boilerplate code for a Node.js and React project. With FumCLI, developers can easily create a starter Express server, CRUD operations for an entity, and generate the necessary files and folders for a full-stack web application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •