How to Use MarkMermaid Live Scratchpad
MarkMermaid is a zero-latency, browser-based documentation and architecture scratchpad engineered for software engineers, technical writers, product managers, and system architects. It merges GitHub-Flavored Markdown (GFM) authoring with live Mermaid.js diagram rendering in a synchronized split-screen workspace.
- Write or Load a Template: Start typing standard Markdown in the left editor pane, or click "Load Sample Spec Doc" in the header to explore a complete RFC specification containing tables, task lists, code blocks, and multiple system architecture diagrams.
- Insert Diagrams with One Click: Use the + Flowchart, + Sequence, + State Diagram, or + ER Diagram buttons in the toolbar to inject pre-validated Mermaid syntax blocks directly at your cursor position.
- Automatic Local Persistence: Every keystroke is automatically saved to your browser's local storage (
localStorage). You can safely refresh your tab or close your browser without losing your technical specifications. - Export Anywhere: When your document is ready, click Export .MD to save the raw source file for GitHub/GitLab repositories, Export .HTML to generate a self-contained HTML document with embedded styles and rendered diagrams, or Print / PDF for clean paginated output.
Key Features & Client-Side Privacy Benefits
100% Client-Side Privacy
Proprietary system architectures, database schemas, and unpublished RFC documents should never be uploaded to third-party cloud databases. MarkMermaid parses all Markdown and compiles Mermaid diagrams strictly inside your browser's local memory.
Resilient Diagram Rendering
Syntax errors are inevitable while sketching complex sequence or state diagrams. MarkMermaid isolates diagram syntax errors into clean inline diagnostic cards without breaking the surrounding Markdown document or freezing your cursor.
GitHub-Flavored Markdown (GFM)
Full support for multi-column alignment tables, interactive-style task checklists (- [x]), fenced code blocks with language tags, blockquotes, inline formatting, and horizontal rules.
Instant Word & Reading Metrics
Track document length in real time with live word counts, character counts, and estimated reading times tailored for technical documentation and engineering blog posts.
Technical Guide: Markdown & Mermaid.js Architecture Cheat Sheet
Modern engineering teams increasingly rely on "Docs-as-Code" and "Diagrams-as-Code" workflows. Instead of maintaining binary image exports from external drawing programs that rapidly fall out of sync with reality, text-based Mermaid definitions live directly inside Markdown files and can be version-controlled, diffed in pull requests, and reviewed alongside application code.
1. GitHub-Flavored Markdown (GFM) Essentials
GitHub-Flavored Markdown extends standard CommonMark with practical constructs for technical specifications:
| Element | Markdown Syntax | Best Practice in Engineering Specs |
|---|---|---|
| Headings | # H1, ## H2, ### H3 |
Use a single H1 for the document title, and H2/H3 for hierarchical sections (Context, Goals, Non-Goals, Architecture). |
| Task Lists | - [x] Completed- [ ] Pending |
Track rollout milestones, security sign-offs, and launch readiness checklists directly inside your design doc. |
| Tables | | Col A | Col B || :--- | ---: | |
Use colons in the separator row to left-align text columns (:---) and right-align numeric metrics or latencies (---:). |
| Code Blocks | ```json ... ``` |
Always specify the language identifier after the opening backticks to document API payloads, SQL migrations, or CLI commands. |
2. Designing Clear Mermaid Flowcharts (flowchart TD / LR)
Flowcharts represent directed graphs of services, decision trees, or request pipelines. You can orient a graph top-down (flowchart TD) for hierarchical workflows or left-to-right (flowchart LR) for data ingestion pipelines.
- Node Shapes Carry Meaning: Use rounded rectangles
id("Service Name")for stateless microservices, cylindersdb[("PostgreSQL")]for persistent data stores, and diamondsauth{"Token Valid?"}for conditional branching logic. - Quote Special Characters: Whenever a node label contains parentheses, brackets, colons, or slashes, wrap the label text in double quotes—for example,
api["API Gateway (v2)"]—to prevent parser ambiguities. - Labeled Edges: Clarify protocol or payload transitions between services using edge labels such as
client -->|"HTTPS / JSON"| apior dotted arrowsapi -.->|"Async Event"| queue.
3. Modeling Distributed Systems with Sequence Diagrams (sequenceDiagram)
Sequence diagrams excel at illustrating temporal interactions, authentication handshakes (such as OAuth 2.0 / OIDC), and microservice request lifecycles:
- Declare explicit participants at the top of the diagram using
participant C as Client Browserandparticipant A as Auth Serverto control column ordering from left to right. - Use solid arrows (
->>) for synchronous RPC or HTTP requests, and dashed arrows (-->>) for responses or callback payloads. - Use
autonumberright aftersequenceDiagramwhen you want to reference specific step numbers in the prose paragraphs below your diagram.
4. Entity-Relationship & State Diagrams
When proposing schema changes, an erDiagram lets you express one-to-many (||--o{) and many-to-many relationships clearly. For finite state machines—such as order fulfillment lifecycles, payment processing states, or UI component states—stateDiagram-v2 enforces explicit transitions from initial state [*] through intermediate states to terminal completion.
Frequently Asked Questions (FAQ)
Are my Markdown documents or architecture diagrams uploaded to any server?
No. MarkMermaid operates 100% client-side inside your web browser. Your Markdown text and Mermaid diagram definitions never leave your computer. Draft persistence uses your browser's local localStorage API, which remains strictly on your device.
How do I include multiple Mermaid diagrams in a single Markdown document?
Simply create as many fenced code blocks with the mermaid language tag (```mermaid ... ```) as you need. MarkMermaid automatically detects every Mermaid block in your document and renders each one into an independent, scalable SVG diagram in the preview pane.
What happens if I work offline or the Mermaid CDN is unreachable?
The core Markdown parser, live previewer, local auto-save, word counter, and file exporters are completely built-in and work 100% offline. If the external Mermaid library is blocked by a strict corporate firewall, MarkMermaid gracefully falls back to rendering styled, syntax-highlighted diagram definition blocks so your work is never interrupted.
How can I export my document with the rendered SVG diagrams intact?
Click Export .HTML to download a standalone HTML file that embeds both the clean typography stylesheet and the live SVG diagrams, or click Print / PDF to use your browser's native PDF generator with print-optimized page breaks and hidden editor chrome.
Why did my Mermaid flowchart show a syntax warning when I used parentheses?
In Mermaid syntax, parentheses () and brackets [] define node shapes. If your node label text itself contains parentheses—for example, Worker (Async)—wrap the text inside double quotes like node1["Worker (Async)"]. All templates inserted by MarkMermaid's toolbar follow this best practice automatically.
Can I use MarkMermaid files directly in GitHub, GitLab, or Notion?
Yes! GitHub, GitLab, Notion, and Obsidian all natively support fenced ```mermaid blocks inside standard Markdown files. Any .md file you export from MarkMermaid will render identically when committed to a Git repository.