The vision is that it can be even more interactive using filters on the left, so you can select packs to include/exclude based on name, properties of packages, properties of the graph (ancestors/descendants), and more!
We actually built a similar internal dashboard using React force graph when we first adopted Packwerk—would love to see if Packwerk itself could just export a dependency graph artifact for generating these kinds of visualizations
That sounds cool, although I don’t see packwerk itself wanting to manage that complexity, but it does seem like an awesome candidate for a community maintained solution!
Although if we’re just talking exporting a dependency graph, it does have some APIs to get package and dependency information. We ended up just using parse_packwerk (link) for that since it is a simpler API. I actually had some Graph representations in there for a while but have since removed them.
I think there’s too much private information unfortunately, but the entire internal dashboard is based on the stuff Shopify shared about Wedge in this blog post
I’ve got a visualization tool built on top of cytoscape.js, which gives you some interactivity for free (zoom, pan, drag nodes, etc.). Here’s the base view of constant references (each node is a constant, the circles are constants defined in a given pack):
and here’s what it looks like when you layer a community detection algorithm on top (the big circles are autodetected communities based on which constants reference each other the most, and the colors are the packs to which the constants currently belong):
That’s amazing stuff. I’m excited for our community to collaborate on open-source, interactive software graph visualization tooling. If you wanted to upstream that to visualize_packwerk or another repo, please do I believe the community has plenty of room for different solutions to experiment with different approaches
I was actually looking to do some analysis on graphs like this (community detection is one avenue I was thinking of). Is the underlying graph data something you‘d be willing to share?
It‘s all pretty fancy, but I’m missing the connection to what matters day to day, which is how people work with the code. Layering change locality data somehow on top of dependency data could solve that.