An interactive visualization tool for exploring the Ruby on Rails 8.0 framework internals. Created for the conference talk "Reading Rails: A Visual Walkthrough of the Source Code".
Visit Rails Visual Explorer
This tool helps developers:
- Understand Rails architecture through visual exploration
- See component relationships and dependencies
- Navigate the framework structure interactively
- Learn Rails internals in an intuitive way
- Force-directed graph showing all Rails gems and their dependencies
- Special visual treatment for key components:
- Railties (hexagon) - the coordinator
- ActiveSupport (rectangle) - the foundation
- Rails (large circle) - the umbrella gem
- Click to explore - drill down into components
- Zoom and pan for navigation
- Drag nodes to rearrange
- Component descriptions and statistics
- Lines of code metrics
- Key modules and classes
- Dependencies and dependents
- Direct GitHub links
- Keyboard shortcuts:
1
- Overview of all gems2
- Focus on ActiveRecord3
- Focus on ActionPack4
- Focus on RailtiesF
- Toggle fullscreenP
- Presentation mode (hide UI)ESC
- Return to overview
- Quick search for Rails components
- Filter by name or description
- Click to jump to any component
- React - UI framework
- D3.js - Graph visualization
- Vite - Build tool
- GitHub Pages - Deployment
- Node.js 16+
- npm or yarn
- Clone the repository (private repo - requires access):
git clone [email protected]:betacraft/visual-rails.git
cd visual-rails/app
- Install dependencies:
npm install
- Start development server:
npm run dev
- Open http://localhost:5173 in your browser
npm run build
The repository is configured with GitHub Actions for automatic deployment.
Every push to the main
branch automatically triggers deployment to GitHub Pages.
If you need to deploy manually:
cd app
npm run build
npm run deploy
Ensure the following settings in your GitHub repository:
- Go to Settings → Pages
- Source: Deploy from GitHub Actions
- The site will be available at: https://betacraft.github.io/visual-rails/
The visualization uses pre-processed Rails 8.0 data stored in data/rails_structure.json
:
{
"version": "8.0.0",
"gems": [...],
"dependencies": [...]
}
- Node Shapes:
- Hexagon: Railties (coordinator)
- Rectangle: ActiveSupport (foundation)
- Circles: Other gems
- Colors: Each gem has a unique color based on its role
- Lines: Dependency relationships with varying thickness
This tool was created for the talk:
- Title: Reading Rails: A Visual Walkthrough of the Source Code
- Purpose: Demystify Rails source code through visualization
- Goal: Help developers move from using Rails to understanding Rails
Contributions are welcome! Please feel free to:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT License - feel free to use this in your own presentations and projects!
- Rails team for creating an amazing framework
- Conference organizers for the opportunity to share
- Community for feedback and contributions
For questions or feedback about this visualization tool, please open an issue on GitHub.
Made with ❤️ for the Rails community