mberneti / ts-modularity
PublicA CLI tool that scans TypeScript projects and visualizes module boundaries as interactive diagrams.
ts-modularity is a code analysis tool that scans your TypeScript project, builds a visual map of how all your files connect to each other, groups them into logical clusters, and scores how well-organized each cluster is. It serves an interactive visualization in your browser with five different views (chord diagram, force graph, DAG layout, coupling matrix, and move suggestions) so you can see at a glance which parts of your code are tightly coupled and might need reorganizing. The tool also suggests specific files that could be moved to better locations, complete with one-click commands you can copy and run.
How It Works
As your project grows, you suspect some files are in the wrong places, importing from unexpected spots.
A single command scans all your TypeScript files and maps out every connection between them.
Colorful diagrams appear showing your code as interconnected clusters - you can finally see the structure.
See arcs and ribbons showing how clusters connect to each other
Watch clusters float and arrange themselves based on their relationships
Spot problems at a glance with a heatmap showing which clusters depend on each other
Each cluster gets a score showing how self-contained it is - green means healthy, red means tangled.
The tool recommends which files should move to different clusters, with confidence ratings.
Ready-to-use commands appear for moving files around - your refactoring path is crystal clear.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.