@gaurav-udawant/pipecore
v1.0.3
Published
A powerful, interactive Command Line Interface (CLI) tool for rapidly scaffolding and managing scalable MERN stack microservices. Developed by [@gaurav-udawant](https://github.com/gaurav-udawant).
Readme
🚀 Pipecore CLI
A powerful, interactive Command Line Interface (CLI) tool for rapidly scaffolding and managing scalable MERN stack microservices. Developed by @gaurav-udawant.
@gaurav-udawant/pipecore automates the boring parts of setting up a microservices architecture. It generates production-ready Express servers, Mongoose models, Routers, and automatically configures your API Gateway and Environment variables.
✨ Features
- Interactive CLI: Built with
inquirerand beautifully formatted withchalk. - Instant Boilerplate: Generates standard MVC-style folders and files (
.controller.ts,.service.ts,.model.ts, etc.). - Auto Gateway Configuration: Automatically appends proxy rules to your API Gateway.
- Port Management: Dynamically assigns and tracks ports for new services to avoid conflicts.
- TypeScript Ready: Fully configured with
tsconfig.jsonand type definitions.
📦 Installation
Install the Pipecore CLI globally on your machine so you can use it across any of your microservice projects:
npm install -g @gaurav-udawant/pipecore
🛠️ Getting Started & Usage
⚠️ IMPORTANT PROJECT STRUCTURE RULE: To ensure the API Gateway configuration and dynamic Port tracking work perfectly, you MUST run this CLI inside a services directory.
Step-by-Step Guide:
1. Create your root project and services directory:
Open your terminal and create a main project folder, then create a services folder inside it.
mkdir my-microservices-app
cd my-microservices-app
mkdir services
cd services
2. Setup your Gateway (Prerequisite):
Ensure you have your gateway folder initialized inside the services directory before generating new microservices, as Pipecore will attempt to auto-wire the new routes into it.
3. Run the Pipecore CLI:
Make sure your terminal is currently inside the services folder, then run:
pipecore
4. Follow the Interactive Prompts:
The CLI will ask for the name of your new service (e.g., auth, payment, user). It will then automatically:
Create the folder structure parallel to your gateway.
Generate all necessary boilerplate files.
Create a package.json and .env with an auto-assigned PORT.
Update your API Gateway routes.
Run npm install to fetch dependencies for the new service.
📂 Expected Folder Structure
After running the tool, your workspace will look exactly like this:
my-microservices-app/
└── services/
├── gateway/
├── auth/
│ ├── src/
│ │ ├── app.ts
│ │ ├── auth.controller.ts
│ │ ├── auth.model.ts
│ │ ├── auth.router.ts
│ │ └── ...other files
│ ├── package.json
│ ├── tsconfig.json
│ └── .env
└── payment/ # ✨ Another generated service