npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mermaid-visual-editor

v0.1.0

Published

Visual drag-and-drop editor for Mermaid.js diagrams. Build flowcharts visually — export clean .mmd syntax.

Readme

Mermaid Visual Editor

A visual drag-and-drop editor for Mermaid.js flowcharts. Build diagrams visually — export clean .mmd syntax.

No account. No cloud. Runs locally.

Try the live demo

Mermaid Visual Editor screenshot

Mermaid Visual Editor lets you draw flowcharts by dragging nodes and connecting edges on an infinite canvas. Mermaid syntax is generated automatically — you never hand-type it. Built with Next.js, React Flow, Zustand, and Mermaid.js.

Install & Run

Global install (recommended for repeat use):

npm install -g mermaid-visual-editor
mermaid-visual-editor

One-off (no install):

npx mermaid-visual-editor

Both commands serve the app and open your browser at http://localhost:3000.

Requirements: Node.js 18+


Development Setup

git clone https://github.com/saketkattu/mermaid-visual-editor.git
cd mermaid-visual-editor
pnpm install
pnpm dev

Open http://localhost:3000.

Requirements: Node.js 18+, pnpm


Why I Built This & Validation

The Problem

Writing Mermaid syntax by hand works fine for small diagrams. As diagrams grow, it becomes cognitively taxing — syntax errors, layout frustration, editing fatigue. Users shift from designing systems to debugging text.

The core tension: human visual thinking vs. text-based diagram construction.

Who Feels This Pain

PKMS Power Users — rely on plain-text workflows inside tools like Obsidian to maintain portable, future-proof knowledge systems. They tolerate syntax complexity until diagrams exceed a manageable threshold, at which point editing becomes disproportionately effortful.

Technical Writers & Educators — use Mermaid to communicate processes and flows in documentation. Syntax introduces friction that competes with their primary job: explaining ideas.

System Architects & Developers — value diagrams as structured, version-controlled artifacts. They experience diminishing returns when diagrams become visually complex but syntactically dense.

Jobs-to-be-Done

  • When modeling complex systems, I want to express relationships visually without fighting syntax, so I can focus on thinking rather than formatting.
  • When refining diagrams, I want changes to feel lightweight and intuitive, so I can iterate rapidly without cognitive fatigue.
  • When storing diagrams in my knowledge workflows, I want them to remain portable and future-proof, so I avoid lock-in.

The Friction Matrix

| Current Approach | Strength | Breaking Point | |-----------------|----------|----------------| | Manual syntax | Maximum portability and precision | Syntax fatigue, high error frequency, cognitive overload as diagrams scale | | Mermaid Live Editor | Official, free, syntax-complete | Context switching, no bi-directional workflow with local files | | Excalidraw / Whiteboards | Highly intuitive visual manipulation | Loss of diagram-as-code benefits, weak portability | | AI-assisted generation | Fast initial creation | Syntax errors, hallucinations, manual cleanup burden |

Market Signals

Mermaid.js has substantial ecosystem penetration:

  • 86,300+ GitHub Stars
  • ~2.8M Weekly NPM Downloads
  • ~350,000+ Mermaid-related Plugin Downloads (Obsidian ecosystem)
  • Estimated friction-affected users: ~2.5M–3M users

What users say:

"Creating and editing diagrams visually is much more intuitive."

"Syntax gets cumbersome real fast for larger mind maps."

"Mermaid chooses poor layouts… lines are inconsistent."

"Been waiting for something like this since forever."


Solution + Features

Mermaid Visual Editor takes a visual-first approach: draw first, export syntax. The canvas state is the source of truth — Mermaid syntax is always derived, never hand-typed.

Drawing

  • Add nodes — click + Add Node, press N, or double-click the canvas
  • Connect nodes — drag from the handle at the top/bottom/left/right of any node to another node
  • 14 node shapes — Rectangle, Rounded, Stadium, Diamond, Circle, Hexagon, Cylinder, and more
  • Rename — double-click any node or edge label to edit inline

Editing

  • Shape picker — select a node, then click a shape to change it
  • Style picker — customize node fill color, border color, and text color
  • Edge customization — change line style (solid, dashed, thick) and arrow type
  • Delete — select nodes/edges and press Backspace or Delete
  • Duplicate — duplicate selected nodes and their edges by pressing Ctrl+D
  • Auto Layout — arrange nodes top-to-bottom powered by Dagre
  • Undo/Redo — full history stack (Ctrl+Z / Ctrl+Shift+Z)

Diagram Settings

  • Direction — switch layout direction (Top-to-Bottom, Left-to-Right, Bottom-to-Top, Right-to-Left)
  • Theme — choose Mermaid theme (default, dark, forest, neutral, base)
  • Hand-drawn — toggle Mermaid's look: handDrawn style
  • Curve Style — choose from 12 routing algorithms

Export & Save

  • Copy Syntax — copies valid Mermaid graph syntax to clipboard
  • Download .mmd — downloads the diagram as a .mmd file
  • Download .svg — downloads the live rendered diagram as an .svg file
  • Save / Load — save and reload the canvas as a .json file

Preview

  • Show Preview — live Mermaid.js render in a floating panel

Keyboard Shortcuts

| Key | Action | |-----|--------| | N | Add a new node | | Backspace / Delete | Delete selected node(s) or edge(s) | | Ctrl + D | Duplicate selected node(s) | | Ctrl + Z | Undo | | Ctrl + Shift + Z | Redo | | Escape | Deselect all |


Roadmap

Near-term

  • [ ] Import Mermaid syntax to canvas
  • [ ] Subgraph support
  • [ ] Sequence diagram support
  • [ ] Mindmap support

Medium-term

  • [ ] Obsidian plugin
  • [ ] Class diagram support
  • [ ] ER diagram support
  • [ ] State diagram support
  • [ ] Dark mode for the editor UI

Long-term

  • [ ] Real-time collaboration
  • [ ] AI-assisted diagram generation
  • [ ] VS Code extension
  • [ ] Two-way code-canvas sync

Tech Stack & Architecture

| Layer | Choice | |-------|--------| | Framework | Next.js (App Router) | | Visual Canvas | React Flow (XY Flow) | | Mermaid Render | mermaid.js | | State | Zustand | | Styling | Tailwind CSS | | Language | TypeScript | | Layout | Dagre | | Package Manager | pnpm |

Architecture

User drags nodes/edges
       |
  Zustand Store { nodes[], edges[] }
       |
  Mermaid Serializer (lib/serializer.ts)
       |
  Mermaid syntax string
       |
  Preview panel + Export (.mmd / clipboard / .svg)

The canvas state is canonical. Mermaid syntax is always derived — never parsed back in.


Contributing

PRs welcome. Open an issue first for large changes. See CONTRIBUTING.md for full guidelines.

pnpm dev     # development server
pnpm build   # production build → generates out/
pnpm lint    # lint
pnpm audit   # security audit

CI

Every push and PR against master runs lint, audit, and build automatically via GitHub Actions.

Releases

Releases are fully automated — do not manually edit the version in package.json.

  1. Update CHANGELOG.md — move items from [Unreleased] to a new versioned section
  2. Go to Actions → Release → Run workflow
  3. Choose the bump type (patch / minor / major)

The workflow bumps package.json, commits, tags, publishes to npm, and creates a GitHub Release.

Required secret: add NPM_TOKEN to repo Settings → Secrets → Actions before triggering a release.


Security

See SECURITY.md for the vulnerability disclosure policy.


License

MIT