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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yes20sh/create-mern-stack-app

v1.0.6

Published

A production-ready MERN stack starter CLI generator and monorepo with React, Vite, TailwindCSS, Express, and MongoDB.

Readme

  ███╗   ███╗███████╗██████╗ ███╗   ██╗
  ████╗ ████║██╔════╝██╔══██╗████╗  ██║
  ██╔████╔██║█████╗  ██████╔╝██╔██╗ ██║
  ██║╚██╔╝██║██╔══╝  ██╔══██╗██║╚██╗██║
  ██║ ╚═╝ ██║███████╗██║  ██║██║ ╚████║
  ╚═╝     ╚═╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝
  @yes20sh/create-mern-stack-app
  React + Vite + TailwindCSS + Express + MongoDB
  Created by Yashraj Singh Solanki <[email protected]>

@yes20sh/create-mern-stack-app

npm version License: MIT Node Version

A modern, production-grade MERN (MongoDB, Express, React, Node.js) starter package and CLI generator. Scaffold a clean, robust, and scalable full-stack application with React 18, Vite, TailwindCSS v4, shadcn UI, Express, and MongoDB in seconds.


Quick Start

Generate a new MERN application instantly using npx:

npx @yes20sh/create-mern-stack-app my-mern-app

Or using npm create:

npm create @yes20sh/mern-stack-app my-mern-app

Navigate into the generated project and start developing:

cd my-mern-app
npm run dev

Features & Architecture Highlights

Frontend (/web)

  • React 18 + Vite – Lightning-fast HMR and optimized production bundling.
  • TailwindCSS v4 & shadcn UI – Pre-configured modern styling system with clean UI primitives (Button, Badge, etc.).
  • React Router 6 – Declarative client-side routing.
  • Configured Axios Client – Ready-to-use API instance with baseURL and credential handling.
  • Pre-built Custom Hooks – Includes useHealth hook for server status checking.

Backend (/api)

  • Modular Express Architecture – Clean separation of concerns:
    • controllers/ – Request handling & response serialization.
    • services/ – Core business logic.
    • routes/ – Modular route definitions (/api/health, /api/users).
    • models/ – Mongoose database schemas (User model included).
    • middleware/ – Centralized error handler and CORS setup.
    • config/ – Resilient MongoDB connection handling with graceful fallback.
  • Developer Experience – Nodemon live reload and clean Morgan HTTP logging.

Monorepo Orchestration

  • Concurrently – Run frontend and backend servers concurrently with a single command (npm run dev).
  • Automated Environment Setup – Automatically configures .env from .env.example templates during scaffolding.
  • Zero-Dependency Interactive CLI – Beautiful banner, interactive prompts, and validation.

CLI Options & Flags

| Flag | Shorthand | Description | Default | |---|---|---|---| | --install | -i | Automatically installs dependencies for root, API, and web | Prompted | | --no-install | | Skips dependency installation | False | | --yes | -y | Accepts all default options non-interactively | False | | --version | -v | Outputs current CLI version | | | --help | -h | Displays CLI usage instructions | |

Automated Non-Interactive Example

npx @yes20sh/create-mern-stack-app my-app --install -y

Scaffolding Structure

my-mern-app/
├── api/                           # Express Backend
│   ├── src/
│   │   ├── config/                # Database connection & configurations
│   │   │   └── db.js              # Resilient MongoDB connector
│   │   ├── controllers/           # HTTP Request handlers
│   │   │   ├── healthController.js
│   │   │   └── userController.js
│   │   ├── middleware/            # Custom middlewares
│   │   │   └── errorMiddleware.js # Global error handler
│   │   ├── models/                # Mongoose database models
│   │   │   └── User.js            # User schema
│   │   ├── routes/                # Express router endpoints
│   │   │   ├── healthRoutes.js
│   │   │   ├── userRoutes.js
│   │   │   └── index.js           # Route aggregator
│   │   ├── services/              # Business logic layer
│   │   │   ├── healthService.js
│   │   │   └── userService.js
│   │   ├── app.js                 # Express application setup
│   │   └── server.js              # Server entry point
│   ├── .env                       # Backend environment variables
│   ├── .env.example               # Example backend environment variables
│   ├── .gitignore
│   └── package.json
│
├── web/                           # React + Vite Frontend
│   ├── src/
│   │   ├── api/                   # Axios client & custom hooks
│   │   │   ├── axios.js           # Configured Axios instance
│   │   │   └── health.js          # Health check API hook
│   │   ├── components/            # Reusable UI components & shadcn UI
│   │   │   └── ui/
│   │   │       ├── badge.jsx
│   │   │       └── button.jsx
│   │   ├── pages/                 # React page views
│   │   │   └── Home.jsx           # Landing page
│   │   ├── App.jsx                # Router & root layout
│   │   ├── index.css              # Global styles & Tailwind
│   │   └── main.jsx               # React DOM entry point
│   ├── .env                       # Frontend environment variables
│   ├── .env.example               # Example frontend environment variables
│   ├── vite.config.js             # Vite configuration
│   ├── components.json            # shadcn UI configuration
│   ├── .gitignore
│   └── package.json
│
├── package.json                   # Root monorepo orchestration
├── .gitignore
└── README.md

Environment Variables

Backend (api/.env)

PORT=5000
MONGO_URI=mongodb://localhost:27017/my-mern-app
NODE_ENV=development
WEB_URL=http://localhost:5173

Frontend (web/.env)

VITE_API_URL=http://localhost:5000/api

Available Scripts (In Generated Project)

Inside your generated project, you can run:

| Command | Description | |---|---| | npm run dev | Runs both backend (port 5000) and frontend (port 5173) concurrently | | npm run dev:api | Starts only the Express API with nodemon | | npm run dev:web | Starts only the Vite React development server | | npm run build | Builds the React frontend for production (web/dist) | | npm run start | Runs the production API server | | npm run install:all | Installs dependencies for root, api/, and web/ |


Author

Yashraj Singh Solanki


License

This project is licensed under the MIT License.