npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

setup-cli

v1.1.2

Published

CLI tool to generate frontend (Vite) and backend (Express) structure

Downloads

146

Readme

Project Setup CLI

Introduction

The Project Setup CLI is a command-line tool that automates the process of creating a full-stack web development project. It sets up a backend with Express.js and a frontend with Vite (React) while handling dependencies, configurations, and server execution.

Features

  • Initializes a backend with:

    • Express.js & dotenv
    • Folder structure: models, controllers, routes, middlewares, utils, public
    • Auto-creation of index.js, app.js, .env, .gitignore, and constant.js
    • Installs nodemon for automatic server restart
    • Opens a new terminal and runs nodemon index.js
  • Initializes a frontend with:

    • Vite + React (default: JavaScript)
    • Installs dependencies and runs npm run dev

Installation

To install the CLI globally from npm:

npm install -g setup-cli

Usage

To create a new project, run:

setup-project <project-name>

For example:

setup-project my-app

This will create a my-app/ folder and set up both backend and frontend inside it.


Folder Structure

my-app/
│── backend/
│   ├── models/
│   ├── controllers/
│   ├── routes/
│   ├── middlewares/
│   ├── utils/
│   ├── public/
│   ├── index.js
│   ├── app.js
│   ├── constant.js
│   ├── .env
│   ├── .gitignore
│   ├── package.json
│   ├── node_modules/
│
│── frontend/
│   ├── src/
│   ├── public/
│   ├── index.html
│   ├── package.json
│   ├── node_modules/

Steps Executed by the CLI

1️⃣ Backend Setup

  • Creates a backend/ directory.
  • Runs npm init -y.
  • Adds { "type": "module" } to package.json.
  • Installs express and dotenv.
  • Installs nodemon as a dev dependency.
  • Creates backend folder structure.
  • Generates essential files (index.js, app.js, .env, .gitignore, constant.js).
  • Opens a new terminal and runs npx nodemon index.js.

2️⃣ Frontend Setup

  • Creates a frontend/ directory.
  • Asks the user to choose between JavaScript and TypeScript.
  • Runs npm create vite@latest frontend -- --template react (or react-ts).
  • Installs frontend dependencies (npm install).
  • Starts the frontend server (npm run dev).

Example Workflow

setup-project my-app

Backend Terminal Output:

🛠 Setting up backend...
📦 Installing backend dependencies...
🚀 Starting backend server...

Frontend Terminal Output:

⚡ Setting up frontend with Vite...
Choose language: (1) JavaScript (default) or (2) TypeScript:
📦 Installing frontend dependencies...
🚀 Starting frontend server...

Dependencies Used

  • Backend:

    • express
    • dotenv
    • nodemon (dev dependency)
  • Frontend:

    • vite
    • react
    • react-dom

License

MIT License


Future Improvements

  • Add support for other frameworks (e.g., Next.js, Vue.js).
  • Allow customized folder structure.
  • Provide default backend API routes.

Contributing

Feel free to submit issues or contribute by creating a pull request! 🚀


Links