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

nodeq-mindmap

v2.3.0

Published

Interactive D3.js mind map visualization library with ETL pipeline engine. Render career maps, org charts, or any hierarchical data — browser and Node.js CLI included.

Downloads

282

Readme

nodeq-mindmap

npm version License: MIT

Interactive D3.js mind map visualization library with a built-in ETL pipeline engine. Render career maps, org charts, or any hierarchical JSON data in the browser, and define data transformation pipelines in code.

Features

  • Universal JSON rendering — any JSON object is automatically converted to a mind map
  • Interactive — click to expand/collapse nodes, zoom, pan
  • Themeable — control colors, font, node size
  • Framework agnostic — works with React, Vue, Angular, or vanilla JS
  • ETL pipeline engine — define input/output schemas, track transformation rules, and execute pipelines in memory
  • Pipeline visualization — render an active pipeline as a mind map to explore its structure
  • CLI — generate SVG files from JSON on the command line (headless via jsdom)

Installation

npm install nodeq-mindmap

D3 v7 is a peer dependency:

npm install d3

Quick Start

Browser / bundler

import { NodeQMindMap } from 'nodeq-mindmap';

const map = new NodeQMindMap({
  container: '#my-container',   // CSS selector or HTMLElement
  data: {
    topic: 'Software Engineer',
    children: [
      { topic: 'Frontend', skills: ['React', 'TypeScript'] },
      { topic: 'Backend',  skills: ['Node.js', 'PostgreSQL'] },
    ]
  },
  width: 900,
  height: 600,
  onNodeClick: (node) => console.log(node.topic),
});

map.render();

Any JSON shape

JsonSchemaAdapter.convertToStandard() converts arbitrary JSON into the MindMapNode tree format before rendering:

import { NodeQMindMap, JsonSchemaAdapter } from 'nodeq-mindmap';

const raw = { name: 'My API', version: '2.0', routes: ['/users', '/posts'] };
const data = JsonSchemaAdapter.convertToStandard(raw);

new NodeQMindMap({ container: '#root', data }).render();

API

new NodeQMindMap(config)

| Option | Type | Default | Description | |---|---|---|---| | container | string \| HTMLElement | required | CSS selector or DOM element | | data | any | required | Hierarchical data (see MindMapNode) | | width | number | 800 | SVG width in px | | height | number | 600 | SVG height in px | | theme | Partial<Theme> | — | Colors, font, fontSize | | interactive | boolean | true | Enable click/hover | | zoomable | boolean | true | Enable pan/zoom | | collapsible | boolean | true | Click nodes to collapse | | onNodeClick | (node) => void | — | Click callback | | onNodeHover | (node) => void | — | Hover callback |

Instance methods

map.render()                    // Draw the mind map
map.updateData(data)            // Replace data and re-render
map.updateTheme(theme)          // Merge theme and re-render
map.exportSVG()                 // Return SVG markup string
map.destroy()                   // Remove SVG from DOM

// Pipeline helpers
await map.createDataPipeline(name, inputSample, outputSample, options?)
map.executePipeline(inputData)
map.getAllPipelines()
map.switchToPipeline(pipelineId)

MindMapNode shape

interface MindMapNode {
  topic: string;          // Node label (required)
  summary?: string;       // Subtitle shown in detail panels
  skills?: string[];      // Tag list
  children?: MindMapNode[];
}

Theme options

{
  nodeColor: string;       // default '#4299e1'
  textColor: string;       // default '#2d3748'
  linkColor: string;       // default '#a0aec0'
  backgroundColor: string; // default '#ffffff'
  fontSize: number;        // default 14
  fontFamily: string;      // default 'Arial, sans-serif'
}

Pipeline Engine

PipelineEngine is a standalone class for defining and running in-memory ETL pipelines. It does not require a browser.

import { PipelineEngine } from 'nodeq-mindmap';

const engine = new PipelineEngine();

const pipeline = await engine.createPipeline(
  'User ETL',
  { format: 'json', schema: { id: 'number', name: 'string' }, data: { id: 1, name: 'Alice' } },
  { format: 'json', schema: { userId: 'number', displayName: 'string' }, data: { userId: 1, displayName: 'Alice' } }
);

const result = engine.executePipeline(pipeline.id, { id: 2, name: 'Bob' });
// { processed: true, data: { id: 2, name: 'Bob' }, timestamp, pipelineId }

console.log(engine.generatePipelineCode(pipeline.id));
// Outputs a TypeScript function stub for the pipeline

PipelineEngine methods

createPipeline(name, inputSample, outputSample, options?)  // async, returns PipelineConfig
updatePipeline(id, inputSample?, outputSample?)            // async
executePipeline(id, inputData)                             // sync, returns result object
getPipeline(id)                                            // returns PipelineConfig | undefined
getAllPipelines()                                           // returns PipelineConfig[]
getPipelineStats(id)                                       // returns perf stats
generatePipelineCode(id)                                   // returns TS function stub

CLI

# Generate an SVG mind map from a JSON file
npx nodeq-mindmap generate -i data.json -o output.svg

# Create a pipeline definition from input/output samples
npx nodeq-mindmap create-pipeline -n "My ETL" -i input.json -o output.json

The generate command uses jsdom to run D3 headlessly — no browser required.

Ports

Server-side / language-specific ports of the data model and pipeline engine are available:

  • Gopackages/go/MindMapNode, PipelineEngine, JsonSchemaAdapter as a Go module
  • Pythonpackages/python/MindMapNode, PipelineEngine, JsonSchemaAdapter as Python dataclasses

These ports implement the same data structures and pipeline logic without the D3 visualization layer.

License

MIT