Skip to main content

Dependency graph

Two levels, both read out of the source. The packages and how they depend on each other; and, when you open one, what is inside it — its classes, functions and types, and how they reach each other.

Nothing here is drawn by hand: npm run atlas regenerates the model, the layout and the stylesheet from the sources, and npm run atlas:verify re-runs the crawl and fails if what is committed no longer matches the code.

:::caution atlas:verify runs — but only as part of release:check This page has been wrong about this gate twice. It first said atlas:verify "fails the build", which it did not, because nothing ran it. It then said it "is in no workflow, in no release:check, and in no other script", and that has stopped being true: atlas:verify is now the sixth step of release:check in the root package.json, and release:check is exactly what .github/workflows/ci.yml and .github/workflows/release.yml run. So a committed model that no longer matches the code does fail CI.

What is still true is that nothing narrower runs it. npm test, a lint pass or a docs build will not notice a stale crawl, so between full release:check runs the picture below is regenerated when someone last remembered to.

This was the sixth gate found written-but-uninvoked here, and the root package.json keeps the tally of the other five beside release:check, with the reason it keeps happening: "a gate that is written but never invoked looks identical, in a diff, to one that runs." graph:check and graph:verify were two of them and were wired into release:check on 2026-08-20 — but graph:verify regenerates package-graph.md, a different artefact, and does not touch this one. :::

:::caution The interactive view is not currently rebuildable @exodra/monorepo-atlas still produces all of the data — the crawl, the model, the geometry, the palette and graph.css. What it no longer produces is the browser half: createExplorer, createGraphView, mountExplorer and mountFromUrl built their trees on the renderer that has been deleted, and they went with it (packages/monorepo-atlas/src/index.ts). The bundle this page loads is the last one that was built, kept because a picture nobody can redraw is still better than no picture — but it will drift from the data until the view is re-authored on the schema core. The package's README states the shape of that job. :::

Loading the dependency graph…

Reading it​

  • Left to right is dependency order: a package sits to the left of what it needs.
  • Colour is the kind of thing, and the legend says which — it changes with the level, because inside a package the categories are class, function and type.
  • Dashed edges are import type: erased at build time, so they cost nothing at runtime.
  • Dotted edges are dynamic import() — a code-split boundary, not a load-time dependency.
  • Thickness is how many references stand behind an edge.
  • A red dashed ring marks a broken architecture rule; the panel names the rule and quotes the reason it exists.

Type a name in the box above the drawing to find it — everything that does not match steps back, and Enter goes to the first match. The arrow keys pan, + and - zoom, 0 fits it back in view and

Esc clears the selection. The address bar follows you, so a diagram you are looking at can be linked to.

Select anything to see the detail panel: for a package, what it depends on and what depends on it, with the individual imports behind each edge and whether package.json admits to them; inside a package, which declaration calls, constructs, extends or merely mentions which.

The rules behind it​

The layering is not a drawing convention — it is enforced. npm run graph:check fails the build when a package reaches somewhere it should not: core stays dependency-free, the two renderers never reference each other, and build-time tooling never leaks into the runtime.

In your own repository​

The same tool works on any TypeScript or JavaScript workspace. It reads the layout from package.json or pnpm-workspace.yaml, and picks up your dependency-cruiser rules if you have them:

npm i -D @exodra/monorepo-atlas
npx exo-atlas --out public/atlas

That writes the artefacts, and nothing else — see the caution above for what is missing:

public/atlas/graph.json model + layout
public/atlas/graph.css theme variables + structural rules
public/atlas/insides/index.json which packages have an inside worth opening
public/atlas/insides/<pkg>.json one per package

Every node carries its kind, its module count, the declarations it exports and the rules it breaks; every edge carries its weight, its kinds (value, type-only, dynamic), the evidence behind it and its violations. The layout gives each node a box and each edge a routed polyline, so a consumer can draw it without running a layout engine of its own.

Colours are yours: renderGraphCss() emits every mark's rules against CSS custom properties and ships defaults, so a stylesheet of your own is enough to make it look like your site.

.exo-graph {
--exo-kind-runtime: var(--your-primary);
--exo-surface: var(--your-surface);
}