Skip to content

CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.

readme_language

codingFeng10109974e87b23e
diff --git a/README.md b/README.md
index c359087..7c1b69d 100644
--- a/README.md
+++ b/README.md
@@ -1,122 +1,23 @@
# CanvasAnvil
-Language: [中文](#zh) | [English](#en)
-
----
-
-<a id="zh"></a>
-## 中文
-
-CanvasAnvil 是一个多工作台 AI 创作平台,用一句需求就能完成从方案到可交付物的生成与迭代。
-
-### 能力总览(用户视角)
-
-- `Flow`:流程图生成与局部编辑(draw.io XML)
-- `CAD`:室内装修方案、2D 平面图、装修图与物料清单(BOM)
-- `PPT`:演示文稿草稿生成与迭代编辑
-
-### 典型使用路径
-
-1. 输入需求
-2. AI 生成初稿
-3. 局部修改与迭代
-4. 导出结果(图纸 / 清单 / 演示稿)
-
-### 快速开始
-
-1. 安装依赖
-```bash
-npm install
-```
-2. 启动开发环境
-```bash
-npm run dev
-```
-默认地址:`http://localhost:5173`
-
-3. 类型检查
-```bash
-npm run check
-```
-4. 生产构建
-```bash
-npm run build
-```
-
-### 项目来源与说明
-
-- Flow 工作台:基于 [next-ai-draw-io](https://github.com/DayuanJiang/next-ai-draw-io) 集成与增强
-- PPT 工作台:基于 [banana-slides](https://github.com/Anionex/banana-slides.git) 集成与增强
-- CAD 工作台:本项目自研(架构、Agent 工作流、2D SVG 编辑链路、BOM/装修图链路)
-
-核心优化:
-
-- 三工作台统一交互范式(聊天、代码块、一键应用到画布)
-- 更稳定的 Agent 路由与重试机制
-- CAD 专项能力(局部 patch / 全量 replace / BOM / 7 槽装修图)
-- 跨工作台状态管理、版本管理和导出链路
-
-### 核心能力(开发视角)
-
-- Flow:对话生成流程图,支持 patch/replace,一键应用代码块,支持历史恢复
-- CAD:`cad_plan` 方案生成、2D SVG 局部修改、装修图并发出图、BOM 导出
-- PPT:结构化内容生成、页级增量编辑、图文流式生成与迭代
-
-### 技术栈
-
-- 前端:React 18 + TypeScript + Vite
-- UI:Tailwind CSS + Radix UI + Lucide
-- 图形引擎:Flow 使用 draw.io/diagrams.net;CAD 使用 SVG-Edit
-- 模型接入:可配置多模型(Chat / Image)
-
-### 常用脚本
-
-- `npm run dev`:开发服务器
-- `npm start`:生产启动(静态站点 + API)
-- `npm run build`:生产构建
-- `npm run check`:TypeScript 检查
-- `npm run lint`:ESLint 检查
-
-### 目录结构(关键部分)
-
-```text
-.
-├─ agent/ # CAD/Flow/PPT 的提示词与子智能体定义
-├─ public/ # 静态资源(含 SVG-Edit 等)
-├─ src/
-│ └─ workspaces/
-│ ├─ flow/ # 流程图工作台
-│ ├─ cad/ # CAD 工作台(自研核心)
-│ └─ ppt/ # PPT 工作台
-├─ api/ # API 相关逻辑
-└─ README.md
-```
-
-### 文档导航
-
-- 部署说明:[`deploy/README.md`](deploy/README.md)
-
----
-
-<a id="en"></a>
-## English
+中文版本: [`README.zh-CN.md`](README.zh-CN.md)
CanvasAnvil is a multi-workspace AI creation platform that turns a single requirement into deliverables you can iterate on.
-### Capability Overview (User View)
+## Capability Overview (User View)
- `Flow`: flowchart generation and partial edits (draw.io XML)
- `CAD`: interior design plans, 2D floor plans, render tasks, and BOM
- `PPT`: presentation draft generation and iterative editing
-### Typical Workflow
+## Typical Workflow
1. Enter your requirement
2. Generate a first draft with AI
3. Apply partial edits and iterate
4. Export outputs (diagrams / lists / slides)
-### Quick Start
+## Quick Start
1. Install dependencies
```bash
@@ -137,7 +38,7 @@ npm run check
npm run build
```
-### Origins and Integrations
+## Origins and Integrations
- Flow workspace: integrated and enhanced from [next-ai-draw-io](https://github.com/DayuanJiang/next-ai-draw-io)
- PPT workspace: integrated and enhanced from [banana-slides](https://github.com/Anionex/banana-slides.git)
@@ -150,20 +51,20 @@ Key improvements:
- CAD-specific capabilities (patch / replace / BOM / 7-slot render workflow)
- Cross-workspace state/version/export pipelines
-### Core Capabilities (Developer View)
+## Core Capabilities (Developer View)
- Flow: chat-driven flowchart generation, patch/replace, one-click apply, snapshot restore
- CAD: `cad_plan` output, 2D SVG partial updates, concurrent render jobs, BOM export
- PPT: structured content generation, page-level incremental edits, streaming iteration
-### Tech Stack
+## Tech Stack
- Frontend: React 18 + TypeScript + Vite
- UI: Tailwind CSS + Radix UI + Lucide
- Diagram engines: draw.io/diagrams.net for Flow, SVG-Edit for CAD
- Model integration: configurable multi-model access (chat / image)
-### Useful Scripts
+## Useful Scripts
- `npm run dev`: start development server
- `npm start`: production start (static site + API)
@@ -171,7 +72,7 @@ Key improvements:
- `npm run check`: TypeScript check
- `npm run lint`: ESLint
-### Project Structure (Key Paths)
+## Project Structure (Key Paths)
```text
.
@@ -186,6 +87,6 @@ Key improvements:
└─ README.md
```
-### Docs
+## Docs
- Deployment guide: [`deploy/README.md`](deploy/README.md)
diff --git a/README.zh-CN.md b/README.zh-CN.md
new file mode 100644
index 0000000..a2828e6
--- /dev/null
+++ b/README.zh-CN.md
@@ -0,0 +1,92 @@
+# CanvasAnvil
+
+English version: [`README.md`](README.md)
+
+CanvasAnvil 是一个多工作台 AI 创作平台,用一句需求就能完成从方案到可交付物的生成与迭代。
+
+## 能力总览(用户视角)
+
+- `Flow`:流程图生成与局部编辑(draw.io XML)
+- `CAD`:室内装修方案、2D 平面图、装修图与物料清单(BOM)
+- `PPT`:演示文稿草稿生成与迭代编辑
+
+## 典型使用路径
+
+1. 输入需求
+2. AI 生成初稿
+3. 局部修改与迭代
+4. 导出结果(图纸 / 清单 / 演示稿)
+
+## 快速开始
+
+1. 安装依赖
+```bash
+npm install
+```
+2. 启动开发环境
+```bash
+npm run dev
+```
+默认地址:`http://localhost:5173`
+
+3. 类型检查
+```bash
+npm run check
+```
+4. 生产构建
+```bash
+npm run build
+```
+
+## 项目来源与说明
+
+- Flow 工作台:基于 [next-ai-draw-io](https://github.com/DayuanJiang/next-ai-draw-io) 集成与增强
+- PPT 工作台:基于 [banana-slides](https://github.com/Anionex/banana-slides.git) 集成与增强
+- CAD 工作台:本项目自研(架构、Agent 工作流、2D SVG 编辑链路、BOM/装修图链路)
+
+核心优化:
+
+- 三工作台统一交互范式(聊天、代码块、一键应用到画布)
+- 更稳定的 Agent 路由与重试机制
+- CAD 专项能力(局部 patch / 全量 replace / BOM / 7 槽装修图)
+- 跨工作台状态管理、版本管理和导出链路
+
+## 核心能力(开发视角)
+
+- Flow:对话生成流程图,支持 patch/replace,一键应用代码块,支持历史恢复
+- CAD:`cad_plan` 方案生成、2D SVG 局部修改、装修图并发出图、BOM 导出
+- PPT:结构化内容生成、页级增量编辑、图文流式生成与迭代
+
+## 技术栈
+
+- 前端:React 18 + TypeScript + Vite
+- UI:Tailwind CSS + Radix UI + Lucide
+- 图形引擎:Flow 使用 draw.io/diagrams.net;CAD 使用 SVG-Edit
+- 模型接入:可配置多模型(Chat / Image)
+
+## 常用脚本
+
+- `npm run dev`:开发服务器
+- `npm start`:生产启动(静态站点 + API)
+- `npm run build`:生产构建
+- `npm run check`:TypeScript 检查
+- `npm run lint`:ESLint 检查
+
+## 目录结构(关键部分)
+
+```text
+.
+├─ agent/ # CAD/Flow/PPT 的提示词与子智能体定义
+├─ public/ # 静态资源(含 SVG-Edit 等)
+├─ src/
+│ └─ workspaces/
+│ ├─ flow/ # 流程图工作台
+│ ├─ cad/ # CAD 工作台(自研核心)
+│ └─ ppt/ # PPT 工作台
+├─ api/ # API 相关逻辑
+└─ README.md
+```
+
+## 文档导航
+
+- 部署说明:[`deploy/README.zh-CN.md`](deploy/README.zh-CN.md)
diff --git a/deploy/README.md b/deploy/README.md
index b38db60..c3d7152 100644
--- a/deploy/README.md
+++ b/deploy/README.md
@@ -1,89 +1,10 @@
# Deployment Guide
-Language: [中文](#zh) | [English](#en)
-
----
-
-<a id="zh"></a>
-## 中文
-
-当前部署模型是单服务:一个 Node 进程同时提供静态站点与 `/api/*`。
-
-### 快速开始
-
-| 场景 | 推荐方式 | 命令 |
-| --- | --- | --- |
-| 直接在主机运行 | Host 部署 | `npm ci && npm run build && npm start` |
-| 容器化部署 | Docker Compose(推荐) | `docker compose -f deploy/docker/docker-compose.yml up -d --build` |
-
-默认端口:`8080`
-默认访问地址:`http://localhost:8080/`
-
-### 目录结构
-
-- `deploy/host/`: 主机/裸机部署脚本和 Nginx 反向代理配置
-- `deploy/docker/`: Dockerfile 与 Compose 配置
-
-### Host 部署
-
-1. 构建
-- Linux/macOS:
-```bash
-bash deploy/host/build.sh
-```
-- Windows PowerShell:
-```powershell
-powershell -ExecutionPolicy Bypass -File deploy/host/build.ps1
-```
-- 或手动执行:
-```bash
-npm ci
-npm run build
-```
-
-2. 启动
-```bash
-npm start
-```
-生产环境建议使用 `pm2` 或 `systemd` 守护。
-
-3. Nginx(可选)
-- 启用 `deploy/host/nginx.conf` 并重载 Nginx
-- 已包含 `client_max_body_size 25m`
-- 已对 `/api/chat` 配置 `proxy_buffering off`
-- 已转发 `/healthz`
-
-### Docker 部署
-
-方式 A:Compose(推荐)
-
-```bash
-docker compose -f deploy/docker/docker-compose.yml up -d --build
-```
-
-方式 B:Docker CLI
-
-```bash
-docker build -f deploy/docker/Dockerfile -t canvasanvil/app:latest .
-docker run --rm -p 8080:8080 canvasanvil/app:latest
-```
-
-### 环境变量
-
-| 变量 | 默认值 | 说明 |
-| --- | --- | --- |
-| `PORT` | `8080` | 服务监听端口 |
-| `API_BODY_LIMIT` | `25mb` | API 请求体大小限制 |
-| `WEB_DIST_DIR` | `./dist` | 前端静态资源目录 |
-
----
-
-<a id="en"></a>
-## English
+中文版本: [`README.zh-CN.md`](README.zh-CN.md)
The deployment model is a single service: one Node process serves both static assets and `/api/*`.
-### Quick Start
+## Quick Start
| Scenario | Recommended | Command |
| --- | --- | --- |
@@ -93,12 +14,12 @@ The deployment model is a single service: one Node process serves both static as
Default port: `8080`
Default URL: `http://localhost:8080/`
-### Directory Layout
+## Directory Layout
- `deploy/host/`: host/bare-metal scripts and Nginx reverse proxy config
- `deploy/docker/`: Dockerfile and Compose config
-### Host Deployment
+## Host Deployment
1. Build
- Linux/macOS:
@@ -127,7 +48,7 @@ For production, use `pm2` or `systemd` to keep it alive.
- Sets `proxy_buffering off` for `/api/chat`
- Proxies `/healthz`
-### Docker Deployment
+## Docker Deployment
Option A: Compose (recommended)
@@ -142,7 +63,7 @@ docker build -f deploy/docker/Dockerfile -t canvasanvil/app:latest .
docker run --rm -p 8080:8080 canvasanvil/app:latest
```
-### Environment Variables
+## Environment Variables
| Variable | Default | Description |
| --- | --- | --- |
diff --git a/deploy/README.zh-CN.md b/deploy/README.zh-CN.md
new file mode 100644
index 0000000..5fe5369
--- /dev/null
+++ b/deploy/README.zh-CN.md
@@ -0,0 +1,72 @@
+# Deployment Guide
+
+English version: [`README.md`](README.md)
+
+当前部署模型是单服务:一个 Node 进程同时提供静态站点与 `/api/*`。
+
+## 快速开始
+
+| 场景 | 推荐方式 | 命令 |
+| --- | --- | --- |
+| 直接在主机运行 | Host 部署 | `npm ci && npm run build && npm start` |
+| 容器化部署 | Docker Compose(推荐) | `docker compose -f deploy/docker/docker-compose.yml up -d --build` |
+
+默认端口:`8080`
+默认访问地址:`http://localhost:8080/`
+
+## 目录结构
+
+- `deploy/host/`: 主机/裸机部署脚本和 Nginx 反向代理配置
+- `deploy/docker/`: Dockerfile 与 Compose 配置
+
+## Host 部署
+
+1. 构建
+- Linux/macOS:
+```bash
+bash deploy/host/build.sh
+```
+- Windows PowerShell:
+```powershell
+powershell -ExecutionPolicy Bypass -File deploy/host/build.ps1
+```
+- 或手动执行:
+```bash
+npm ci
+npm run build
+```
+
+2. 启动
+```bash
+npm start
+```
+生产环境建议使用 `pm2` 或 `systemd` 守护。
+
+3. Nginx(可选)
+- 启用 `deploy/host/nginx.conf` 并重载 Nginx
+- 已包含 `client_max_body_size 25m`
+- 已对 `/api/chat` 配置 `proxy_buffering off`
+- 已转发 `/healthz`
+
+## Docker 部署
+
+方式 A:Compose(推荐)
+
+```bash
+docker compose -f deploy/docker/docker-compose.yml up -d --build
+```
+
+方式 B:Docker CLI
+
+```bash
+docker build -f deploy/docker/Dockerfile -t canvasanvil/app:latest .
+docker run --rm -p 8080:8080 canvasanvil/app:latest
+```
+
+## 环境变量
+
+| 变量 | 默认值 | 说明 |
+| --- | --- | --- |
+| `PORT` | `8080` | 服务监听端口 |
+| `API_BODY_LIMIT` | `25mb` | API 请求体大小限制 |
+| `WEB_DIST_DIR` | `./dist` | 前端静态资源目录 |