Skip to content

parthamk/CLIJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🚀 Full-Stack Project setup with just one command (cli.js)

NodeJS CLI Frontend Backend Database

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

🔹 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 v14+
  • npm (bundled with Node.js)
  • Git installed (recommended for Vite and CRA)
  • Any OS: Windows / macOS / Linux

🔹 2. Clone & Run

# 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

node cli.js

🔹 4. Workflow in VS Code

  1. Open project in VS Code:
code .
  1. Navigate to server:
cd server
node index.js   # Runs backend on http://localhost:5000
  1. Navigate to client:
cd ../client
npm start       # Starts React app (frontend)
  1. 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 – 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 >


About

Full-Stack Project setup with just one command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors