GetNotes Tools
DayuanJiang/next-ai-draw-io
Tool นี้คืออะไร
Next AI Draw.io เป็นเว็บแอปพลิเคชัน Next.js ที่ผสานรวมความสามารถ AI เข้ากับการสร้างและแก้ไขไดอะแกรม draw.io ผู้ใช้สามารถสร้าง ปรับแต่ง และปรับปรุงไดอะแกรมผ่านคำสั่งภาษาธรรมชาติและการแสดงผลด้วย AI ทำให้การสร้างไดอะแกรมเป็นเรื่องง่ายและรวดเร็วขึ้น เหมาะสำหรับนักพัฒนาและผู้ที่ต้องการสร้างแผนภาพอย่างมีประสิทธิภาพ
ข้อมูลโปรเจกต์
ดาว
33.9K
Forks
3.6K
License
Apache-2.0
อัปเดต GitHub ล่าสุด
28 ก.ค. 2569
เพิ่มใน GetNotes
14 ก.ค. 2569
Repository
DayuanJiang/next-ai-draw-io
เหมาะกับงาน
เหมาะกับอาชีพ
Ecosystem
Next.js · TypeScript
แปลและเรียบเรียงโดย AI
เนื้อหาฉบับภาษาไทย
ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง
Next AI Draw.io
เครื่องมือสร้างไดอะแกรมที่ขับเคลื่อนด้วย AI - แชท, วาด, แสดงภาพ
เว็บแอปพลิเคชัน Next.js ที่ผสานรวมความสามารถ AI เข้ากับไดอะแกรม draw.io สร้าง, แก้ไข และปรับปรุงไดอะแกรมผ่านคำสั่งภาษาธรรมชาติและการแสดงผลด้วย AI
หมายเหตุ: ขอขอบคุณการสนับสนุนจาก
ByteDance Doubao ทำให้เว็บไซต์สาธิตตอนนี้ใช้โมเดล glm-4.7 ที่ทรงพลัง!
https://github.com/user-attachments/assets/9d60a3e8-4a1c-4b5e-acbb-26af2d3eabd1
สารบัญ
- Next AI Draw.io- [สารบัญ](#สารบัญ) - [ตัวอย่าง](#ตัวอย่าง) - [คุณสมบัติ](#คุณสมบัติ) - [MCP Server](#mcp-server) - [Claude Code CLI](#claude-code-cli) - [เริ่มต้นใช้งาน](#เริ่มต้นใช้งาน) - [ลองใช้งานออนไลน์](#ลองใช้งานออนไลน์) - [แอปพลิเคชันเดสก์ท็อป](#แอปพลิเคชันเดสก์ท็อป) - [รันด้วย Docker](#รันด้วย-docker) - [การติดตั้ง](#การติดตั้ง) - [การปรับใช้](#การปรับใช้) - [ปรับใช้กับ EdgeOne Pages](#ปรับใช้กับ-edgeone-pages) - [ปรับใช้บน Vercel](#ปรับใช้บน-vercel) - [ปรับใช้บน Cloudflare Workers](#ปรับใช้บน-cloudflare-workers) - [การรองรับผู้ให้บริการหลายราย](#การรองรับผู้ให้บริการหลายราย) - [การกำหนดค่าหลายโมเดลฝั่งเซิร์ฟเวอร์](#การกำหนดค่าหลายโมเดลฝั่งเซิร์ฟเวอร์) - [แผงผู้ดูแลระบบ](#แผงผู้ดูแลระบบ) - [วิธีการทำงาน](#วิธีการทำงาน) - [การสนับสนุนและติดต่อ](#การสนับสนุนและติดต่อ) - [คำถามที่พบบ่อย](#คำถามที่พบบ่อย) - [ประวัติ Star](#ประวัติ-star)
ตัวอย่าง
นี่คือตัวอย่างพรอมต์และไดอะแกรมที่สร้างขึ้น:
คุณสมบัติ
- การสร้างไดอะแกรมที่ขับเคลื่อนด้วย LLM: ใช้ประโยชน์จาก Large Language Models เพื่อสร้างและจัดการไดอะแกรม draw.io โดยตรงผ่านคำสั่งภาษาธรรมชาติ
- การจำลองไดอะแกรมจากรูปภาพ: อัปโหลดไดอะแกรมหรือรูปภาพที่มีอยู่ แล้วให้ AI จำลองและปรับปรุงโดยอัตโนมัติ
- การอัปโหลดไฟล์ PDF และไฟล์ข้อความ: อัปโหลดเอกสาร PDF และไฟล์ข้อความเพื่อดึงเนื้อหาและสร้างไดอะแกรมจากเอกสารที่มีอยู่
- การแสดงผลการให้เหตุผลของ AI: ดูขั้นตอนการคิดของ AI สำหรับโมเดลที่รองรับ (OpenAI o1/o3, Gemini, Claude, เป็นต้น)
- ประวัติไดอะแกรม: การควบคุมเวอร์ชันที่ครอบคลุมซึ่งติดตามการเปลี่ยนแปลงทั้งหมด ทำให้คุณสามารถดูและกู้คืนไดอะแกรมเวอร์ชันก่อนหน้าก่อนการแก้ไขโดย AI
- อินเทอร์เฟซแชทแบบโต้ตอบ: สื่อสารกับ AI เพื่อปรับแต่งไดอะแกรมของคุณแบบเรียลไทม์
- การรองรับไดอะแกรมสถาปัตยกรรมคลาวด์: การรองรับพิเศษสำหรับการสร้างไดอะแกรมสถาปัตยกรรมคลาวด์ (AWS, GCP, Azure)
- ตัวเชื่อมต่อแบบเคลื่อนไหว: สร้างตัวเชื่อมต่อแบบไดนามิกและเคลื่อนไหวระหว่างองค์ประกอบไดอะแกรมเพื่อการแสดงผลที่ดีขึ้น
MCP Server
ใช้ Next AI Draw.io กับ AI agents เช่น Claude Desktop, Cursor และ VS Code ผ่าน MCP (Model Context Protocol)
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}Claude Code CLI
claude mcp add drawio -- npx @next-ai-drawio/mcp-server@latestจากนั้นขอให้ Claude สร้างไดอะแกรม:
"Create a flowchart showing user authentication with login, MFA, and session management"
ไดอะแกรมจะปรากฏในเบราว์เซอร์ของคุณแบบเรียลไทม์!
ดู MCP Server README สำหรับการกำหนดค่า VS Code, Cursor และไคลเอนต์อื่นๆ
เริ่มต้นใช้งาน
ลองใช้งานออนไลน์
ไม่ต้องติดตั้ง! ลองใช้แอปได้โดยตรงบนเว็บไซต์สาธิตของเรา:
นำ API Key ของคุณมาเอง: คุณสามารถใช้ API key ของคุณเองเพื่อหลีกเลี่ยงข้อจำกัดการใช้งานบนเว็บไซต์สาธิต คลิกไอคอนการตั้งค่าในแผงแชทเพื่อกำหนดค่าผู้ให้บริการและ API key ของคุณ Key ของคุณจะถูกเก็บไว้ในเบราว์เซอร์ของคุณและไม่เคยถูกเก็บไว้บนเซิร์ฟเวอร์
แอปพลิเคชันเดสก์ท็อป
ดาวน์โหลดแอปเดสก์ท็อปสำหรับแพลตฟอร์มของคุณได้จาก หน้า Releases:
แพลตฟอร์มที่รองรับ: Windows, macOS, Linux
รันด้วย Docker
การติดตั้ง
- 1โคลน repository:
git clone https://github.com/DayuanJiang/next-ai-draw-io
cd next-ai-draw-io
npm install
cp env.example .env.localดู คู่มือการกำหนดค่าผู้ให้บริการ AI สำหรับคำแนะนำการตั้งค่าโดยละเอียดสำหรับผู้ให้บริการแต่ละราย
- 1รัน development server:
npm run dev- 1เปิด http://localhost:6002 ในเบราว์เซอร์ของคุณเพื่อดูแอปพลิเคชัน
การปรับใช้
ปรับใช้กับ EdgeOne Pages
คุณสามารถปรับใช้ได้ด้วยคลิกเดียวโดยใช้ Tencent EdgeOne Pages
ปรับใช้ด้วยปุ่มนี้:
ตรวจสอบ เอกสาร Tencent EdgeOne Pages สำหรับรายละเอียดเพิ่มเติม
นอกจากนี้ การปรับใช้ผ่าน Tencent EdgeOne Pages จะให้ โควต้าฟรีรายวันสำหรับโมเดล DeepSeek แก่คุณด้วย
ปรับใช้บน Vercel
วิธีที่ง่ายที่สุดในการปรับใช้คือการใช้ Vercel ซึ่งเป็นผู้สร้าง Next.js อย่าลืม ตั้งค่าตัวแปรสภาพแวดล้อม ใน Vercel dashboard เช่นเดียวกับที่คุณทำในไฟล์ .env.local ของคุณ
ดู เอกสารการปรับใช้ Next.js สำหรับรายละเอียดเพิ่มเติม
ปรับใช้บน Cloudflare Workers
ไปที่คู่มือการปรับใช้ Cloudflare
การรองรับผู้ให้บริการหลายราย
- ByteDance Doubao
- AWS Bedrock (ค่าเริ่มต้น)
- OpenAI
- Anthropic
- Google AI
- Google Vertex AI
- Azure OpenAI
- Ollama
- OpenRouter
- AIHubMix
- DeepSeek
- SiliconFlow
- ModelScope
- SGLang
- Vercel AI Gateway
ผู้ให้บริการทุกรายยกเว้น AWS Bedrock และ OpenRouter รองรับ Custom Endpoints
📖 คู่มือการตั้งค่าผู้ให้บริการโดยละเอียด - ดูคำแนะนำการตั้งค่าสำหรับผู้ให้บริการแต่ละราย
การตั้งค่า Multi-Model ฝั่งเซิร์ฟเวอร์
ผู้ดูแลระบบสามารถกำหนดค่าโมเดลฝั่งเซิร์ฟเวอร์หลายตัวที่ผู้ใช้ทุกคนสามารถใช้งานได้โดยไม่ต้องใช้คีย์ API ส่วนตัว กำหนดค่าผ่านตัวแปรสภาพแวดล้อม AI_MODELS_CONFIG (สตริง JSON) หรือไฟล์ ai-models.json สำหรับการตั้งค่าด่วนแบบผู้ให้บริการเดียว ให้ระบุ ID โมเดลที่คั่นด้วยเครื่องหมายจุลภาคใน AI_MODEL
แผงผู้ดูแลระบบ
ตั้งค่าตัวแปรสภาพแวดล้อม ADMIN_PASSWORD และไปที่ /admin เพื่อจัดการการตั้งค่าเซิร์ฟเวอร์ (โมเดล, รหัสการเข้าถึง, คุณสมบัติ, การสังเกตการณ์, โควตา) จากแผงเว็บ แทนที่จะแก้ไข .env ด้วยตนเอง
📖 คู่มือแผงผู้ดูแลระบบ — การตั้งค่า, กฎลำดับความสำคัญ และข้อควรทราบ
ข้อกำหนดของโมเดล: งานนี้ต้องการความสามารถของโมเดลที่แข็งแกร่งในการสร้างข้อความขนาดยาวพร้อมข้อจำกัดการจัดรูปแบบที่เข้มงวด (draw.io XML) โมเดลที่แนะนำ ได้แก่ Claude Sonnet 4.5, GPT-5.1, Gemini 3 Pro และ DeepSeek V3.2/R1
โปรดทราบว่าซีรีส์ claude ได้รับการฝึกฝนจากไดอะแกรม draw.io ที่มีโลโก้สถาปัตยกรรมคลาวด์ เช่น AWS, Azure, GCP ดังนั้นหากคุณต้องการสร้างไดอะแกรมสถาปัตยกรรมคลาวด์ นี่คือตัวเลือกที่ดีที่สุด
หลักการทำงาน
แอปพลิเคชันใช้เทคโนโลยีดังต่อไปนี้:
- Next.js: สำหรับเฟรมเวิร์กส่วนหน้าและการกำหนดเส้นทาง
- Vercel AI SDK (
ai+@ai-sdk/*): สำหรับการสตรีมการตอบกลับจาก AI และการรองรับผู้ให้บริการหลายราย - react-drawio: สำหรับการแสดงผลและการจัดการไดอะแกรม
ไดอะแกรมจะถูกแสดงในรูปแบบ XML ที่สามารถเรนเดอร์ใน draw.io ได้ AI จะประมวลผลคำสั่งของคุณและสร้างหรือแก้ไข XML ตามนั้น
การสนับสนุนและติดต่อ
ขอขอบคุณเป็นพิเศษสำหรับ ByteDance Doubao ที่สนับสนุนการใช้งานโทเค็น API ของเว็บไซต์สาธิต! ลงทะเบียนบนแพลตฟอร์ม ARK เพื่อรับ 500K โทเค็นฟรีสำหรับทุกโมเดล!
หากคุณพบว่าโปรเจกต์นี้มีประโยชน์ โปรดพิจารณา สนับสนุน เพื่อช่วยฉันโฮสต์เว็บไซต์สาธิต!
สำหรับการสนับสนุนหรือสอบถามข้อมูล โปรดเปิด Issue บน GitHub repository หรือติดต่อผู้ดูแลที่:
- อีเมล: me[at]jiang.jp
คำถามที่พบบ่อย
ดู คำถามที่พบบ่อย สำหรับปัญหาและวิธีแก้ไขทั่วไป
ประวัติ Star
เอกสารโปรเจกต์
อ่านเอกสารต้นฉบับ
README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ
Next AI Draw.io
AI-Powered Diagram Creation Tool - Chat, Draw, Visualize
A Next.js web application that integrates AI capabilities with draw.io diagrams. Create, modify, and enhance diagrams through natural language commands and AI-assisted visualization.
Note: Thanks to
ByteDance Doubao sponsorship, the demo site now uses the powerful glm-4.7 model!
https://github.com/user-attachments/assets/9d60a3e8-4a1c-4b5e-acbb-26af2d3eabd1
Table of Contents
- Next AI Draw.io- [Table of Contents](#table-of-contents) - [Examples](#examples) - [Features](#features) - [MCP Server](#mcp-server) - [Claude Code CLI](#claude-code-cli) - [Getting Started](#getting-started) - [Try it Online](#try-it-online) - [Desktop Application](#desktop-application) - [Run with Docker](#run-with-docker) - [Installation](#installation) - [Deployment](#deployment) - [Deploy to EdgeOne Pages](#deploy-to-edgeone-pages) - [Deploy on Vercel](#deploy-on-vercel) - [Deploy on Cloudflare Workers](#deploy-on-cloudflare-workers) - [Multi-Provider Support](#multi-provider-support) - [Server-Side Multi-Model Configuration](#server-side-multi-model-configuration) - [Admin Panel](#admin-panel) - [How It Works](#how-it-works) - [Support \& Contact](#support--contact) - [FAQ](#faq) - [Star History](#star-history)
Examples
Here are some example prompts and their generated diagrams:
Features
- LLM-Powered Diagram Creation: Leverage Large Language Models to create and manipulate draw.io diagrams directly through natural language commands
- Image-Based Diagram Replication: Upload existing diagrams or images and have the AI replicate and enhance them automatically
- PDF & Text File Upload: Upload PDF documents and text files to extract content and generate diagrams from existing documents
- AI Reasoning Display: View the AI's thinking process for supported models (OpenAI o1/o3, Gemini, Claude, etc.)
- Diagram History: Comprehensive version control that tracks all changes, allowing you to view and restore previous versions of your diagrams before the AI editing.
- Interactive Chat Interface: Communicate with AI to refine your diagrams in real-time
- Cloud Architecture Diagram Support: Specialized support for generating cloud architecture diagrams (AWS, GCP, Azure)
- Animated Connectors: Create dynamic and animated connectors between diagram elements for better visualization
MCP Server
Use Next AI Draw.io with AI agents like Claude Desktop, Cursor, and VS Code via MCP (Model Context Protocol).
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}Claude Code CLI
claude mcp add drawio -- npx @next-ai-drawio/mcp-server@latestThen ask Claude to create diagrams:
"Create a flowchart showing user authentication with login, MFA, and session management"
The diagram appears in your browser in real-time!
See the MCP Server README for VS Code, Cursor, and other client configurations.
Getting Started
Try it Online
No installation needed! Try the app directly on our demo site:
Bring Your Own API Key: You can use your own API key to bypass usage limits on the demo site. Click the Settings icon in the chat panel to configure your provider and API key. Your key is stored locally in your browser and is never stored on the server.
Desktop Application
Download the native desktop app for your platform from the Releases page:
Supported platforms: Windows, macOS, Linux.
Run with Docker
Installation
- 1Clone the repository:
git clone https://github.com/DayuanJiang/next-ai-draw-io
cd next-ai-draw-io
npm install
cp env.example .env.localSee the Provider Configuration Guide for detailed setup instructions for each provider.
- 1Run the development server:
npm run dev- 1Open http://localhost:6002 in your browser to see the application.
Deployment
Deploy to EdgeOne Pages
You can deploy with one click using Tencent EdgeOne Pages.
Deploy by this button:
Check out the Tencent EdgeOne Pages documentation for more details.
Additionally, deploying through Tencent EdgeOne Pages will also grant you a daily free quota for DeepSeek models.
Deploy on Vercel
The easiest way to deploy is using Vercel, the creators of Next.js. Be sure to set the environment variables in the Vercel dashboard as you did in your local .env.local file.
See the Next.js deployment documentation for more details.
Deploy on Cloudflare Workers
Multi-Provider Support
- ByteDance Doubao
- AWS Bedrock (default)
- OpenAI
- Anthropic
- Google AI
- Google Vertex AI
- Azure OpenAI
- Ollama
- OpenRouter
- AIHubMix
- DeepSeek
- SiliconFlow
- ModelScope
- SGLang
- Vercel AI Gateway
All providers except AWS Bedrock and OpenRouter support custom endpoints.
📖 Detailed Provider Configuration Guide - See setup instructions for each provider.
Server-Side Multi-Model Configuration
Administrators can configure multiple server-side models that are available to all users without requiring personal API keys. Configure via AI_MODELS_CONFIG environment variable (JSON string) or ai-models.json file. For a single-provider quick setup, list comma-separated model IDs in AI_MODEL.
Admin Panel
Set the ADMIN_PASSWORD environment variable and visit /admin to manage server settings (models, access codes, features, observability, quota) from a web panel instead of hand-editing .env.
📖 Admin Panel Guide — setup, precedence rules, and notes.
Model Requirements: This task requires strong model capabilities for generating long-form text with strict formatting constraints (draw.io XML). Recommended models include Claude Sonnet 4.5, GPT-5.1, Gemini 3 Pro, and DeepSeek V3.2/R1.
Note that the claude series has been trained on draw.io diagrams with cloud architecture logos like AWS, Azure, GCP. So if you want to create cloud architecture diagrams, this is the best choice.
How It Works
The application uses the following technologies:
- Next.js: For the frontend framework and routing
- Vercel AI SDK (
ai+@ai-sdk/*): For streaming AI responses and multi-provider support - react-drawio: For diagram representation and manipulation
Diagrams are represented as XML that can be rendered in draw.io. The AI processes your commands and generates or modifies this XML accordingly.
Support & Contact
Special thanks to ByteDance Doubao for sponsoring the API token usage of the demo site! Register on the ARK platform to get 500K free tokens for all models!
If you find this project useful, please consider sponsoring to help me host the live demo site!
For support or inquiries, please open an issue on the GitHub repository or contact the maintainer at:
- Email: me[at]jiang.jp
FAQ
See FAQ for common issues and solutions.
