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

@forge-kit-dev/module-cqrs

v0.2.0

Published

CQRS mapping module for forge — entities layer is the read model, features layer owns commands.

Readme

@forge-kit-dev/module-cqrs

CQRS as an opt-in module. Precedence 30. Depends on @forge-kit-dev/module-fsd because the enforcement mapping relies on FSD's entities/ and features/ layers being real folders.

The forge mapping (one sentence)

entities/ is the read side, features/ is the write side.

Mechanical (block)

| Rule | What it enforces | |---|---| | @forge-kit-dev/forge/cqrs-layer-role | Every exported type under src/entities/** has readonly on every property, and no exported function in entities/ has a command-shaped name (create*, update*, delete*, submit*, save*, remove*, add*, reset*, patch*). |

The rule fires on the entities side because that is where violations are cheapest to detect. The symmetric "commands must be in features/" is already implicit: if a command-named function exists in shared/ or widgets/, FSD's own layer rules will flag it as a boundary violation.

Advisory (Evaluator)

  • r-cqrs-split — are read-side and write-side types distinct, and does every command declare how the read model will react to its success?

Skills

  • cqrs-read-model (generate stage) — readonly types, normalized shapes, no mutation methods in entities/
  • cqrs-command (generate stage) — action-named, input-typed, result-returning, sync-aware commands in features/

When this module is worth it

  • Your read side and write side have different shapes or different performance characteristics (e.g. an admin dashboard that lists normalized data but submits flat form payloads)
  • You use a cache layer like TanStack Query or Apollo that benefits from explicit mutation/invalidation separation
  • You need to explain to future contributors where to add a new mutation vs a new selector

When to skip it

For a 10-page CRUD app, CQRS is usually overkill. Fowler's original caution applies to forge as much as to backends: use sparingly. Forge's default CLI wizard therefore leaves this module off by default.