重构项目结构
This commit is contained in:
@@ -53,45 +53,76 @@
|
||||
|
||||
```
|
||||
geMoldInsight/
|
||||
├── src/ # 源代码目录
|
||||
│ ├── main.py # 主程序入口
|
||||
│ ├── api/ # API路由
|
||||
│ │ ├── routes.py # 主API路由
|
||||
│ │ ├── auth_routes.py # 认证API
|
||||
│ │ └── inventory_routes.py # 进销存API
|
||||
│ ├── core/ # 核心业务逻辑
|
||||
│ │ ├── stp_parser.py # STP文件解析
|
||||
│ │ ├── geometry_analyzer.py # 几何分析
|
||||
│ │ ├── mesh_generator.py # 网格生成
|
||||
│ │ └── mold_generator.py # 模具生成
|
||||
│ ├── models/ # 数据模型
|
||||
│ │ ├── database.py # 数据库模型
|
||||
│ │ └── schemas.py # 数据模式
|
||||
│ ├── services/ # 服务层
|
||||
│ │ ├── auth_service.py # 认证服务
|
||||
│ │ ├── storage_service.py # 存储服务
|
||||
│ │ └── storage_integration_rustfs.py # RustFS集成
|
||||
│ ├── database/ # 数据库管理
|
||||
│ │ ├── database.py # 数据库连接
|
||||
│ │ └── init_db.py # 数据库初始化
|
||||
│ └── utils/ # 工具类
|
||||
├── src/ # 源代码目录
|
||||
│ ├── main.py # 主程序入口
|
||||
│ ├── api/ # API路由层
|
||||
│ │ ├── routes.py # 模具分析API路由聚合
|
||||
│ │ ├── auth_routes.py # 认证API
|
||||
│ │ ├── v1/ # MoldInsight API (v1)
|
||||
│ │ │ ├── upload_router.py # 文件上传
|
||||
│ │ │ ├── task_router.py # 任务状态查询
|
||||
│ │ │ └── history_router.py # 分析历史
|
||||
│ │ └── inventory/ # 进销存API
|
||||
│ │ ├── product_routes.py # 产品管理
|
||||
│ │ ├── sales_order_routes.py # 销售订单
|
||||
│ │ ├── purchase_order_routes.py # 采购订单
|
||||
│ │ ├── finance_routes.py # 财务管理
|
||||
│ │ ├── material_routes.py # 物料管理
|
||||
│ │ └── schemas/ # 请求/响应模型
|
||||
│ ├── core/ # 核心业务逻辑
|
||||
│ │ ├── stp_parser.py # STP文件解析
|
||||
│ │ ├── geometry_analyzer.py # 几何分析
|
||||
│ │ ├── mesh_generator.py # 网格生成
|
||||
│ │ ├── mold_generator.py # 普通塑料模具生成
|
||||
│ │ ├── aluminum_foam_mold.py # 铝泡沫模具生成
|
||||
│ │ ├── mold_quality_inspector.py # 模具质量检测
|
||||
│ │ └── ai_mold_assistant.py # AI模具助手
|
||||
│ ├── models/ # 数据模型
|
||||
│ │ ├── database.py # SQLAlchemy ORM模型
|
||||
│ │ └── schemas.py # Pydantic模式
|
||||
│ ├── services/ # 服务层
|
||||
│ │ ├── auth_service.py # 认证服务
|
||||
│ │ ├── processing_service.py # STP处理流程编排
|
||||
│ │ ├── calculation_service.py # 工程参数计算
|
||||
│ │ ├── material_service.py # 材料属性管理
|
||||
│ │ ├── task_query_service.py # 任务状态查询
|
||||
│ │ ├── storage_integration_rustfs.py # RustFS存储集成
|
||||
│ │ ├── redis_task_manager.py # Redis任务管理
|
||||
│ │ └── verification_service.py # FreeCAD几何验证
|
||||
│ ├── database/ # 数据库管理
|
||||
│ │ ├── database.py # 数据库连接池
|
||||
│ │ ├── init_db.py # 数据库初始化
|
||||
│ │ └── migrate_db.py # 数据库迁移
|
||||
│ ├── storage/ # 对象存储
|
||||
│ │ ├── rustfs_storage.py # RustFS S3客户端
|
||||
│ │ └── object_storage.py # 通用对象存储
|
||||
│ └── utils/ # 工具类
|
||||
│ ├── logger.py # 日志工具
|
||||
│ ├── file_handler.py # 文件处理
|
||||
│ └── html_generator.py # HTML生成
|
||||
├── static/ # 静态文件
|
||||
│ ├── vue-app.js # Vue应用
|
||||
│ ├── style.css # 样式文件
|
||||
│ └── index.html # 主页面
|
||||
├── scripts/ # 脚本工具
|
||||
│ └── verify_stp.py # STP验证脚本
|
||||
├── uploads/ # 上传文件目录
|
||||
├── html_output/ # 生成的HTML文件
|
||||
├── logs/ # 日志文件
|
||||
├── requirements.txt # 依赖包
|
||||
├── docker-compose.yml # Docker配置
|
||||
├── start.sh # Linux启动脚本
|
||||
├── start.bat # Windows启动脚本
|
||||
└── .env # 环境变量
|
||||
│ └── html_generator.py # 3D可视化HTML生成
|
||||
├── static/ # 前端静态资源
|
||||
│ ├── vue-app.js # Vue3 SPA应用
|
||||
│ ├── style.css # 全局样式
|
||||
│ └── index.html # 入口页面
|
||||
├── templates/ # Jinja2模板
|
||||
├── config/ # 配置模块
|
||||
│ └── settings.py # 环境变量配置
|
||||
├── scripts/ # 脚本工具
|
||||
│ ├── db/ # SQL脚本
|
||||
│ ├── migrations/ # 数据迁移脚本
|
||||
│ ├── tools/ # 临时检查/清理工具
|
||||
│ └── verify_stp.py # STP验证脚本
|
||||
├── docs/ # 项目文档
|
||||
│ └── deployment/ # 部署相关文档
|
||||
├── tests/ # 测试用例
|
||||
├── uploads/ # 上传文件目录 (gitignore)
|
||||
├── html_output/ # 3D可视化输出 (gitignore)
|
||||
├── requirements.txt # Python依赖
|
||||
├── docker-compose.yml # Docker编排配置
|
||||
├── Dockerfile # Docker构建文件
|
||||
├── start.sh # Linux启动脚本
|
||||
├── .env.example # 环境变量模板
|
||||
└── .env # 环境变量 (gitignore)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user