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

@pattern-js/mod-docs

v0.2.2

Published

Self-reflecting documentation for Pattern apps: a markdown-first docs app at /docs (admin's visual language, reading-first) where every installed mod — first or third party — contributes its own chapter, the op reference is generated from the live registr

Readme

@pattern-js/mod-docs

Self-reflecting documentation for Pattern apps. A markdown-first docs app at /docs — the admin's visual language, tuned for reading — where every installed mod contributes its own chapter, first or third party: install a mod, its docs appear; the markdown ships inside the npm package, so what you read always matches the version you run.

// pattern.config.json
{ "mods": ["@pattern-js/mod-docs"] }

What you get

  • The Pattern handbook — concepts + guides (create an app, projects & mods, authoring ops, identity, agents & chat, the admin), shipped with this package.
  • A generated op reference (/docs/ops) — rendered from the LIVE registry of your installation: ports, config schemas, contributing mod, used-by. Hand-written "when to use" prose merges in via the ops/<op.type>.md convention. The signatures can't go stale; they're never written down.
  • Installed mods (/docs/mods) — what each mod actually contributed.
  • Live workflow embeds — a ```workflow fence containing workflow JSON renders as a real read-only graph (lazy-loaded; reading stays light).
  • ⌘K search across every chapter + the op reference.
  • /docs/llms.txt — the whole doc set as one markdown body for agent readers, plus a raw .md view per page.

Extending (any mod, including yours)

export default defineMod({
  name: "my-mod",
  docs: { filesystem: "my-mod-docs", title: "My Mod", order: 50 },
  setup(engine) {
    const dir = fileURLToPath(new URL("../../docs", import.meta.url));
    if (existsSync(dir)) provideFilesystem(engine, "my-mod-docs", localFs(dir));
  },
});

Nav derives from frontmatter (title: / order:); ops/<op.type>.md files become the op reference's prose. Full recipe: the handbook's "Extending these docs" page.

Options

| option | default | meaning | |--------|---------|---------| | mount | "/docs" | URL prefix (UI + API) | | requireAuth | { env: "DOCS_REQUIRE_AUTH" } | unset/false = public docs; true/scope list gates everything but /docs/api/me | | adminMount | "/admin" | for "open in admin" links (shown only to readers whose admin probe succeeds) | | loginRequestPath | "/auth/magic-link/request" | the sign-in card's endpoint when gated | | assets / content | bundled | override the SPA assets / handbook content dirs | | cache | true | memoize nav/search/llms per process; set false while writing docs |