docs: add project README with structure, deployment guide and API routes Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
docs: add project README with structure, deployment guide and API routes
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
智能文本处理平台,基于 Dify + NLG→DSL 管道实现自然语言驱动的智能体工作流自动生成。
zhiwenfang-v1.0.1/ ├── packages/ │ ├── client/ # 前端 — React 19 + TypeScript + Ant Design 5 + Vite │ └── server/ # 后端 — Express + Prisma + PostgreSQL ├── nlg-to-dsl/ # Python NLG→DSL 管道服务(FastAPI) ├── docker-compose.yml # PostgreSQL 数据库 ├── init-db.sql # 数据库初始化脚本 └── .env.example # 环境变量模板
# 克隆仓库 git clone https://www.gitlink.org.cn/caoweiqiong/zwf.git cd zwf # 启动 PostgreSQL docker compose up -d # 配置环境变量 cp .env.example packages/server/.env # 编辑 packages/server/.env 填入实际值 # 安装依赖 npm install # 初始化数据库 npm run db:migrate npm run db:seed # 启动前后端(开发模式) npm run dev
cd nlg-to-dsl # 安装依赖 pip install -r dify-dsl-builder/requirements.txt # 启动服务(默认端口 5000) cd .. python -m nlg-to-dsl.web_app
# 构建前端 cd packages/client npx vite build # 构建后端 cd ../server npx tsc # 使用 systemd 管理服务 # 后端服务(端口 3001) # NLG 管道服务(端口 5000) # Nginx 反向代理示例 # location / { root /path/to/packages/client/dist; try_files $uri /index.html; } # location /api { proxy_pass http://localhost:3001; }
DATABASE_URL
postgresql://difyflow:password@localhost:15432/difyflow
JWT_SECRET
ENCRYPTION_KEY
PORT
3001
UPLOAD_DIR
./uploads
MAX_FILE_SIZE
52428800
所有 /api 前缀,需 JWT 认证(除 /auth 外):
/api
/auth
/dify-config
/agents
/assets
/folders
/tasks
/templates
/generator/chat
本项目仅供学习和研究使用。
智能文本处理平台
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
ZhiWenCraft(智文坊)
项目结构
技术栈
功能模块
部署方式
1. 本地开发
2. NLG→DSL 管道服务
3. 生产部署(Linux 服务器)
4. 环境变量
DATABASE_URLpostgresql://difyflow:password@localhost:15432/difyflowJWT_SECRETENCRYPTION_KEYPORT3001UPLOAD_DIR./uploadsMAX_FILE_SIZE52428800(50 MB)API 路由
所有
/api前缀,需 JWT 认证(除/auth外):/auth/dify-config/agents/assets/folders/tasks/templates/generator/chat许可证
本项目仅供学习和研究使用。