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

@aact/view

v3.0.1

Published

Local architecture workbench for aact — browser-based live viewer of the normalised C4 Model.

Readme

@aact/view

Browser-based live viewer for the C4 architecture model that aact parses. The Structurizr DSL / C4-PUML / model-json source you point aact check at is the source of truth; aact view renders it as an interactive graph that re-layouts every time you save the file.

Install

@aact/view is an optional companion package. Install alongside aact in the project you want to inspect:

npm install -D @aact/view
# or
pnpm add -D @aact/view

The core aact package detects @aact/view via dynamic import; no configuration plumbing.

Usage

npx aact view                    # uses aact.config.ts in cwd
npx aact view --port 4321        # pin port (defaults to 3000 with auto-fallback)
npx aact view --no-open          # skip auto-opening the browser
npx aact view --diff main:architecture.dsl

The console prints a URL with a per-session auth token:

▸ aact view ready at http://localhost:3000/?token=AbCd…
  watching ./architecture.dsl for changes (Ctrl-C to stop)

Open that URL. Saving the source file re-parses through aact-core and pushes the new model over WebSocket — the graph re-layouts in place.

--diff <baseline> loads the baseline once at boot (file path, git ref, or stdin with --diff-format) and keeps the current side live from aact.config.ts. The canvas colors changed nodes / relations; the right panel shows the diff summary, grouped architectural changes, and primitive changes.

What you see

The canvas follows the Simon Brown C4 reference palette (Person deep blue, System mid blue, Container lighter, Component lightest, externals neutral slate). Three view modes in the top bar:

  • Drill — classic C4 levels. Double-click a boundary to descend; breadcrumb walks back up.
  • Expand — toggle boundaries open inline; parents stay visible so cross-context interactions read in one frame.
  • Flat — every boundary expanded at once; read-only big-picture view.

Two more topbar toggles cover edge presentation:

  • Edge style — Curve / Smooth / Step. Personal preference, persisted in localStorage.
  • Edge filter — All / Cross-BC. In Cross-BC mode intra-boundary relations fade to background and inter-context interactions light up; useful when an API gateway has many fan-outs and you want to see which Bounded Contexts actually talk.

Hover a node to highlight only the edges incident to it; everything else dims. The right-side details panel shows the selected element / boundary's tags, technology, source location (clickable — opens your IDE), properties, and outgoing relations.

The full visual + interaction spec lives in DESIGN.md.

Live reload

A chokidar watcher debounces source changes by 80ms and coalesces in-flight reloads. When the parser fails (broken DSL syntax) the last good model stays on screen and the status pill flips to "error" with the parser message — restoring the file recovers via the next successful broadcast.

Protocol vs CLI ViewData

Two "view" shapes exist — keep them separate:

  • aact view's ViewData (the core aact package) is the --json envelope result of running the CLI command — a one-shot summary (port, URL, whether this companion was found).
  • @aact/view's ModelEnvelope is this package's live workbench protocol — the payload served at /api/model and pushed over /api/ws on every reload. It carries the normalized Model itself.

They are not interchangeable: the CLI envelope describes the command run, the workbench envelope streams the model. Don't conflate them.

Security

aact view listens on localhost only. Each session generates a 24-byte random auth token; /api/model and the /api/ws upgrade require it as either a query string parameter (first navigation) or a HttpOnly cookie (set on first HTML response). This stops random browser tabs / extensions on the same machine from reading your architecture graph or following vscode://file/... source links.

What it doesn't do

  • Editing. The viewer is read-only. Source DSL/PUML stays the authority; your IDE is the editor.
  • Per-user layout persistence. Positions are deterministic from the model — every re-parse re-runs ELK so the layout is reproducible across machines.
  • ArchiMate / Deployment view / UML / BPMN. C4 paradigm only, matching aact-core scope.

Known follow-ups

These are flagged but not built:

  • ELK in a worker — layout currently runs on the main thread. Sub-100ms on typical C4 models (V < 100), can take 300-500ms at V > 500. Canonical fix: ship elkjs/lib/elk-worker.min.js as a static asset via Vite ?url + new ELK({ workerUrl }) so ELK spawns its own sub-worker out of the main thread.
  • Search / filter by name.
  • Focus mode — pick a node, dim all non-1-hop-neighbours.
  • Export to SVG / PNG.

License

GPL-3.0, matching aact-core.