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

@sahil5261/create-mern-crud

v2.0.4

Published

CLI to scaffold a MERN CRUD app: React+Vite+Router+Redux Toolkit+Tailwind, Node+Express+Mongoose with services/controllers/routes/models/middleware, async handler, centralized error handling, env config

Readme

create-mern-crud

A CLI that scaffolds a complete, working MERN CRUD app in one command — React + Vite + React Router + Redux Toolkit + Tailwind CSS on the frontend, Node + Express + MongoDB/Mongoose on the backend, with a proper services → controllers → routes layered structure, centralized error handling, and toast notifications already wired up. Optional add-ons: Redis and a full Stripe Checkout + webhook payment flow.

Usage

npx @your-npm-username/create-mern-crud my-app

or run it with no project name and answer the prompt:

npx @your-npm-username/create-mern-crud

You'll be asked:

? Project name: my-app
? Name of your CRUD resource? (e.g. Item, Product, Task) Item
? Set up Redis (optional cache / session store, not wired into any route)? (y/N)
? Set up payment gateway (Stripe Checkout + webhook)? (y/N)
? Install dependencies now? (Y/n)

Then:

cd my-app/server && cp .env.example .env   # fill in MONGO_URI
npm install && npm run dev

cd my-app/client
npm install && npm run dev

What you get

  • CRUD resource named whatever you typed (arbitrary input is sanitized into a safe identifier — simple-crud becomes SimpleCrud), with full Create/Read/Update/Delete wired end-to-end: Mongoose model → service layer → controller (throws a standard ApiError) → Express router → Redux Toolkit slice → React components.
  • Centralized error handling — every thrown ApiError(statusCode, message) is caught by one Express error-handling middleware, so the HTTP status code you get back always matches what was actually thrown.
  • Toasts — success and error notifications, top-right, via react-hot-toast.
  • Redis (optional) — an ioredis client in server/config/redis.js, ready to import for caching or rate-limiting. Not wired into any route by default, so declining it removes the file and dependency cleanly.
  • Payments (optional) — Stripe Checkout Session creation + a signature-verified webhook that persists payment status to MongoDB via a Payment model. See the generated project's own README.md for full local-testing instructions (Stripe test keys, the Stripe CLI for local webhook delivery, test card numbers) — webhooks specifically need that setup since localhost isn't reachable from Stripe's servers on its own.

Full docs

Once generated, my-app/README.md documents the exact stack, folder structure, API routes, and (if enabled) the complete payment testing walkthrough for that specific project.