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

@cyvest/cyvest-vis

v5.1.2

Published

React components for visualizing Cyvest investigations using React Flow + D3 force layouts.

Readme

@cyvest/cyvest-vis

React components for visualizing Cyvest investigations using React Flow + D3 force layouts.

Features

  • Two visualization modes: Observables graph (force-directed) and Investigation graph (hierarchical Dagre layout)
  • Interactive force simulation: Drag nodes, adjust forces in real-time
  • Professional SVG icons: Clean icons for all observable types (IPs, domains, emails, files, threats, etc.)
  • Level-aware styling: Nodes colored by security level (SAFE, INFORMATIVE, SUSPICIOUS, MALICIOUS)
  • Responsive design: Works at any size with zoom, pan, and minimap controls
  • Uses @cyvest/cyvest-js for types, colors, and graph data extraction

Installation

pnpm install          # from repo root
pnpm --filter @cyvest/cyvest-vis build

Run tests:

pnpm --filter @cyvest/cyvest-vis test

Usage

Basic Usage

import { CyvestGraph } from "@cyvest/cyvest-vis";
import type { CyvestInvestigation } from "@cyvest/cyvest-js";

function InvestigationView({ investigation }: { investigation: CyvestInvestigation }) {
  return (
    <CyvestGraph
      investigation={investigation}
      height={600}
      showViewToggle
      onNodeClick={(id) => console.log("Selected:", id)}
    />
  );
}

Components

CyvestGraph

Main component with toggle between Observables and Investigation views.

<CyvestGraph
  investigation={investigation}
  height={600}
  width="100%"
  initialView="observables"  // or "investigation"
  showViewToggle={true}
  onNodeClick={(nodeId) => {}}
/>

ObservablesGraph

Force-directed graph showing all observables and their relationships.

import { ObservablesGraph } from "@cyvest/cyvest-vis";

<ObservablesGraph
  investigation={investigation}
  height={600}
  width="100%"
  showControls={true}  // Show force layout controls
  forceConfig={{
    chargeStrength: -200,
    linkDistance: 80,
    collisionRadius: 45,
  }}
  onNodeClick={(nodeId) => {}}
  onNodeDoubleClick={(nodeId) => {}}
/>

InvestigationGraph

Hierarchical graph showing root → tags → checks structure.

import { InvestigationGraph } from "@cyvest/cyvest-vis";

<InvestigationGraph
  investigation={investigation}
  height={600}
  width="100%"
  onNodeClick={(nodeId, nodeType) => {
    // nodeType: "root" | "check" | "tag"
  }}
/>

Custom Icons

Access icon components for custom UIs:

import { getObservableIcon, getInvestigationIcon, GlobeIcon, MailIcon } from "@cyvest/cyvest-vis";

// Get icon by observable type
const Icon = getObservableIcon("ipv4-addr"); // Returns GlobeIcon
<Icon size={24} color="#3b82f6" />

// Or use icons directly
<GlobeIcon size={16} color="currentColor" />
<MailIcon size={16} color="#ef4444" />

Available icons: GlobeIcon, DomainIcon, LinkIcon, MailIcon, EnvelopeIcon, FileIcon, HashIcon, UserIcon, IdCardIcon, GearIcon, AppIcon, RegistryIcon, ThreatActorIcon, BugIcon, SwordIcon, TargetIcon, AlertIcon, FlaskIcon, CertificateIcon, WifiIcon, WorldIcon, QuestionIcon, CheckIcon, TagIcon, CrosshairIcon

Types

import type {
  CyvestGraphProps,
  ObservablesGraphProps,
  InvestigationGraphProps,
  ForceLayoutConfig,
  ObservableNodeData,
  InvestigationNodeData,
  InvestigationNodeType,
} from "@cyvest/cyvest-vis";

Force Layout Configuration

interface ForceLayoutConfig {
  chargeStrength: number;   // Repulsion strength (default: -200)
  linkDistance: number;     // Target link distance (default: 80)
  centerStrength: number;   // Center pull strength (default: 0.05)
  collisionRadius: number;  // Node collision radius (default: 45)
  iterations: number;       // Iterations for static layout (default: 300)
}

Peer Dependencies

  • React 19+
  • React DOM 19+

License

See repository root for license information.