// 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.

// verdict

## // verdict

Should I adopt this? Use it to see a project's shape, not to enforce anything.

What it actually is. A client-side parser that builds a graph from your repo's imports and renders it as a clickable, zoomable visualization. Everything stays in the browser; no upload, no backend, no model inference.

Use it when you're joining a codebase and want a structural map in the first ten minutes, or when a PR review needs a quick "what actually depends on this module" sanity check.

Don't rely on it when the decision is significant — it covers static imports and follows the language's common import forms, but dynamic imports, runtime-constructed module paths, certain package-manager workspaces, and monorepo symlinks can render as gaps or separate components rather than connected nodes. An "everything looks disconnected" graph usually means the parser missed a resolution path, not that the code is actually decoupled.

For supply-chain or license decisions, use a dedicated tool (npm ls, pipdeptree, SCA tooling) — this visualizer is oriented to structure, not to version or provenance metadata.

Bottom line: fast, private, genuinely useful for orientation and dependency sanity checks. It is a visual map, not an analysis engine — treat gaps as tool limits, not code properties.