AI-powered Mermaid diagram editor - Create and edit diagrams with natural language.
- 📝 Visual Mermaid Editor - Write and preview Mermaid diagrams in real-time
- 🤖 AI-Powered Generation - Describe diagrams in natural language and let AI create them
- 💾 Local-First Storage - All diagrams stored securely on your device
- 🔒 Secure API Keys - OpenAI keys encrypted using your system's secure storage
- 📤 SVG & PNG Export - Export diagrams as high-quality SVG or PNG files
- 🎨 Clean Print-Ready Theme - Neutral colors optimized for both screen and print
- Flowcharts - Process flows, decision trees, workflows
- Sequence Diagrams - Interactions between participants
- Class Diagrams - Object-oriented structures
- State Diagrams - State machines and transitions
- ER Diagrams - Entity relationships
- Gantt Charts - Project timelines
- Pie Charts - Data visualization
- Mind Maps - Brainstorming and organization
# Clone the repository
git clone https://github.com/dotnetfactory/markdownflows.git
cd markdownflows
# Install dependencies
npm install
# Run the app
npm start- Manual Editing: Write Mermaid syntax directly in the editor pane
- AI Generation: Describe what you want in the prompt area and click "Generate"
MarkdownFlows uses OpenAI to generate and modify diagrams. You can:
- Create new diagrams: "Create a flowchart for user authentication"
- Modify existing: "Add error handling to the payment process"
- Convert types: "Convert this flowchart to a sequence diagram"
- Add elements: "Add a decision node after the validation step"
| Shortcut | Action |
|---|---|
⌘/Ctrl + Enter |
Generate diagram from prompt |
⌘/Ctrl + S |
Save diagram |
⌘/Ctrl + + |
Zoom in |
⌘/Ctrl + - |
Zoom out |
⌘/Ctrl + 0 |
Reset zoom |
- Click the Settings icon (⚙️) in the header
- Enter your OpenAI API key
- Optionally change the model (default:
gpt-5) - Click "Test Connection" to verify
- Click "Save Settings"
Your API key is stored securely using your operating system's keychain/credential manager.
- Node.js 18+
- npm 9+
markdownflows/
├── src/
│ ├── main.ts # Electron main process
│ ├── preload.ts # IPC bridge
│ ├── renderer.tsx # React entry point
│ ├── App.tsx # Root component
│ ├── pages/
│ │ └── DiagramsPage.tsx # Main editor page
│ ├── components/
│ │ └── ui/ # shadcn/ui components
│ ├── services/
│ │ ├── DiagramStorageService.ts
│ │ ├── OpenAIService.ts
│ │ └── SettingsService.ts
│ └── lib/
│ └── utils.ts
├── package.json
├── forge.config.ts
├── tailwind.config.ts
└── tsconfig.json
npm start # Run the app
npm run lint # Run ESLint
npm run format # Format code with Prettier- Electron - Cross-platform desktop app
- React 19 - UI framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- shadcn/ui - Component library
- Mermaid.js - Diagram rendering
- OpenAI - AI diagram generation
- Vite - Build tooling
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Created by Emad Ibrahim
This project is sponsored by EliteCoders - a complete remote talent solution providing on-demand, high-performance software development teams. EliteCoders connects you with top-tier engineers across 100+ skills, offering flexible engagement models from staff augmentation to dedicated teams and project-based delivery.
Learn more about EliteCoders →
MIT License - see the LICENSE file for details.
- Mermaid.js for the amazing diagram library
- OpenAI for AI capabilities
- shadcn/ui for beautiful UI components
