GLOSSARY

What Is a Dependency Graph?

A dependency graph is a model of a codebase in which each file or module is a node and each import or call is an edge. It shows what depends on what, which lets you trace how a change propagates and see which files are central to the system.

How it is built

A parser reads each file's imports and requires and resolves them to the files they point at. The result is a directed graph, usually with some cycles, that records every dependency relationship in the codebase.

Nodes with many incoming edges are hubs: a lot of the codebase depends on them, so a change to a hub has a wide blast radius and deserves extra review.

What it is used for

Change impact analysis, architecture review, and planning a decomposition — a service boundary should follow clusters that already exist in the graph rather than a line drawn on a whiteboard.

Common questions

What is a dependency graph in software?

It is a model of a codebase where files or modules are nodes and imports or calls are edges, showing what depends on what across the whole repository.

How do you generate a dependency graph for a codebase?

Parse each file's import and require statements, resolve them to their target files, and record each relationship as a directed edge between the two nodes.

What is a dependency hub?

A file or module that a large number of other files depend on. Changes to a hub propagate widely, so hubs are the highest-risk places to modify.

Related

  • Code map & dependency graphSee your codebase as a live dependency graph. Mapnostics maps every file, import and route, highlights the high-blast-radius hubs, and layers ownership, schema and performance patterns over the same canvas.
  • Impact simulatorSee what breaks before you ship it. Ask what a change affects in plain English and get the real blast radius — every dependent file, API route and page — traced from your actual dependency graph, not a guess.
  • Blast radius (in code) — glossary
  • Change impact analysis — glossary
  • Codebase intelligence — glossary

See it in your own codebase.

Analyze my codebase →

No credit card required · Free tier available