# my-search/my-search architecture

> Architecture diagram of the GitHub repository my-search/my-search, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/my-search/my-search
- Repository: https://github.com/my-search/my-search

## Overview

这是一个可订阅内容的浏览器搜索脚本：用户呼出搜索界面、检索资源，再打开 URL 或执行脚本/应用。README 还描述了订阅定义、TisHub 分享、历史、标签和多种搜索模式。源码摘录不完整，因此图只连接文档明确描述或摘录直接支持的行为；各组件路径均指向唯一的运行时代码文件。

Main entry points: [`my-search.js`](https://github.com/my-search/my-search/blob/master/my-search.js) (搜索界面)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["搜索交互"]
  node_search_ui["搜索界面<br/>[my-search.js]"]
  node_search_modes["搜索模式<br/>[my-search.js]"]
  node_result_actions["结果操作<br/>[my-search.js]"]
end

subgraph group_search["内容与匹配"]
  node_search_data["搜索数据<br/>[my-search.js]"]
  node_resource_parser["资源提取<br/>[my-search.js]"]
  node_matching["匹配检索<br/>[my-search.js]"]
  node_url_handling["URL处理<br/>[my-search.js]"]
  node_item_types["资源类型<br/>[my-search.js]"]
end

subgraph group_subscriptions["订阅与分享"]
  node_subscription_manager["订阅管理<br/>[my-search.js]"]
  node_subscription_files["订阅文件<br/>[my-search.js]"]
  node_tishub_sharing["TisHub分享<br/>[my-search.js]"]
end

subgraph group_state["本地状态"]
  node_history["搜索历史<br/>[my-search.js]"]
  node_tag_filters["标签筛选<br/>[my-search.js]"]
  node_local_cache[("本地缓存<br/>[my-search.js]")]
end

node_user(("用户"))
node_github["GitHub"]

node_user -->|"呼出"| node_search_ui
node_search_ui -->|"提交查询"| node_search_modes
node_search_modes -->|"选择模式"| node_matching
node_matching -->|"检索数据"| node_search_data
node_search_data -->|"呈现结果"| node_search_ui
node_user -->|"选择结果"| node_result_actions
node_result_actions -->|"处理链接"| node_url_handling
node_result_actions -->|"执行脚本或应用"| node_item_types
node_subscription_manager -->|"加载定义"| node_subscription_files
node_subscription_files -->|"提取资源"| node_resource_parser
node_resource_parser -->|"提供条目"| node_search_data
node_search_data -->|"读写缓存"| node_local_cache
node_history -->|"保存历史"| node_local_cache
node_search_ui -->|"记录选择"| node_history
node_search_ui -->|"筛选条目"| node_tag_filters
node_tag_filters -->|"过滤数据"| node_search_data
node_user -->|"提交订阅"| node_tishub_sharing
node_tishub_sharing -->|"读取本地订阅"| node_local_cache
node_tishub_sharing -.->|"比较并共享"| node_github
node_subscription_manager -.->|"获取远程订阅"| node_github

click node_search_ui "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_search_modes "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_result_actions "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_search_data "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_resource_parser "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_matching "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_url_handling "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_subscription_manager "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_subscription_files "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_tishub_sharing "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_history "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_tag_filters "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_local_cache "https://github.com/my-search/my-search/blob/master/my-search.js"
click node_item_types "https://github.com/my-search/my-search/blob/master/my-search.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_search_ui,node_search_modes,node_result_actions toneBlue
class node_search_data,node_resource_parser,node_matching,node_url_handling,node_item_types toneAmber
class node_subscription_manager,node_subscription_files,node_tishub_sharing toneMint
class node_history,node_tag_filters,node_local_cache toneRose
class node_user,node_github toneIndigo
```

## Components

### 搜索交互

- [搜索界面](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [搜索模式](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [结果操作](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`

### 内容与匹配

- [搜索数据](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [资源提取](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [匹配检索](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [URL处理](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [资源类型](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`

### 订阅与分享

- [订阅管理](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [订阅文件](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [TisHub分享](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`

### 本地状态

- [搜索历史](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [标签筛选](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`
- [本地缓存](https://github.com/my-search/my-search/blob/master/my-search.js): `my-search.js`

### Other components

- **用户**
- **GitHub**

## Connections

- 用户 → 搜索界面: 呼出
- 搜索界面 → 搜索模式: 提交查询
- 搜索模式 → 匹配检索: 选择模式
- 匹配检索 → 搜索数据: 检索数据
- 搜索数据 → 搜索界面: 呈现结果
- 用户 → 结果操作: 选择结果
- 结果操作 → URL处理: 处理链接
- 结果操作 → 资源类型: 执行脚本或应用
- 订阅管理 → 订阅文件: 加载定义
- 订阅文件 → 资源提取: 提取资源
- 资源提取 → 搜索数据: 提供条目
- 搜索数据 → 本地缓存: 读写缓存
- 搜索历史 → 本地缓存: 保存历史
- 搜索界面 → 搜索历史: 记录选择
- 搜索界面 → 标签筛选: 筛选条目
- 标签筛选 → 搜索数据: 过滤数据
- 用户 → TisHub分享: 提交订阅
- TisHub分享 → 本地缓存: 读取本地订阅
- TisHub分享 → GitHub: 比较并共享
- 订阅管理 → GitHub: 获取远程订阅
