https://github.com/parthamk/clijs
Full-Stack Project setup with just one command
https://github.com/parthamk/clijs
Last synced: 6 months ago
JSON representation
Full-Stack Project setup with just one command
- Host: GitHub
- URL: https://github.com/parthamk/clijs
- Owner: parthamk
- Created: 2025-08-18T19:57:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T20:01:42.000Z (7 months ago)
- Last Synced: 2025-08-18T22:07:36.087Z (7 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Full-Stack Project setup with just one command (cli.js)
A **Node.js CLI tool** ๐ ๏ธ that auto-generates a **full-stack project boilerplate** with your choice of **ReactJS or Vite for Frontend** and **Express.js (with SQL or MongoDB) for Backend**.
This saves you hours of repetitive manual setup and lets you start **coding right away** ๐
---
## ๐ Features
โ
**Interactive CLI** powered by **Inquirer.js**
โ
Choose **React (CRA)** or **Vite** as frontend framework
โ
Support for **JavaScript** or **TypeScript**
โ
Backend setup with **Express.js + Sequelize (SQL)** or **Express.js + Mongoose (MongoDB)**
โ
Auto-installs **CORS, dotenv, react-router-dom** by default
โ
Choose styling: **CSS, Bootstrap, or Tailwind CSS** ๐จ
โ
Pre-configures **frontend-backend proxy** (CRA or Vite)
โ
Adds a default **health-check route (`/status`)** to test full-stack connectivity
โ
Optional installation of **ESLint \& Prettier** for clean coding
โ
Works across **Windows, macOS, and Linux** ๐ฅ๏ธ
---
## ๐๏ธ Technologies Used
### ๐น Core
- [Node.js](https://nodejs.org/) (CLI tool \& package manager)
- [Inquirer.js](https://www.npmjs.com/package/inquirer) โ for CLI prompts
- [Chalk](https://www.npmjs.com/package/chalk) โ for colorful CLI output
- [fs-extra / fs](https://www.npmjs.com/package/fs-extra) โ for file system handling
### ๐น Frontend Options
- **React (CRA) or Vite**
- **JavaScript / TypeScript**
- Styling frameworks:
- CSS
- Bootstrap
- Tailwind CSS
### ๐น Backend Options
- **Express.js** (default backend framework)
- Database Choices:
- **SQL** โ Sequelize + SQLite (default, can expand to PostgreSQL, MySQL, etc.)
- **MongoDB** โ Express + Mongoose
### ๐น Optional Packages
- `react-router-dom` โ routing in React โก
- `cors` โ enable CORS in Express
- `dotenv` โ environment variable management
- `eslint` โ linting ๐งน
- `prettier` โ code formatting
---
## ๐ฏ Motive of the Project
The goal of this project is to **streamline and automate full-stack setup**.
Instead of wasting time configuring projects manually, this CLI lets you:
1. **Choose your stack interactively** ๐ฑ๏ธ
2. **Generate ready-to-run frontend + backend apps** โก
3. **Start building features instantly** ๐
This project is built for **students, developers, and teams** who create multiple projects and want a **consistent, fast, and reliable setup**.
---
## ๐ฎ Future Implementations
โจ Add **Next.js** as a frontend option
โจ Support for **PostgreSQL, MySQL, and MongoDB Atlas by default**
โจ Auto-generate **Dockerfile \& docker-compose.yml** for containerization
โจ Add **Redux / Zustand / TanStack Query** as optional frontend state managers
โจ Auto-create **unit tests** with Jest / Mocha
โจ Add **GitHub Actions CI/CD pipeline** support
---
## โก Installation \& Usage
### ๐น 1. System Requirements
- [Node.js](https://nodejs.org/) **v14+**
- [npm](https://www.npmjs.com/) (bundled with Node.js)
- Git installed (recommended for Vite and CRA)
- Any OS: **Windows / macOS / Linux**
---
### ๐น 2. Clone \& Run
```bash
# Clone this repo
git clone https://github.com/parthamk/CLIJS.git
cd CLIJS
# Make file executable (Linux/Mac)
chmod +x cli.js
# Run the script
./cli.js
```
### ๐น 3. Using with Node
```bash
node cli.js
```
---
### ๐น 4. Workflow in VS Code
1. Open project in VS Code:
```bash
code .
```
2. Navigate to **server**:
```bash
cd server
node index.js # Runs backend on http://localhost:5000
```
3. Navigate to **client**:
```bash
cd ../client
npm start # Starts React app (frontend)
```
4. Visit:
- Frontend โ `http://localhost:3000` (CRA) or `http://localhost:5173` (Vite)
- Backend โ `http://localhost:5000/status`
---
## ๐ Project Structure
```
project-name/
โโโ client/ # React/Vite frontend
โ โโโ src/ # React source files
โโโ server/ # Express backend
โ โโโ index.js # Entry point (API + DB setup)
โโโ cli.js # The CLI script
```
---
## ๐ Example Welcome Screen (Frontend)
When you run your project, the frontend will fetch backend status and show:
```
โ Frontend is running successfully
โ Server is running successfully
All systems check complete. Happy hacking! ๐
```
---
## ๐จ๐ป Contribution
Contributions are always welcome! ๐
- Fork repo
- Create feature branch
- Submit PR
---
## ๐ License
[MIT License](LICENSE) โ Free to use \& modify.
---
๐ฅ With this CLI tool, you save **time + effort** and kickstart your dev projects with **best practices pre-configured**.
> ๐ก Recommended: Keep this tool globally installed using:
> ``bash > npm install -g . > cli.js > ``
---