
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
π― Comprehensive Rails Application Architecture Visualization Tool
Rails Flow Map is a powerful gem that analyzes your Rails application structure and generates beautiful, interactive visualizations to help understand architecture, dependencies, and data flow patterns.
Add to your Gemfile:
gem 'rails-flow-map'
bundle install
rails generate rails_flow_map:install
# Generate architecture overview
graph = RailsFlowMap.analyze
RailsFlowMap.export(graph, format: :mermaid, output: 'docs/architecture.md')
# Create interactive visualization
RailsFlowMap.export(graph, format: :d3js, output: 'public/architecture.html')
# Generate API documentation
RailsFlowMap.export(graph, format: :openapi, output: 'docs/api.yaml')
# Generate all visualizations
rake flow_map:generate
# Specific format
rake flow_map:generate FORMAT=mermaid OUTPUT=docs/flow.md
# Analyze API endpoint
rake flow_map:endpoint ENDPOINT=/api/v1/users FORMAT=sequence
graph TD
User[User] --> Post[Post]
User --> Comment[Comment]
Post --> Comment
UsersController --> User
PostsController --> Post
API[/api/v1/users] --> UsersController
Features: Zoom, drag, filter by component type, search functionality
openapi: 3.0.0
info:
title: Rails API Documentation
version: 1.0.0
paths:
/api/v1/users:
get:
summary: List all users
responses:
200:
description: Successful response
# config/initializers/rails_flow_map.rb
RailsFlowMap.configure do |config|
config.output_directory = 'doc/flow_maps'
config.exclude_paths = ['vendor/', 'tmp/']
config.default_format = :mermaid
end
RailsFlowMap.configure do |config|
# Analysis options
config.include_models = true
config.include_controllers = true
config.include_routes = true
# Performance options
config.streaming_mode = true
config.memory_limit = 512.megabytes
# Security options
config.sanitize_output = true
config.allow_system_paths = false
end
Format | Description | Best For | Output |
---|---|---|---|
mermaid | GitHub-friendly diagrams | Documentation, README | .md |
plantuml | Detailed UML diagrams | Technical documentation | .puml |
d3js | Interactive visualizations | Exploration, presentations | .html |
openapi | API specifications | API documentation | .yaml |
sequence | Request flow diagrams | API analysis | .md |
erd | Database schemas | Data modeling | .md |
metrics | Code quality reports | Code reviews, monitoring | .md |
graphviz | Network diagrams | Complex relationships | .dot |
name: Generate Architecture Docs
on: [push]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- run: bundle exec rake flow_map:generate_all
{
"label": "Generate Architecture Docs",
"type": "shell",
"command": "bundle exec rake flow_map:generate_all"
}
#!/bin/bash
bundle exec rake flow_map:diff > ARCHITECTURE_CHANGES.md
git add ARCHITECTURE_CHANGES.md
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/railsflowmap/rails-flow-map.git
cd rails-flow-map
bundle install
rake spec
# Run all tests
bundle exec rspec
# Run specific test
bundle exec rspec spec/rails_flow_map/formatters/mermaid_formatter_spec.rb
# Run with coverage
COVERAGE=true bundle exec rspec
Rails Flow Map is released under the MIT License.
β Star us on GitHub if Rails Flow Map helps your team! β
FAQs
Unknown package
We found that rails-flow-map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.