assembled-graph.json 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  1. {
  2. "nodes": [
  3. {
  4. "id": "document:README.md",
  5. "type": "document",
  6. "name": "README.md",
  7. "filePath": "README.md",
  8. "summary": "项目说明文档,描述游戏SDK平台的域名配置、环境要求和相关服务",
  9. "tags": [
  10. "documentation",
  11. "project-overview"
  12. ],
  13. "complexity": "simple"
  14. },
  15. {
  16. "id": "config:composer.json",
  17. "type": "config",
  18. "name": "composer.json",
  19. "filePath": "composer.json",
  20. "summary": "PHP依赖管理配置文件,定义ThinkPHP 5.0框架及支付、队列等依赖包",
  21. "tags": [
  22. "php",
  23. "dependencies",
  24. "composer"
  25. ],
  26. "complexity": "simple"
  27. },
  28. {
  29. "id": "file:public/index.php",
  30. "type": "file",
  31. "name": "index.php",
  32. "filePath": "public/index.php",
  33. "summary": "应用入口文件,设置CORS头、定义应用路径、加载常量配置和框架引导",
  34. "tags": [
  35. "entry-point",
  36. "php",
  37. "bootstrap"
  38. ],
  39. "complexity": "simple"
  40. },
  41. {
  42. "id": "config:application/config.php",
  43. "type": "config",
  44. "name": "config.php",
  45. "filePath": "application/config.php",
  46. "summary": "应用主配置文件,定义模块设置、URL路由、数据库缓存、模板引擎等核心配置",
  47. "tags": [
  48. "config",
  49. "thinkphp",
  50. "application"
  51. ],
  52. "complexity": "moderate"
  53. },
  54. {
  55. "id": "file:application/route.php",
  56. "type": "file",
  57. "name": "route.php",
  58. "filePath": "application/route.php",
  59. "summary": "路由配置文件,定义域名到模块的映射(admin/api/guildapi/complex/home/mobile),配置PC站和M站路由规则",
  60. "tags": [
  61. "routing",
  62. "thinkphp",
  63. "domain-mapping"
  64. ],
  65. "complexity": "complex"
  66. },
  67. {
  68. "id": "file:application/common.php",
  69. "type": "file",
  70. "name": "common.php",
  71. "filePath": "application/common.php",
  72. "summary": "公共函数库,包含随机数生成、数组排序、加密解密、HTTP请求、日期处理等通用工具函数",
  73. "tags": [
  74. "utility",
  75. "common",
  76. "helper"
  77. ],
  78. "complexity": "moderate"
  79. },
  80. {
  81. "id": "file:application/tags.php",
  82. "type": "file",
  83. "name": "tags.php",
  84. "filePath": "application/tags.php",
  85. "summary": "行为扩展定义文件,配置应用初始化、路由开始、模块初始化等钩子",
  86. "tags": [
  87. "hooks",
  88. "lifecycle",
  89. "thinkphp"
  90. ],
  91. "complexity": "simple"
  92. },
  93. {
  94. "id": "file:application/command.php",
  95. "type": "file",
  96. "name": "command.php",
  97. "filePath": "application/command.php",
  98. "summary": "命令行配置文件,注册自定义命令如Kafka消费者",
  99. "tags": [
  100. "cli",
  101. "commands",
  102. "kafka"
  103. ],
  104. "complexity": "simple"
  105. },
  106. {
  107. "id": "file:application/admin/common.php",
  108. "type": "file",
  109. "name": "admin/common.php",
  110. "filePath": "application/admin/common.php",
  111. "summary": "后台公共函数库,包含权限检查、日志记录、数据格式化等后台专用工具函数",
  112. "tags": [
  113. "admin",
  114. "utility",
  115. "helper"
  116. ],
  117. "complexity": "moderate"
  118. },
  119. {
  120. "id": "file:application/admin/controller/Admin.php",
  121. "type": "file",
  122. "name": "Admin.php",
  123. "filePath": "application/admin/controller/Admin.php",
  124. "summary": "后台公共控制器基类,实现登录验证、权限检查、WebSocket令牌管理",
  125. "tags": [
  126. "admin",
  127. "controller",
  128. "base-class",
  129. "auth"
  130. ],
  131. "complexity": "moderate"
  132. },
  133. {
  134. "id": "file:application/api/common.php",
  135. "type": "file",
  136. "name": "api/common.php",
  137. "filePath": "application/api/common.php",
  138. "summary": "API模块公共函数库,包含API签名验证、参数加密解密、渠道鉴权等",
  139. "tags": [
  140. "api",
  141. "utility",
  142. "auth"
  143. ],
  144. "complexity": "moderate"
  145. },
  146. {
  147. "id": "file:application/api/controller/v1/Login.php",
  148. "type": "file",
  149. "name": "Login.php",
  150. "filePath": "application/api/controller/v1/Login.php",
  151. "summary": "用户登录控制器,处理账号密码登录、手机验证码登录、第三方登录等",
  152. "tags": [
  153. "api",
  154. "login",
  155. "authentication"
  156. ],
  157. "complexity": "moderate"
  158. },
  159. {
  160. "id": "file:application/api/controller/v1/Pay.php",
  161. "type": "file",
  162. "name": "Pay.php",
  163. "filePath": "application/api/controller/v1/Pay.php",
  164. "summary": "支付控制器,处理游戏内充值、创建订单、调用支付渠道(支付宝/微信)",
  165. "tags": [
  166. "api",
  167. "payment",
  168. "alipay",
  169. "wechat"
  170. ],
  171. "complexity": "complex"
  172. },
  173. {
  174. "id": "file:application/api/controller/v1/PayNotify.php",
  175. "type": "file",
  176. "name": "PayNotify.php",
  177. "filePath": "application/api/controller/v1/PayNotify.php",
  178. "summary": "支付回调控制器,接收支付宝/微信支付结果通知,更新订单状态",
  179. "tags": [
  180. "api",
  181. "payment",
  182. "callback",
  183. "webhook"
  184. ],
  185. "complexity": "complex"
  186. },
  187. {
  188. "id": "file:application/api/controller/v1/Index.php",
  189. "type": "file",
  190. "name": "Index.php",
  191. "filePath": "application/api/controller/v1/Index.php",
  192. "summary": "API首页控制器,处理游戏列表、游戏详情、推广页面等",
  193. "tags": [
  194. "api",
  195. "game",
  196. "index"
  197. ],
  198. "complexity": "moderate"
  199. },
  200. {
  201. "id": "file:application/service/PayService.php",
  202. "type": "file",
  203. "name": "PayService.php",
  204. "filePath": "application/service/PayService.php",
  205. "summary": "支付服务类,封装支付宝WAP支付、APP支付、扫码支付等支付方式的调用逻辑",
  206. "tags": [
  207. "service",
  208. "payment",
  209. "alipay",
  210. "core"
  211. ],
  212. "complexity": "complex"
  213. },
  214. {
  215. "id": "file:application/service/GamePayService.php",
  216. "type": "file",
  217. "name": "GamePayService.php",
  218. "filePath": "application/service/GamePayService.php",
  219. "summary": "游戏支付服务类,处理游戏充值订单创建、支付渠道选择、回调处理",
  220. "tags": [
  221. "service",
  222. "payment",
  223. "game"
  224. ],
  225. "complexity": "complex"
  226. },
  227. {
  228. "id": "file:application/service/CommonService.php",
  229. "type": "file",
  230. "name": "CommonService.php",
  231. "filePath": "application/service/CommonService.php",
  232. "summary": "通用服务类,提供数据查询、缓存管理、配置获取等基础服务",
  233. "tags": [
  234. "service",
  235. "common",
  236. "utility"
  237. ],
  238. "complexity": "moderate"
  239. },
  240. {
  241. "id": "file:application/common/model/Game.php",
  242. "type": "file",
  243. "name": "Game.php",
  244. "filePath": "application/common/model/Game.php",
  245. "summary": "游戏数据模型,定义游戏表结构和关联关系",
  246. "tags": [
  247. "model",
  248. "game",
  249. "database"
  250. ],
  251. "complexity": "moderate"
  252. },
  253. {
  254. "id": "file:application/common/model/Members.php",
  255. "type": "file",
  256. "name": "Members.php",
  257. "filePath": "application/common/model/Members.php",
  258. "summary": "会员数据模型,定义用户表结构、登录状态、充值记录等关联",
  259. "tags": [
  260. "model",
  261. "user",
  262. "database"
  263. ],
  264. "complexity": "moderate"
  265. },
  266. {
  267. "id": "file:application/common/model/Pay.php",
  268. "type": "file",
  269. "name": "Pay.php",
  270. "filePath": "application/common/model/Pay.php",
  271. "summary": "支付订单数据模型,定义订单表结构、支付状态、退款记录等",
  272. "tags": [
  273. "model",
  274. "payment",
  275. "database"
  276. ],
  277. "complexity": "moderate"
  278. },
  279. {
  280. "id": "file:application/common/model/Channel.php",
  281. "type": "file",
  282. "name": "Channel.php",
  283. "filePath": "application/common/model/Channel.php",
  284. "summary": "渠道数据模型,定义渠道表结构、渠道配置、分成比例等",
  285. "tags": [
  286. "model",
  287. "channel",
  288. "database"
  289. ],
  290. "complexity": "moderate"
  291. },
  292. {
  293. "id": "file:application/common/model/Admin.php",
  294. "type": "file",
  295. "name": "Admin.php",
  296. "filePath": "application/common/model/Admin.php",
  297. "summary": "管理员数据模型,定义后台用户表结构、角色权限关联",
  298. "tags": [
  299. "model",
  300. "admin",
  301. "database"
  302. ],
  303. "complexity": "moderate"
  304. },
  305. {
  306. "id": "file:application/common/controller/Base.php",
  307. "type": "file",
  308. "name": "Base.php",
  309. "filePath": "application/common/controller/Base.php",
  310. "summary": "基础控制器类,提供跨模块的公共方法如响应输出、日志记录、异常处理",
  311. "tags": [
  312. "controller",
  313. "base-class",
  314. "common"
  315. ],
  316. "complexity": "moderate"
  317. },
  318. {
  319. "id": "file:application/guildapi/controller",
  320. "type": "file",
  321. "name": "guildapi/controllers",
  322. "filePath": "application/guildapi/controller",
  323. "summary": "公会API控制器目录,处理公会后台的频道管理、数据统计、结算等接口",
  324. "tags": [
  325. "guild",
  326. "api",
  327. "controller"
  328. ],
  329. "complexity": "moderate"
  330. },
  331. {
  332. "id": "file:application/complex/controller",
  333. "type": "file",
  334. "name": "complex/controllers",
  335. "filePath": "application/complex/controller",
  336. "summary": "渠道SDK对接控制器目录,处理第三方渠道的登录、支付、数据同步等",
  337. "tags": [
  338. "complex",
  339. "channel",
  340. "sdk"
  341. ],
  342. "complexity": "complex"
  343. },
  344. {
  345. "id": "file:application/home/controller",
  346. "type": "file",
  347. "name": "home/controllers",
  348. "filePath": "application/home/controller",
  349. "summary": "官网控制器目录,处理PC端官网的游戏展示、用户中心、客服系统等",
  350. "tags": [
  351. "home",
  352. "website",
  353. "frontend"
  354. ],
  355. "complexity": "moderate"
  356. },
  357. {
  358. "id": "file:application/mobile/controller",
  359. "type": "file",
  360. "name": "mobile/controllers",
  361. "filePath": "application/mobile/controller",
  362. "summary": "移动端控制器目录,处理H5端的游戏展示、用户中心、支付等",
  363. "tags": [
  364. "mobile",
  365. "h5",
  366. "frontend"
  367. ],
  368. "complexity": "moderate"
  369. },
  370. {
  371. "id": "file:application/crontab",
  372. "type": "file",
  373. "name": "crontab",
  374. "filePath": "application/crontab",
  375. "summary": "定时任务目录,包含渠道结算、数据统计、支付超时处理等定时任务",
  376. "tags": [
  377. "cron",
  378. "scheduled",
  379. "batch"
  380. ],
  381. "complexity": "moderate"
  382. },
  383. {
  384. "id": "file:application/command/KafkaConsumer.php",
  385. "type": "file",
  386. "name": "KafkaConsumer.php",
  387. "filePath": "application/command/KafkaConsumer.php",
  388. "summary": "Kafka消费者命令,异步处理消息队列中的任务",
  389. "tags": [
  390. "kafka",
  391. "queue",
  392. "async"
  393. ],
  394. "complexity": "moderate"
  395. },
  396. {
  397. "id": "file:extend/alipay",
  398. "type": "file",
  399. "name": "alipay SDK",
  400. "filePath": "extend/alipay",
  401. "summary": "支付宝SDK扩展目录,包含支付宝支付接口的PHP实现",
  402. "tags": [
  403. "alipay",
  404. "sdk",
  405. "payment"
  406. ],
  407. "complexity": "complex"
  408. },
  409. {
  410. "id": "file:extend/DouYinGameOpen",
  411. "type": "file",
  412. "name": "DouYinGameOpen",
  413. "filePath": "extend/DouYinGameOpen",
  414. "summary": "抖音游戏开放平台SDK,处理抖音渠道的登录和支付",
  415. "tags": [
  416. "douyin",
  417. "sdk",
  418. "channel"
  419. ],
  420. "complexity": "moderate"
  421. },
  422. {
  423. "id": "file:extend/LdzfPay",
  424. "type": "file",
  425. "name": "LdzfPay",
  426. "filePath": "extend/LdzfPay",
  427. "summary": "联动支付SDK扩展,提供联动优势支付渠道的接入",
  428. "tags": [
  429. "ldzf",
  430. "sdk",
  431. "payment"
  432. ],
  433. "complexity": "moderate"
  434. },
  435. {
  436. "id": "file:extend/Obs",
  437. "type": "file",
  438. "name": "ObsClient",
  439. "filePath": "extend/Obs",
  440. "summary": "华为云OBS客户端扩展,用于对象存储服务(文件上传下载)",
  441. "tags": [
  442. "huawei",
  443. "obs",
  444. "storage"
  445. ],
  446. "complexity": "moderate"
  447. },
  448. {
  449. "id": "file:thinkphp",
  450. "type": "file",
  451. "name": "ThinkPHP Framework",
  452. "filePath": "thinkphp",
  453. "summary": "ThinkPHP 5.0框架核心目录,包含路由、控制器、模型、视图等核心组件",
  454. "tags": [
  455. "framework",
  456. "thinkphp",
  457. "core"
  458. ],
  459. "complexity": "complex"
  460. },
  461. {
  462. "id": "file:public/static",
  463. "type": "file",
  464. "name": "static assets",
  465. "filePath": "public/static",
  466. "summary": "静态资源目录,包含CSS、JavaScript、图片、字体等前端资源",
  467. "tags": [
  468. "static",
  469. "frontend",
  470. "assets"
  471. ],
  472. "complexity": "simple"
  473. },
  474. {
  475. "id": "file:application/admin/view",
  476. "type": "file",
  477. "name": "admin views",
  478. "filePath": "application/admin/view",
  479. "summary": "后台视图模板目录,包含后台管理界面的HTML模板文件",
  480. "tags": [
  481. "admin",
  482. "view",
  483. "template"
  484. ],
  485. "complexity": "simple"
  486. },
  487. {
  488. "id": "config:.env_dev",
  489. "type": "config",
  490. "name": ".env_dev",
  491. "filePath": ".env_dev",
  492. "summary": "开发环境配置文件,包含数据库连接、Redis配置、第三方服务密钥等",
  493. "tags": [
  494. "config",
  495. "env",
  496. "development"
  497. ],
  498. "complexity": "simple"
  499. },
  500. {
  501. "id": "config:.env_pro",
  502. "type": "config",
  503. "name": ".env_pro",
  504. "filePath": ".env_pro",
  505. "summary": "生产环境配置文件,包含生产数据库、Redis、支付密钥等敏感配置",
  506. "tags": [
  507. "config",
  508. "env",
  509. "production"
  510. ],
  511. "complexity": "simple"
  512. },
  513. {
  514. "id": "file:public/constants.php",
  515. "type": "file",
  516. "name": "constants.php",
  517. "filePath": "public/constants.php",
  518. "summary": "全局常量定义文件,定义域名、路径、状态码等应用常量",
  519. "tags": [
  520. "constants",
  521. "config",
  522. "global"
  523. ],
  524. "complexity": "simple"
  525. },
  526. {
  527. "id": "file:application/common/library",
  528. "type": "file",
  529. "name": "common/library",
  530. "filePath": "application/common/library",
  531. "summary": "公共类库目录,包含WebSocket、短信发送、文件处理、数据导出等工具类",
  532. "tags": [
  533. "library",
  534. "common",
  535. "utility"
  536. ],
  537. "complexity": "moderate"
  538. },
  539. {
  540. "id": "file:application/common/logic",
  541. "type": "file",
  542. "name": "common/logic",
  543. "filePath": "application/common/logic",
  544. "summary": "公共业务逻辑目录,包含支付工厂、子包管理、数据同步等业务逻辑",
  545. "tags": [
  546. "logic",
  547. "business",
  548. "common"
  549. ],
  550. "complexity": "moderate"
  551. },
  552. {
  553. "id": "file:application/common/validate",
  554. "type": "file",
  555. "name": "common/validate",
  556. "filePath": "application/common/validate",
  557. "summary": "公共验证器目录,定义请求参数验证规则",
  558. "tags": [
  559. "validate",
  560. "common",
  561. "input"
  562. ],
  563. "complexity": "simple"
  564. },
  565. {
  566. "id": "file:application/extra",
  567. "type": "file",
  568. "name": "extra configs",
  569. "filePath": "application/extra",
  570. "summary": "扩展配置目录,包含Kafka配置、队列配置、操作日志配置等",
  571. "tags": [
  572. "config",
  573. "extra",
  574. "kafka"
  575. ],
  576. "complexity": "simple"
  577. }
  578. ],
  579. "project": {
  580. "name": "new_sdk",
  581. "analyzedAt": "2026-06-30T09:17:43Z",
  582. "languages": [
  583. "php",
  584. "html",
  585. "javascript",
  586. "css"
  587. ],
  588. "frameworks": [
  589. "ThinkPHP"
  590. ],
  591. "gitCommitHash": "7d315b54fbf4a43df94cdcfca70d7507c65d9628",
  592. "description": "游戏SDK平台 - 基于ThinkPHP 5.0的游戏渠道SDK对接、支付回调、公会管理后台"
  593. },
  594. "tour": [
  595. {
  596. "order": 1,
  597. "title": "项目概览",
  598. "description": "阅读README了解项目背景:这是一个基于ThinkPHP 5.0的游戏SDK平台,包含后台管理、API接口、公会系统、渠道SDK对接等模块",
  599. "nodeIds": [
  600. "document:README.md"
  601. ]
  602. },
  603. {
  604. "order": 2,
  605. "title": "应用入口",
  606. "description": "从public/index.php开始,了解应用如何启动:设置CORS头、加载常量配置、引入ThinkPHP框架",
  607. "nodeIds": [
  608. "file:public/index.php"
  609. ]
  610. },
  611. {
  612. "order": 3,
  613. "title": "路由配置",
  614. "description": "查看route.php理解域名路由映射:不同子域名(admin/api/www/m等)对应不同模块,实现多站点共用一套代码",
  615. "nodeIds": [
  616. "file:application/route.php"
  617. ]
  618. },
  619. {
  620. "order": 4,
  621. "title": "配置系统",
  622. "description": "了解配置层:.env文件存储环境变量,config.php读取环境配置,extra目录存放扩展配置",
  623. "nodeIds": [
  624. "config:.env_dev",
  625. "config:application/config.php",
  626. "file:application/extra"
  627. ]
  628. },
  629. {
  630. "order": 5,
  631. "title": "数据模型",
  632. "description": "浏览common/model目录,了解核心数据表:Game(游戏)、Members(会员)、Pay(订单)、Channel(渠道)",
  633. "nodeIds": [
  634. "file:application/common/model/Game.php",
  635. "file:application/common/model/Members.php",
  636. "file:application/common/model/Pay.php"
  637. ]
  638. },
  639. {
  640. "order": 6,
  641. "title": "支付流程",
  642. "description": "追踪支付核心链路:Pay控制器 → PayService → 支付宝SDK,理解订单创建和回调处理",
  643. "nodeIds": [
  644. "file:application/api/controller/v1/Pay.php",
  645. "file:application/service/PayService.php",
  646. "file:extend/alipay"
  647. ]
  648. },
  649. {
  650. "order": 7,
  651. "title": "后台管理",
  652. "description": "了解后台管理系统:Admin基类控制器实现权限检查,各业务控制器继承实现具体功能",
  653. "nodeIds": [
  654. "file:application/admin/controller/Admin.php",
  655. "file:application/common/controller/Base.php"
  656. ]
  657. },
  658. {
  659. "order": 8,
  660. "title": "业务模块",
  661. "description": "了解多模块架构:api(游戏API)、guildapi(公会API)、complex(渠道SDK)、home(官网)、mobile(移动端)",
  662. "nodeIds": [
  663. "file:application/guildapi/controller",
  664. "file:application/complex/controller",
  665. "file:application/home/controller"
  666. ]
  667. },
  668. {
  669. "order": 9,
  670. "title": "定时任务",
  671. "description": "查看crontab目录,了解定时任务:渠道结算、数据统计、支付超时处理等后台批处理",
  672. "nodeIds": [
  673. "file:application/crontab"
  674. ]
  675. },
  676. {
  677. "order": 10,
  678. "title": "公共工具",
  679. "description": "浏览common.php和common/library,了解项目复用的工具函数和类库",
  680. "nodeIds": [
  681. "file:application/common.php",
  682. "file:application/common/library"
  683. ]
  684. }
  685. ],
  686. "layers": [
  687. {
  688. "id": "layer:entry",
  689. "name": "入口层",
  690. "description": "应用入口和框架引导,包含index.php和ThinkPHP框架启动",
  691. "nodeIds": [
  692. "file:public/index.php",
  693. "file:thinkphp",
  694. "file:public/constants.php"
  695. ]
  696. },
  697. {
  698. "id": "layer:config",
  699. "name": "配置层",
  700. "description": "应用配置、环境变量、路由规则等配置文件",
  701. "nodeIds": [
  702. "config:application/config.php",
  703. "config:.env_dev",
  704. "config:.env_pro",
  705. "file:application/route.php",
  706. "file:application/tags.php",
  707. "file:application/command.php",
  708. "file:application/extra"
  709. ]
  710. },
  711. {
  712. "id": "layer:model",
  713. "name": "数据模型层",
  714. "description": "数据库表结构定义、ORM模型、数据关联关系",
  715. "nodeIds": [
  716. "file:application/common/model/Game.php",
  717. "file:application/common/model/Members.php",
  718. "file:application/common/model/Pay.php",
  719. "file:application/common/model/Channel.php",
  720. "file:application/common/model/Admin.php"
  721. ]
  722. },
  723. {
  724. "id": "layer:service",
  725. "name": "服务层",
  726. "description": "业务服务类,封装核心业务逻辑如支付、游戏、会员等",
  727. "nodeIds": [
  728. "file:application/service/PayService.php",
  729. "file:application/service/GamePayService.php",
  730. "file:application/service/CommonService.php"
  731. ]
  732. },
  733. {
  734. "id": "layer:controller",
  735. "name": "控制器层",
  736. "description": "HTTP请求处理,包含后台管理、API接口、官网、移动端等控制器",
  737. "nodeIds": [
  738. "file:application/admin/controller/Admin.php",
  739. "file:application/api/controller/v1/Login.php",
  740. "file:application/api/controller/v1/Pay.php",
  741. "file:application/api/controller/v1/PayNotify.php",
  742. "file:application/api/controller/v1/Index.php",
  743. "file:application/common/controller/Base.php"
  744. ]
  745. },
  746. {
  747. "id": "layer:business",
  748. "name": "业务模块层",
  749. "description": "按业务领域划分的模块,包含公会API、渠道SDK、官网、移动端等",
  750. "nodeIds": [
  751. "file:application/guildapi/controller",
  752. "file:application/complex/controller",
  753. "file:application/home/controller",
  754. "file:application/mobile/controller"
  755. ]
  756. },
  757. {
  758. "id": "layer:common",
  759. "name": "公共层",
  760. "description": "跨模块共享的工具函数、类库、业务逻辑、验证器",
  761. "nodeIds": [
  762. "file:application/common.php",
  763. "file:application/admin/common.php",
  764. "file:application/api/common.php",
  765. "file:application/common/library",
  766. "file:application/common/logic",
  767. "file:application/common/validate"
  768. ]
  769. },
  770. {
  771. "id": "layer:extension",
  772. "name": "扩展层",
  773. "description": "第三方SDK扩展,包含支付宝、抖音、联动支付等支付渠道SDK",
  774. "nodeIds": [
  775. "file:extend/alipay",
  776. "file:extend/DouYinGameOpen",
  777. "file:extend/LdzfPay",
  778. "file:extend/Obs"
  779. ]
  780. },
  781. {
  782. "id": "layer:task",
  783. "name": "任务层",
  784. "description": "定时任务和异步任务,包含渠道结算、数据统计、消息队列消费",
  785. "nodeIds": [
  786. "file:application/crontab",
  787. "file:application/command/KafkaConsumer.php"
  788. ]
  789. },
  790. {
  791. "id": "layer:frontend",
  792. "name": "前端层",
  793. "description": "前端资源和视图模板,包含静态文件、后台模板、官网页面",
  794. "nodeIds": [
  795. "file:public/static",
  796. "file:application/admin/view"
  797. ]
  798. },
  799. {
  800. "id": "layer:docs",
  801. "name": "文档层",
  802. "description": "项目文档和依赖配置",
  803. "nodeIds": [
  804. "document:README.md",
  805. "config:composer.json"
  806. ]
  807. }
  808. ],
  809. "edges": [
  810. {
  811. "source": "file:public/index.php",
  812. "target": "config:application/config.php",
  813. "type": "reads_from",
  814. "weight": 0.8,
  815. "direction": "forward"
  816. },
  817. {
  818. "source": "file:public/index.php",
  819. "target": "file:application/route.php",
  820. "type": "reads_from",
  821. "weight": 0.7,
  822. "direction": "forward"
  823. },
  824. {
  825. "source": "file:public/index.php",
  826. "target": "file:thinkphp",
  827. "type": "imports",
  828. "weight": 0.9,
  829. "direction": "forward"
  830. },
  831. {
  832. "source": "file:application/admin/controller/Admin.php",
  833. "target": "file:application/common/controller/Base.php",
  834. "type": "inherits",
  835. "weight": 0.9,
  836. "direction": "forward"
  837. },
  838. {
  839. "source": "file:application/admin/controller/Admin.php",
  840. "target": "file:application/common/model/Admin.php",
  841. "type": "calls",
  842. "weight": 0.7,
  843. "direction": "forward"
  844. },
  845. {
  846. "source": "file:application/api/controller/v1/Pay.php",
  847. "target": "file:application/service/PayService.php",
  848. "type": "calls",
  849. "weight": 0.8,
  850. "direction": "forward"
  851. },
  852. {
  853. "source": "file:application/api/controller/v1/Pay.php",
  854. "target": "file:application/service/GamePayService.php",
  855. "type": "calls",
  856. "weight": 0.8,
  857. "direction": "forward"
  858. },
  859. {
  860. "source": "file:application/service/PayService.php",
  861. "target": "file:extend/alipay",
  862. "type": "imports",
  863. "weight": 0.8,
  864. "direction": "forward"
  865. },
  866. {
  867. "source": "file:application/api/controller/v1/PayNotify.php",
  868. "target": "file:application/service/PayService.php",
  869. "type": "calls",
  870. "weight": 0.8,
  871. "direction": "forward"
  872. },
  873. {
  874. "source": "file:application/api/controller/v1/PayNotify.php",
  875. "target": "file:application/service/GamePayService.php",
  876. "type": "calls",
  877. "weight": 0.8,
  878. "direction": "forward"
  879. },
  880. {
  881. "source": "file:application/service/GamePayService.php",
  882. "target": "file:application/common/model/Pay.php",
  883. "type": "calls",
  884. "weight": 0.8,
  885. "direction": "forward"
  886. },
  887. {
  888. "source": "file:application/service/GamePayService.php",
  889. "target": "file:application/common/model/Game.php",
  890. "type": "calls",
  891. "weight": 0.7,
  892. "direction": "forward"
  893. },
  894. {
  895. "source": "file:application/service/GamePayService.php",
  896. "target": "file:application/common/model/Members.php",
  897. "type": "calls",
  898. "weight": 0.7,
  899. "direction": "forward"
  900. },
  901. {
  902. "source": "file:application/api/controller/v1/Login.php",
  903. "target": "file:application/common/model/Members.php",
  904. "type": "calls",
  905. "weight": 0.8,
  906. "direction": "forward"
  907. },
  908. {
  909. "source": "file:application/common/model/Game.php",
  910. "target": "file:application/common/model/Channel.php",
  911. "type": "related",
  912. "weight": 0.6,
  913. "direction": "forward"
  914. },
  915. {
  916. "source": "file:application/common/model/Pay.php",
  917. "target": "file:application/common/model/Members.php",
  918. "type": "related",
  919. "weight": 0.7,
  920. "direction": "forward"
  921. },
  922. {
  923. "source": "file:application/crontab",
  924. "target": "file:application/common/model/Channel.php",
  925. "type": "calls",
  926. "weight": 0.6,
  927. "direction": "forward"
  928. },
  929. {
  930. "source": "file:application/crontab",
  931. "target": "file:application/common/model/Pay.php",
  932. "type": "calls",
  933. "weight": 0.6,
  934. "direction": "forward"
  935. },
  936. {
  937. "source": "file:application/command/KafkaConsumer.php",
  938. "target": "file:application/extra",
  939. "type": "configures",
  940. "weight": 0.5,
  941. "direction": "forward"
  942. },
  943. {
  944. "source": "file:application/complex/controller",
  945. "target": "file:extend/DouYinGameOpen",
  946. "type": "imports",
  947. "weight": 0.7,
  948. "direction": "forward"
  949. },
  950. {
  951. "source": "file:application/home/controller",
  952. "target": "file:application/common/controller/Base.php",
  953. "type": "inherits",
  954. "weight": 0.8,
  955. "direction": "forward"
  956. },
  957. {
  958. "source": "file:application/mobile/controller",
  959. "target": "file:application/common/controller/Base.php",
  960. "type": "inherits",
  961. "weight": 0.8,
  962. "direction": "forward"
  963. },
  964. {
  965. "source": "config:.env_dev",
  966. "target": "config:application/config.php",
  967. "type": "configures",
  968. "weight": 0.9,
  969. "direction": "forward"
  970. },
  971. {
  972. "source": "config:.env_pro",
  973. "target": "config:application/config.php",
  974. "type": "configures",
  975. "weight": 0.9,
  976. "direction": "forward"
  977. }
  978. ],
  979. "version": "1.0.0"
  980. }