Skip to content

baris-sinapli/mermaid-diagram

🌊 Mermaid GUI v2.0

Privacy-first, offline-capable Mermaid diagram generator for developers

License: GPL v3 Mermaid Tauri Svelte Rust Monaco

GitHub Stars GitHub Downloads GitHub Issues PRs Welcome Contributors

Privacy Offline Cross Platform Open Source

A modern, native desktop application for creating and editing Mermaid diagrams with real-time preview, Monaco editor integration, and powerful batch processing capabilities.

✨ Features

πŸ” Privacy-First Design

  • 100% Offline Operation - No internet required, no data leaves your machine
  • Local File Processing - All diagrams stay on your computer
  • Zero Telemetry - We don't track you, period

⚑ Developer Experience

  • Monaco Editor - Full-featured code editor with syntax highlighting
  • Live Preview - Real-time diagram preview with error detection
  • Smart Debouncing - Efficient preview updates without performance hits
  • Keyboard Shortcuts - Vim-like efficiency with modern UX

🎨 Modern Interface

  • Split-Panel Layout - Resizable editor and preview panes
  • Dark/Light Themes - Easy on the eyes, day or night
  • Responsive Design - Adapts to different screen sizes
  • Professional UI - Clean, intuitive interface

πŸš€ Power Features

  • Multiple Export Formats - PNG, SVG, PDF, JPG
  • Batch Processing - Process multiple diagrams at once
  • Recent Files - Quick access to your work
  • Error Handling - Helpful error messages and recovery

πŸ“Έ Screenshots

Dark Theme with Live Preview

πŸš€ Quick Start

Prerequisites

  1. Install Mermaid CLI (required for diagram generation):

    npm install -g @mermaid-js/mermaid-cli
  2. System Requirements:

    • Linux: Ubuntu 20.04+ / Fedora 35+ / Arch Linux
    • macOS: 10.15+ (Intel/Apple Silicon)
    • Windows: 10+ (x64)

Installation

Option 1: Download Release Binary

  1. Go to Releases
  2. Download the appropriate binary for your platform
  3. Run the installer or extract the archive

Option 2: Build from Source

# Clone the repository
git clone https://github.com/baris-sinapli/mermaid-diagram.git
cd mermaid-gui-v2

# Install dependencies
npm install

# Run in development mode
npm run tauri dev

# Or build for production
npm run tauri build

🎯 Usage

Basic Usage

  1. Launch the application
  2. Start typing Mermaid code in the left panel
  3. Watch the preview update in real-time on the right
  4. Generate diagrams with Ctrl+E or the Generate button

⌨️ Keyboard Shortcuts

Boost your productivity with these essential keyboard shortcuts:

Shortcut Action Description
Ctrl+N πŸ“„ New file Create a new Mermaid diagram
Ctrl+O πŸ“‚ Open file Open an existing .mmd file
Ctrl+S πŸ’Ύ Save file Save current diagram to file
Ctrl+E πŸš€ Generate Export diagram to image format
Ctrl+F πŸ” Find & Replace Search and replace in editor

πŸ’‘ Pro Tip: All shortcuts work in both the editor and preview panes for seamless workflow!

Supported Diagram Types

  • Flowcharts (graph / flowchart)
  • Sequence Diagrams (sequenceDiagram)
  • Class Diagrams (classDiagram)
  • State Diagrams (stateDiagram)
  • Gantt Charts (gantt)
  • Pie Charts (pie)
  • Git Graphs (gitgraph)
  • And more!

Example Mermaid Code

graph TD
    A[Start] --> B{Decision?}
    B -->|Yes| C[Process A]
    B -->|No| D[Process B]
    C --> E[End]
    D --> E
Loading

πŸ—οΈ Architecture

Technology Stack

  • Frontend: SvelteKit + TypeScript
  • Backend: Rust + Tauri 2.0
  • Editor: Monaco Editor with custom Mermaid syntax
  • Diagram Engine: Mermaid CLI (mmdc)
  • Styling: Custom CSS with CSS Variables

