// dep-graph visualize

Paste multi-file source code and get an interactive force-directed dependency map. The parser resolves Python, JS/TS,Rust, and Go imports, then flags circular dependencies, orphan modules, and tightly coupled clusters. Everything runs locally in your browser — no code ever leaves the page.

// demos
idle
drag nodes · scroll to zoom · drag background to pan · double-click background to re-layout
cycle participantorphan moduledense clustercommunityisolated
modules0
edges0
cycles0
orphans0
mutual pairs0
coupling0

Circular Dependencies

No cycles detected.

Orphan Modules

No orphan modules — every module is reachable.

Tightly Coupled Clusters

No dense clusters detected.

Module Details

Click any node to inspect its dependencies.

// how-it-works

01

Multi-Language Parsing

Regex-based import resolvers cover Python (import x,from x import y, relative imports), JS/TS (import {a} from 'y',require('y'), dynamic import), Rust (use x::y;, mod x;), and Go (single and grouped import "x" blocks). File headers (# file: path) turn each pasted file into a graph node.

02

Force-Directed Layout

Nodes repel each other, edges act as springs, and a weak centering force keeps the graph balanced. ~150 physics iterations settle the layout. Nodes are draggable, the canvas zooms with the wheel and pans by dragging the background.

03

Cycle & Orphan Detection

Tarjan's algorithm finds strongly connected components; simple cycles are enumerated inside each component and listed as a → b → a. Orphan modules — declared but never imported and importing nothing — are flagged in amber.

04

Cluster Analysis

Mutual-dependency pairs seed dense-cluster detection (every member has ≥2 internal edges), while label-propagation communities color the whole graph. A coupling score (0–100) summarizes overall architectural entanglement.