nodeq-mindmap
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:
- Go —
packages/go/—MindMapNode,PipelineEngine,JsonSchemaAdapteras a Go module - Python —
packages/python/—MindMapNode,PipelineEngine,JsonSchemaAdapteras Python dataclasses
These ports implement the same data structures and pipeline logic without the D3 visualization layer.
License
MIT
Metadata
Release files for nodeqmindmap 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nodeqmindmap-2.3.0.tar.gz | 10.8 kB | Without provenance | Details for nodeqmindmap-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nodeqmindmap-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for nodeqmindmap-2.3.0-py3-none-any.whl |
Total release size: 20.4 kB
Release files / nodeqmindmap-2.3.0.tar.gz
| Download URL | nodeqmindmap-2.3.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30d00b1d416f6b97c20370ed0d04c766821de157d56d903a5758268a9a3ca49f
|
|
BLAKE2b-256 checksum How to use checksums |
27650ea9bdab9d73cc5f58902d44bf2a9356ed44d851638f18ebab69426c9f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / nodeqmindmap-2.3.0-py3-none-any.whl
| Download URL | nodeqmindmap-2.3.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55e7da192b7fe4ddc9875f77994bcc2b0b818365c741fc8504c6ccaab7c2f9fe
|
|
BLAKE2b-256 checksum How to use checksums |
cdc27e221b0f8fba6bbdc57a9649262c345d428dceca947580163c0f8d25ac7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for nodeqmindmap 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.