Sirena Documentation

Welcome to Sirena, a pure Ruby Mermaid diagram rendering library that converts Mermaid syntax into SVG diagrams. Built for server-side rendering, Sirena provides native integration with Ruby applications without requiring Node.js or browser dependencies.

Why Sirena?

Pure Ruby Implementation

  • No Node.js dependencies

  • No Puppeteer/Chrome requirements

  • Simpler deployment in Ruby environments

  • Callable directly from Rails, Jekyll, and any Ruby application (no dedicated integration layer built yet)

No Browser Dependency

  • No headless browser launch required

  • Suitable for serverless environments

  • A dated Apple M2 comparison run and its reproduction commands are published in the Performance Benchmark report; memory was not measured, and the report does not generalize one machine’s timings

Diagram Support

  • 24 diagram types registered (compatibility varies by type; see the compatibility page)

  • Mermaid.js syntax as input (parity varies by type; see the compatibility page)

  • YAML theming with 4 built-in themes

  • Self-contained SVG output

Quick Start

# Basic usage
require 'sirena'

svg = Sirena.render(<<~MERMAID)
  graph TD
    Start --> End
MERMAID

puts svg

See Getting Started Tutorial for complete installation and usage instructions.

Documentation Structure

Core Topics

Compatibility and comparison pages.

Tutorials

Step-by-step guides to help you get started and accomplish specific tasks.

Guides

Installation, quick start and the CLI reference.

Diagram Types

Complete reference for all 24 diagram types with syntax and examples.

Features

Detailed documentation of Sirena’s unique features and capabilities.

References

CLI reference and compatibility lookup.

Supported Diagram Types

Sirena registers 24 diagram types that read Mermaid.js syntax (parity varies by type; see the compatibility page):

Type Use Case

Flowchart

Process flows and directed graphs

Sequence

Message interactions over time

Class

Object-oriented class structures

State

State machines and transitions

ER Diagram

Database entity relationships

User Journey

User experience mapping

Git Graph

Repository history visualization

Pie Chart

Proportional data visualization

Gantt Chart

Project timeline planning

Quadrant

Priority/complexity matrices

Requirement

Requirements traceability

C4

Software architecture (Context, Container, Component, Code)

Mindmap

Hierarchical idea organization

Timeline

Historical event visualization

Sankey

Flow quantity visualization

XY Chart

Data point plotting

Block

Component relationships

Architecture

System architecture views

Kanban

Workflow board visualization

Radar

Multi-dimensional data comparison

Packet

Network packet structure

Treemap

Hierarchical data as nested rectangles

Info

Information display

Error

Error message display

See the complete Diagram Types Reference for detailed syntax and examples.

Key Features

  • Theme System: YAML-based theming with 4 built-in themes (default, dark, light, high_contrast)

  • Batch Processing: Built-in batch renderer for documentation sets

  • Ruby Integration: Call Sirena.render directly from Rails, Jekyll, or any Ruby application; no dedicated Rails helpers or Jekyll plugin exist yet

  • Parslet Parsing: Grammar-based parsing; parse errors report line and column

  • SVG Output: Scalable vector graphics, self-contained

Compatibility & Comparison

Sirena reads Mermaid.js syntax in a pure Ruby implementation; how much of each type’s real-world input it handles is measured on the compatibility page.

Getting Help

License

Sirena is open source under the BSD-2-Clause license.


Back to top

Copyright © 2025 Ribose. Sirena is open source under the BSD-2-Clause license.

This site uses Just the Docs, a documentation theme for Jekyll.