Bot Front End Structure (DEPRECATED)
🤖

Bot Front End Structure (DEPRECATED)

Created by
ZhaohaoZhaohao
Tags
Frontend
Published
Published 2024-08-05 00:00
Last edited time
Last updated 2025-01-18 02:57

结构

  1. bot-vc-controller
      • 描述: bot 上用的。
      • 依赖: 使用 bot-libbot-ui 组件。
  1. bot-tv-homescreen
      • 描述: 外接屏幕用的。
      • 依赖: 使用 bot-libbot-ui 组件,同时通过 bot-helper 与浏览器进行通信。
  1. bot-helper
      • 描述: Chrome 扩展的源代码,充当 bot-tv-homescreen 和浏览器之间的桥梁,在开发过程中提供功能。
      • 依赖:
        • 会调用 bot-lib 中的内容来增强功能。
        • 需要在开发模式下使用。
  1. bot-helper-hmr
      • 描述: 热更新版本的 bot-helper,从云端获取源代码的 Chrome 扩展。
      • 依赖:
        • 使用 bot-helper 提供的功能。
        • 在生产环境的 Chrome 浏览器中会默认安装。
  1. bot-lib
      • 描述: 一个库,包含了各种可复用的组件和功能,用于 bot-vc-controllerbot-tv-homescreen
      • 依赖: bot-helper 会使用其提供的内容。
  1. bot-ui
      • 描述: 一个库,提供用户界面组件,供 bot-vc-controllerbot-tv-homescreen 使用。
      • 依赖: 被 bot-vc-controllerbot-tv-homescreen 引用。
  1. 浏览器
      • 描述: 用户端运行的环境,用于承载 bot-helperbot-helper-hmr,以及加载 bot-tv-homescreen

组件关系

  • bot-helper 是桥梁,负责与浏览器进行交互。
  • bot-helper-hmrbot-helper 的热更新版本,主要用于生产环境。
  • bot-libbot-ui 是核心库,支撑 bot-vc-controllerbot-tv-homescreen 的功能。
 
Copy mermaid
flowchart TD A[Chrome API] subgraph Extensions [Extensions] B[bot-helper] C[bot-helper-hmr] end subgraph Application [Application] D[bot-tv-homescreen] E[bot-vc-controller] F[bot-lib] G[bot-ui] end A --> B A --> C B --> D B --> E D --> F D --> G E --> F E --> G style A fill:#E8F0FE,stroke:#1A73E8,stroke-width:2px; style B fill:#BBE3F8,stroke:#1A73E8,stroke-width:2px; style C fill:#BBE3F8,stroke:#1A73E8,stroke-width:2px; style D fill:#F9EEDD,stroke:#D26D6D,stroke-width:2px; style E fill:#F9EEDD,stroke:#D26D6D,stroke-width:2px; style F fill:#F9EEDD,stroke:#D26D6D,stroke-width:2px; style G fill:#F9EEDD,stroke:#D26D6D,stroke-width:2px;

Comments