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

moducreate-jpz

v2.0.0

Published

A beginner-friendly CLI that creates feature folders inside existing Express, MERN, Laravel, and LaraVue layer folders.

Readme

moducreate-jpz

moducreate-jpz organizes feature files inside your existing layer folders.

It works with Express, MERN, Laravel, and LaraVue projects without forcing a new top-level modules folder.

What It Does

  • Detects your project type automatically.
  • Scans existing files and groups them by module (default behavior).
  • Moves matched files into feature subfolders inside current layer folders.
  • Previews import and namespace path updates during dry runs.
  • Updates relative and configured alias imports after files are moved.
  • Updates Laravel PHP namespaces and use statements after PHP classes are moved.
  • Removes empty legacy modules or features folders after successful moves.
  • Keeps your existing project layout.

Example

Before:

backend/src/controllers/health.controller.ts
backend/src/services/health.service.ts
frontend/src/components/HealthStatus.tsx

After:

backend/src/controllers/health/health.controller.ts
backend/src/services/health/health.service.ts
frontend/src/components/health/HealthStatus.tsx

Quick Start

Run a safe preview first:

npx moducreate-jpz --dry-run

Use CI-friendly check mode:

npx moducreate-jpz --check

Apply changes:

npx moducreate-jpz

Create folders manually for selected modules:

npx moducreate-jpz --type express --modules auth,user

Templates

Sample projects live under templates/<stack>.

  • before: flat/mixed project files with multiple modules and import callers.
  • after: expected structure after running npx moducreate-jpz.

Copy a before folder to a temporary location before running the CLI so the original sample stays unchanged.

Important Commands

npx moducreate-jpz
npx moducreate-jpz --dry-run
npx moducreate-jpz --check
npx moducreate-jpz --copy-existing
npx moducreate-jpz --type mern --dry-run
npx moducreate-jpz --type laravel --modules auth,user

Important Options

  • -t, --type <type>: Set project type (express, mern, laravel, laravue) when auto-detection is not correct.
  • -m, --modules <list>: Create module folders manually using comma-separated names like auth,user,booking.
  • --check: Preview changes and exit with code 1 when modularization is still needed.
  • --dry-run: Show the full preview without writing files.
  • --copy-existing: Copy existing matched files into module folders instead of moving.
  • --move-existing: Move existing matched files into module folders (default).
  • --folders-only: Create only folders, without starter files.
  • --force: Overwrite existing target files.

Supported Stacks

  • Express API
  • MERN (client/server or frontend/backend layouts)
  • Laravel
  • LaraVue

Safety Notes

  • A preview is shown before writing changes, including import and namespace updates.
  • Move operations run automatically after the preview unless you use --dry-run or --check.
  • Relative JavaScript, TypeScript, Vue imports, and common tsconfig/jsconfig/Vite aliases are updated after moved files land in their new folders.
  • Laravel PHP namespaces and use statements are updated when classes move under module folders.
  • Existing target files are skipped unless --force is used.
  • Dry run mode makes no file changes.

Development

npm install
npm test
npm run build
npm run dev -- --dry-run --type express --modules auth,user