nex_docus/docs/sdd/specs/DV-0003-document-editing/design.md

21 lines
749 B
Markdown
Raw Normal View History

2026-08-19 10:05:22 +00:00
# DV-0003文档编辑与文件操作 设计Design
## 上下文
`files.py`API、`storage.py`(读写)、前端 `DocumentPage/DocumentEditor`pages/Document、Markdown 组件 bytemd。
## 接口设计
- GET /api/v1/files/{project_id}/tree
- GET|POST /api/v1/files/{project_id}/file
- POST /api/v1/files/{project_id}/file/operate
- POST /api/v1/files/{project_id}/upload{,-document}
- POST /api/v1/files/{project_id}/import-documents
- GET /api/v1/files/{project_id}/export-directory
- GET /api/v1/files/{project_id}/export-pdf
## 前端
- 左侧目录树,右侧 Markdown 编辑/预览PDF 用 react-pdf长列表虚拟滚动。
## 状态与降级
- 写文件自动创建父目录重命名目标冲突→400。