Project Structure

mermaid-gui-v2/
β”œβ”€β”€ src/                    # Frontend (SvelteKit)
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ components/     # UI components
β”‚   β”‚   β”œβ”€β”€ services/       # Business logic
β”‚   β”‚   β”œβ”€β”€ stores/         # State management
β”‚   β”‚   β”œβ”€β”€ styles/         # CSS styles
β”‚   β”‚   └── utils/          # Helper functions
β”‚   └── routes/             # SvelteKit routes
β”œβ”€β”€ src-tauri/              # Backend (Rust)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ commands/       # Tauri commands
β”‚   β”‚   β”œβ”€β”€ models/         # Data structures
β”‚   β”‚   β”œβ”€β”€ services/       # Core services
β”‚   β”‚   └── utils/          # Utilities
β”‚   └── Cargo.toml
β”œβ”€β”€ static/                 # Static assets
└── docs/                   # Documentation

πŸ›‘οΈ Security & Privacy

πŸ” Data Protection

  • Zero Data Collection - We don't collect any personal information
  • Local Storage Only - All files remain on your computer
  • No Network Requests - Application works completely offline
  • No Telemetry - No usage analytics or crash reporting

πŸ›‘οΈ Security Features

  • Sandboxed Execution - Tauri security model
  • Memory Safe - Written in Rust for memory safety
  • No Arbitrary Code Execution - Safe diagram processing
  • Regular Security Audits - Community-driven security reviews

πŸ“‹ Privacy Compliance

  • βœ… GDPR Compliant - No data processing
  • βœ… CCPA Compliant - No personal information collection
  • βœ… SOC 2 Ready - Enterprise security standards
  • βœ… Open Source Transparency - Full code visibility

πŸ”„ Comparison with Alternatives

Feature Mermaid GUI v2.0 Mermaid Live VS Code + Extensions Draw.io
Offline Support βœ… Yes ❌ Online only βœ… Yes ⚠️ Limited
Privacy βœ… Complete ❌ Data sent to servers βœ… Local ⚠️ Google owned
Live Preview βœ… Real-time βœ… Real-time ⚠️ Extension dependent ❌ No
Batch Processing βœ… Built-in ❌ No ❌ No ❌ No
Native Performance βœ… Tauri/Rust ❌ Web app ⚠️ Electron ❌ Web app
File Management βœ… Advanced ⚠️ Basic βœ… VS Code βœ… Good
Export Formats βœ… PNG, SVG, PDF, JPG βœ… PNG, SVG ⚠️ Extension dependent βœ… Many formats
Cost πŸ†“ Free & Open Source πŸ†“ Free πŸ†“ Free πŸ†“ Free

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Prerequisites:

    # Install Rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    # Install Node.js 18+
    # Install Tauri CLI
    cargo install tauri-cli --version "^2.0.0"
  2. Clone and setup:

    git clone https://github.com/baris-sinapli/mermaid-diagram.git
    cd mermaid-diagram
    npm install
  3. Start development:

    npm run tauri dev

Code Quality

  • Linting: npm run lint
  • Formatting: npm run format
  • Type Checking: npm run type-check
  • Testing: cargo test (Rust) + npm test (Frontend)

πŸ› Issue Reporting

Found a bug? Have a feature request? Please use our issue templates:

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Why GPL v3?

We chose GPL v3 to ensure that:

  • βœ… The software remains free and open source
  • βœ… Improvements benefit the entire community
  • βœ… No one can create proprietary forks
  • βœ… Your privacy and freedom are protected

πŸ™ Acknowledgments

  • Mermaid.js - The amazing diagramming syntax
  • Tauri - For the excellent native app framework
  • Monaco Editor - For the VS Code-quality editor
  • Svelte - For the reactive UI framework

🌟 Star History

Star History Chart

πŸ’¬ Community

Made with ❀️ by the open source community

⭐ Star us on GitHub | πŸ› Report Issues)

About

Privacy-first Mermaid diagram generator with real-time preview. Built with Tauri for native performance.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •