Skip to content

BuildBlox is a simple and efficient CLI tool that generates a structured Node.js backend project using Express. It automates the setup process by creating directories, boilerplate files, and essential configurations—allowing you to jump straight into development.

Notifications You must be signed in to change notification settings

codebyfaisal/buildblox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

BuildBlox

Overview

BuildBlox is a simple and efficient CLI tool that generates a structured Node.js backend project using Express. It automates the setup process by creating directories, boilerplate files, and essential configurations—allowing you to jump straight into development.

Features

  • Automatically creates a well-structured Express project.
  • Includes predefined folders for authentication, configuration, controllers, database, middleware, models, routes, utilities, and views.
  • Generates essential boilerplate files such as server.js and .env.
  • Provides an intuitive CLI prompt to confirm project creation.
  • Displays the generated project structure upon completion.

Installation

You can use npx to run the package without installing it globally:

npx buildblox

Alternatively, install it globally for repeated use:

npm install -g buildblox

Usage

To generate a new backend project, follow these steps:

  1. Create and navigate into your project directory:
    mkdir backend
    cd backend
  2. Run the CLI tool:
    npx buildblox
    If installed globally, use:
    buildblox
  3. Confirm the setup when prompted.
  4. Install necessary dependencies:
    npm install express cors dotenv
  5. Your project is ready! Start your development server:
    node server.js

Project Structure

After running the command, your project will be structured as follows:

my-backend-app/
├── auth/
│   ├── .auth.js
├── config/
│   ├── .conf.js
├── controllers/
│   ├── .controller.js
├── db/
│   ├── .db.js
├── helpers/
│   ├── .helper.js
├── middleware/
│   ├── .middleware.js
├── models/
│   ├── .model.js
├── routes/
│   ├── .routes.js
├── utils/
│   ├── .util.js
├── views/
│   ├── .view.ejs
├── .env
├── server.js

Notes

  • The .env file includes PORT=3000 by default.
  • The server.js file initializes an Express server with CORS enabled.
  • You can modify the project structure and files as per your requirements.

License

This project is licensed under the MIT License.


Happy Coding journey 😊🎁👍.

About

BuildBlox is a simple and efficient CLI tool that generates a structured Node.js backend project using Express. It automates the setup process by creating directories, boilerplate files, and essential configurations—allowing you to jump straight into development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published