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

next-stacker

v1.0.0

Published

Interactive CLI to scaffold Next.js with FSD, shadcn, and optional library packs

Readme

next-stacker

Interactive CLI that scaffolds a Next.js project and layers your tooling on top: extra npm packages, optional Feature-Sliced Design (FSD) layout, VS Code folder-templates, shadcn/ui, and post-setup steps (tw-merge helpers, moving shadcn UI into 4_shared, import rewrites).

What it does

  1. Runs the official create-next-app@latest (always current upstream behavior).

  2. Lets you pick optional libraries from a curated list (packs.js) and runs npm install in batches (prod vs dev).

  3. Optionally copies an FSD template from teamplates/fsd into the new project root.

  4. Optionally create in VS Code workspace settings from teamplates/vscodeComponentsTeampalate into the new project (merges with overwrite: true). That file configures the Fast Folder Structure extension (folderTemplates.*). In VS Code, the “Component Template” preset creates a folder with this layout (<FTName> = name you enter, e.g. Button):

    <FTName>/
    ├── index.ts
    ├── <FTName>.tsx
    ├── <FTName>.hooks.ts
    └── <FTName>.types.ts

    Example for Button:

    Button/
    ├── index.ts
    ├── Button.tsx
    ├── Button.hooks.ts
    └── Button.types.ts

    Templates for each file live in settings.json under folderTemplates.fileTemplates; edit them there or add more folderTemplates.structures entries if you need other scaffolds.

  5. Optionally runs npx shadcn@latest init in the project.

  6. If FSD was applied and shadcn ran, runs post-integration: copies teamplates/ifTwMergeClsxCva into 4_shared/lib/utils, relocates components/ui4_shared/components/shadcn, rewrites default shadcn import paths, removes legacy components/ and default lib/ folders.

Session choices are tracked in lib/stackerState.mjs for extension and debugging.

Library presets (packs.js)

Optional packs you can toggle in the CLI (each runs as one npm install batch; dev vs prod follows isDev):

| Title | Pack id | Packages installed | |--------|---------|-------------------| | next-themes | next-themes | next-themes | | React Hook Form + Zod + resolvers | react-hook-form-zod-resolvers | react-hook-form, zod, @hookform/resolvers | | Zustand | zustand | zustand | | TanStack Query | tanstack-query | @tanstack/react-query | | Day.js | dayjs | dayjs | | tailwind-merge + clsx + CVA | twMergeClsxCva | clsx, tailwind-merge, class-variance-authority |

All current packs are production dependencies (isDev: false). Edit packs.js to add or change presets.

Source repository

Run with npx

You can run it without cloning:

npx next-stacker

(Exact npx syntax for Git may vary by npm version; cloning and npm install && npm start is always reliable.)

Local development (this repo):

npm install
npm start
# or, after npm link / global install:
next-stacker

The CLI entry is declared in package.jsonbin and points to index.mjs (with a Node shebang). Run the command from the directory where the new project folder should be created (the CLI creates <folder-name>/ under the current working directory).

Stack

Project layout

| Path | Role | |------|------| | index.mjs | CLI entry | | packs.js | Library “packs” (id, title, install line, dev flag) | | pipes/ | Steps: createNextApp, addLibs, useFSDvers, addShadcn, fsdPostIntegrate, VS Code template | | lib/ | stackerState.mjs, projectDependencies.mjs, multiselect helper | | teamplates/ | FSD, tw-merge, VS Code snippets, etc. |

Requirements

  • Node.js with ESM support (index.mjs uses import).
  • npm / npx available on PATH.

License

MIT