// graph_engine v2.7.4 — production_ready

Build graphs
that reason,
render, scale.

A precision toolkit for force-directed layouts, dependency analysis, and interactive node-graph visualization. Drop into any stack. Render a million edges. Stay sane.

0.0001s per node WebGL2 + Canvas2D 17.4kb gzipped
scroll
02 /

The engine, dissected

Six interlocking primitives. No magic. Every layout you see assembled from a small alphabet of operations.

/01 force_simulation core

Force-directed in 4 lines

Velocity Verlet integration with adaptive timestep. Drag a node, watch the rest of the graph reorganize. The simulation never blocks the main thread — we run on a worker by default.

const g = graphers('#canvas')
  .nodes(data.nodes)
  .edges(data.edges)
  .simulate({ charge: -240 });
/02 layout

Layouts

  • force-directed
  • circular / arc
  • hierarchical (sugiyama)
  • radial / tree
  • grid / matrix
/03 render

Render targets

SVG for < 500 nodes. Canvas2D for < 50k. WebGL2 for the rest. Switch at runtime — we hot-swap the renderer without touching state.

/04 query cypher-ish

Query, traverse, mutate

A small declarative query language for selecting subgraphs. BFS, DFS, shortest-path, Tarjan SCCs and topological sort built in. Compose them like middleware.

// neighbors of "main" within 2 hops
g.match('(:fn {id:"main"})-[*1..2]-(n)')
 .highlight({ color: '#ff6b35' });
/05 export

Export

PNG, SVG, JSON, GraphML, DOT. Lossless round-trip with layout coordinates intact.

1.04M
edges rendered
at 60fps on M2
"It's the first graph library where I didn't have to write the layout myself. Everything just composes."
— senior engineer, infra team @ a logging company
03 /

In the wild

Hover any panel to wake the simulation. Drag the nodes. The edges are elastic.

case_01 dependency_graph

Dependency forensics

Visualize the full import graph of a monorepo. Detect cycles, find the package nobody imports, watch a refactor land in real time.

case_02

Knowledge graphs

Wire entities, relations, and timestamps. A first-class citizen for retrieval-augmented systems.

case_03

Network topology

SREs use it to map service meshes. Edges turn orange when latency spikes.

case_04 research

Citation networks & co-authorship

A research lab plugged 240k papers into the engine. Communities surfaced. Vertex Purple marks the cluster of self-citations.

04 /

Read the docs
like a manual

Documentation that respects your time. Concept page, API page, recipe page. Nothing else.

ch. 01

Quickstart

Install, mount, render. Eight minutes from zero to your first graph.

/docs/quickstart →
ch. 02

Data model

Nodes, edges, attributes, attributes-on-edges. The internal representation explained without lying.

/docs/data-model →
ch. 03

Layouts

Choose the right algorithm. Tune parameters. Understand the trade-offs of each force.

/docs/layouts →
ch. 04

Renderers

SVG vs Canvas vs WebGL. When to pick which. How to write your own.

/docs/renderers →
ch. 05

Recipes & patterns

Copy-paste solutions for the things you'll absolutely need: lasso selection, sticky nodes, exported PNGs with print resolution, server-side static rendering, custom edge bundling, hover overlays that don't fight your tooltip library.

/docs/recipes →
ch. 06

API reference

Every method, every option, every event. Generated from source. Stays current.

/docs/api →
05 /

House rules

01

The math is the contract.

Every layout is documented with the formula it implements. No black boxes. If you want to know why a node landed where it did, the answer is in the docs.

02

Performance is a feature.

We benchmark every release against the previous one. Regressions block the merge. The 60fps line is sacred.

03

Ship boring APIs.

Method names that read like English. No clever DSLs. The library should disappear into your code.

04

Composable over configurable.

Twelve small functions that compose beat one giant function with forty options. Every time.