CodeBlocks

Understanding a strange codebase is faster as a picture.

Role
Design & build
When
2026
Stack
  • TypeScript
  • D3

The problem

Every codebase accumulates mystery files: things nothing imports anymore, things only reachable through dynamic imports, things everyone is afraid to delete. Reading your way to that knowledge takes hours. A picture takes seconds.

How it works

A CLI walks the repository with ts-morph and builds the full import graph — every file, every edge.
Each file gets classified: alive (imported somewhere), orphaned (nothing imports it), or ambiguous (only reachable dynamically — the ones that deserve a human look).
A browser visualizer lays the graph out with D3 — pan, zoom, and follow the edges to see what actually depends on what.
Worksheet: a dependency graph where filled squares are alive files, outlined squares are orphans, and dashed red squares are ambiguous