|
|
@@ -0,0 +1,23 @@
|
|
|
+{
|
|
|
+ "nodes":[
|
|
|
+ {"id":"title","type":"text","text":"# tg-live-game-web 架构\n\n**版本**: v1.0.0\n**技术栈**: Vue 3 + TypeScript + Vite\n**状态**: ✅ 已实现\n\n功能:\n- 登录认证\n- 摄像头管理\n- 视频/直播管理\n- 用户管理 (RBAC)","x":-400,"y":-600,"width":400,"height":280,"color":"1"},
|
|
|
+ {"id":"entry","type":"text","text":"**入口文件**\n`src/main.ts`\n\n功能:\n- Vue 应用初始化\n- Element Plus 注册\n- Pinia 状态管理\n- Vue Router 路由\n\n端口: localhost:3001","x":-400,"y":-240,"width":280,"height":260,"color":"6"},
|
|
|
+ {"id":"router","type":"text","text":"**路由配置**\n`src/router/index.ts`\n\n页面:\n- /login (登录)\n- /camera (摄像头)\n- /stream/* (视频/直播)\n- /user (用户管理)\n\n守卫: Token 验证","x":-400,"y":80,"width":280,"height":300,"color":"3"},
|
|
|
+ {"id":"store","type":"text","text":"**状态管理**\n`src/store/`\n\nPinia Stores:\n- app.ts (应用状态)\n- user.ts (用户信息)\n- stream.ts (流媒体)","x":-40,"y":-240,"width":260,"height":260,"color":"3"},
|
|
|
+ {"id":"api","type":"text","text":"**API 层**\n`src/api/`\n\n接口模块:\n- login.ts (认证)\n- user.ts (用户)\n- camera.ts (摄像头)\n- stream.ts (流媒体)\n\n基于 Axios 封装","x":-40,"y":80,"width":260,"height":300,"color":"3"},
|
|
|
+ {"id":"views","type":"text","text":"**页面视图**\n`src/views/`\n\n模块:\n- login/ (登录页)\n- camera/ (摄像头管理)\n- stream/ (视频/直播)\n- user/ (用户管理)","x":300,"y":-240,"width":280,"height":260,"color":"3"},
|
|
|
+ {"id":"components","type":"text","text":"**公共组件**\n`src/components/`\n\n- VideoPlayer.vue\n HLS.js 播放器\n- Layout 布局组件","x":300,"y":80,"width":280,"height":200,"color":"3"},
|
|
|
+ {"id":"backend","type":"text","text":"**后端 API**\n\ntg-live-game-hono\n\n接口:\n- /api/auth/*\n- /api/users/*\n- /api/cameras/*\n- /api/stream/*\n\n认证: JWT","x":-40,"y":460,"width":260,"height":260,"color":"2"},
|
|
|
+ {"id":"utils","type":"text","text":"**工具函数**\n`src/utils/`\n\n- request.ts (Axios)\n- auth.ts (Token)","x":300,"y":340,"width":280,"height":180,"color":"2"}
|
|
|
+ ],
|
|
|
+ "edges":[
|
|
|
+ {"id":"edge_entry_router","fromNode":"entry","fromSide":"bottom","toNode":"router","toSide":"top","label":"use()"},
|
|
|
+ {"id":"edge_entry_store","fromNode":"entry","fromSide":"right","toNode":"store","toSide":"left","label":"use()"},
|
|
|
+ {"id":"edge_router_views","fromNode":"router","fromSide":"right","toNode":"views","toSide":"left","label":"component"},
|
|
|
+ {"id":"edge_store_api","fromNode":"store","fromSide":"bottom","toNode":"api","toSide":"top","label":"actions"},
|
|
|
+ {"id":"edge_views_components","fromNode":"views","fromSide":"bottom","toNode":"components","toSide":"top","label":"import"},
|
|
|
+ {"id":"edge_api_backend","fromNode":"api","fromSide":"bottom","toNode":"backend","toSide":"top","label":"HTTP"},
|
|
|
+ {"id":"edge_api_utils","fromNode":"api","fromSide":"right","toNode":"utils","toSide":"left","label":"request"},
|
|
|
+ {"id":"edge_components_utils","fromNode":"components","fromSide":"bottom","toNode":"utils","toSide":"top"}
|
|
|
+ ]
|
|
|
+}
|