TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: I made a tool to build a map of your code

1 pointsby zknillover 2 years ago

2 comments

zknillover 2 years ago
Hi, I’m Zak. I built <a href="https:&#x2F;&#x2F;packagemap.co" rel="nofollow">https:&#x2F;&#x2F;packagemap.co</a> to see how cohesive&#x2F;coupled code was.<p>I do a bunch of code review, particularly in github. The code review UI is great, but I found that I was only reviewing the content of the files. I was missing how those files fit together. I found it hard to see from a file-tree, in an IDE or in Github code review, how the types are used across an application.<p>As the applications I reviewed got larger, I wanted to check if the code was being packaged by domain — to be cohesive. I wanted to check that the code that is related to each other is in the same package, and that there were few cross-package imports.<p>To solve the problems I had with code review, and to see how code fits together, I built <a href="https:&#x2F;&#x2F;packagemap.co" rel="nofollow">https:&#x2F;&#x2F;packagemap.co</a>. Packagemap is made of two parts. The first part is a java parser (hopefully other languages to come) that builds an AST of your code, to work out which classes are using which other classes. The parser runs on your machine, so the source files stay on your machine. The second part is the <a href="https:&#x2F;&#x2F;packagemap.co" rel="nofollow">https:&#x2F;&#x2F;packagemap.co</a> site. On the site you can filter and explore the “maps” (directed graphs of the code’s imports).<p>You can filter and explore maps by prefix, like “com.example.package” or by wildcard “*.package.MyClass”<p>You can play with the example here: <a href="https:&#x2F;&#x2F;packagemap.co&#x2F;map&#x2F;f8bbec2a-d7e7-459e-b08e-ea813bb0deb5" rel="nofollow">https:&#x2F;&#x2F;packagemap.co&#x2F;map&#x2F;f8bbec2a-d7e7-459e-b08e-ea813bb0de...</a>
Qtips87over 2 years ago
There is a tool that do something similar but I think it is a desktop app.<p><a href="https:&#x2F;&#x2F;www.ndepend.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ndepend.com&#x2F;</a>