Unlock the structure of your Ruby code with Rubrowser, an interactive visualizer that creates a directed force graph of your modules and classes. Easily generate a self-contained HTML file that highlights how your code connects. Perfect for enhancing documentation or analyzing dependencies in CI builds. Seamlessly uncover the relationships in your codebase!
Rubrowser is an innovative interactive visualizer designed specifically for Ruby code, including Ruby on Rails projects. This powerful tool analyzes the structure of your codebase, extracting module definitions, classes, and used modules, then visualizes this data in a directed force graph leveraging the D3.js library.
Key Features:
- Real-Time Execution Monitoring: Rubrowser can trace execution in real-time, allowing you to visualize the flow of your Ruby application as it runs.
- Interactive Graphs: The visual output is interactive; you can click and drag nodes to fix them in position, zoom, and pan with ease. Double-clicking a node will release it back to its original state.
- Enhanced Visibility: Highlight specific nodes and their related dependencies, facilitating a clearer understanding of class relationships and structures within your application.
- Customizable Layouts: Save and load layouts using JSON files, allowing for easy repositioning and organizing of classes/modules in the graph for future visualizations.
- Export Options: Easily export graph data as JSON for compatibility with external tools, providing flexibility in how you use your visualization data.
Usage Example:
To analyze your Ruby project, simply run:
rubrowser > output.html
This command will scan your current directory for Ruby files, generating a self-contained HTML visualization of your code structure. It's perfect for documenting your project's architecture and for onboarding new contributors.
Visual Output:
Rubrowser offers clear graphical representations of your code through visual outputs that can include examples such as:
| Gem | Visualization |
|---|---|
| rack-1.6.4/lib | ![]() |
| actioncable-5.0.0/lib | ![]() |
| railties-5.0.0/lib | ![]() |
Why Use Rubrowser?
Understanding the structure of a Ruby project can be daunting, especially when joining a new codebase. Rubrowser simplifies this process, allowing developers to visualize the relationships and dependencies between various components of their application. This makes it an essential tool for navigating open-source projects or any complex Ruby application.
By focusing on providing a clear and engaging visualization experience, Rubrowser empowers developers to gain insights into their code like never before.
No comments yet.
Sign in to be the first to comment.


