Skip to content

Instantly share code, notes, and snippets.

@StevenFarberov
StevenFarberov / mermaid-showcase.md
Last active February 27, 2026 22:57
Mermaid Diagram Showcase — Diagram types visualizing an Online Bookstore

Mermaid Diagram Showcase — Online Bookstore

Every diagram below visualizes a different aspect of the same fictional Online Bookstore system.


1. Flowchart

Order processing flow with color-coded components.

$VERBOSE = nil
require 'json'
require 'date'
CMD_LINE_ARGS = Hash[ ARGV.join(' ').scan(/--?([^=\s]+)(?:=(\S+))?/) ]
DEFAULT_RECENCY = 2 # Days
def get_changed_files(change_json)
current_ps_data = change_json['currentPatchSet']