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

@ryanstark24/sfgraph-web

v1.1.8

Published

sfgraph local web visualiser — graph explorer for ingested orgs

Downloads

829

Readme

@ryanstark24/sfgraph-web

Local web visualiser for an ingested sfgraph org. Boots via sfgraph serve (or node dist/index.js from this package) and serves a 3D force-graph viewer plus a small REST surface against the per-org SQLite store.

What it does

  • Trace tab — neighborhood graph from a focal node; pairs with the trace_upstream / trace_downstream MCP tools when you want a visual companion to the markdown output.
  • Overview tab — top-level org topology: hubs by degree, layer counts, freshness signals.
  • Schema tab — SObject/field topology with references resolved across layers.
  • Render entire org button — hits /api/full for a full 3D force-graph of the ingested org. Obsidian-style auto-fading labels: top-N nearest nodes plus hubs stay labeled at any zoom.

Security model

  • Binds to loopback only by default (127.0.0.1:7777).
  • Non-loopback binds require the explicit --i-understand-public-bind flag on sfgraph serve. Without that flag, attempts to set --host 0.0.0.0 are rejected at startup.
  • No authentication. The viewer is intended for local-machine use only. If you opt into a public bind, you are responsible for putting it behind your own auth/firewall.
  • EADDRINUSE auto-recovery: if a stale sfgraph serve is already holding the port, it's terminated and the new one takes over.

Tech stack

  • Vanilla JS + 3d-force-graph + three.js.
  • No React, no bundler. The public/ directory is served as-is.
  • Server is a tiny Node HTTP listener that reads the per-org SQLite file. It does not write to the graph.

Running in dev

# From repo root
pnpm --filter @ryanstark24/sfgraph-web build
cd packages/web && node dist/index.js

# Or via the published CLI (after `pnpm -r build`)
sfgraph serve
sfgraph serve --no-open                 # don't open a browser
sfgraph serve --port 8123               # alternate port
sfgraph serve --i-understand-public-bind --host 0.0.0.0

Keyboard shortcuts

  • L — toggle always-show labels on every node
  • F — fit the graph to the viewport
  • Esc — close the open side panel / popover

REST endpoints

All endpoints are read-only.

| Path | Purpose | |---|---| | GET /api/orgs | List ingested orgs with last-sync timestamps | | GET /api/search?q=…&org=… | Type-ahead node search by qname/label | | GET /api/neighborhood?org=…&qname=…&hops=N | Subgraph around a focal node | | GET /api/overview?org=… | Hubs, layer counts, freshness buckets | | GET /api/full?org=… | Full org graph (nodes + edges) — backs "Render entire org" | | GET /api/schema?org=… | SObject / field topology | | GET /api/rel-types?org=… | Edge relationship-type catalogue |