# jetlinks/jetlinks-ui-antd architecture

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

- Interactive diagram: https://gitdiagram.com/jetlinks/jetlinks-ui-antd
- Repository: https://github.com/jetlinks/jetlinks-ui-antd

## Overview

JetLinks is a browser-based IoT management console. Users enter through the application shell, authenticate, and navigate server-provided menus to manage devices and products; the tree also shows distinct areas for data collection, connectivity, media, rules and alarms, notifications, and IoT SIM cards. The UI’s service modules call an external API, while shared request, menu, and WebSocket utilities support those experiences. The tree and excerpts establish the product areas, but most page-to-service wiring is unsampled, so those relationships are not drawn.

Main entry points: [`src/app.tsx`](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/app.tsx) (Application shell), [`src/pages/media`](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/media) (Media devices and streams), [`src/utils/BaseService.ts`](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/utils/BaseService.ts) (REST service base), [`src/hooks/websocket/useSendWebsocketMessage.ts`](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/hooks/websocket/useSendWebsocketMessage.ts) (WebSocket messaging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["Application shell<br/>[app.tsx]"]
  node_login["Login service<br/>[service.ts]"]
  node_menu["Menu administration<br/>[index.tsx]"]
  node_menu_service["Menu service<br/>[service.ts]"]
end

subgraph group_device["Device operations"]
  node_device_management["Device and product management<br/>[index.tsx]"]
  node_device_service["Device operations API<br/>[service.ts]"]
  node_product["Product management<br/>[index.tsx]"]
  node_data_collect["Data collection"]
  node_device_dash["Device dashboards<br/>[index.tsx]"]
end

subgraph group_connectivity["Connectivity and media"]
  node_link_access["Access configuration"]
  node_channels["Protocol channels"]
  node_edge["Edge resources"]
  node_media["Media devices and streams"]
  node_media_player["Media player<br/>[ScreenPlayer.tsx]"]
end

subgraph group_automation["Rules and notifications"]
  node_rule_engine["Rule engine and alarms"]
  node_notice["Notification configuration"]
  node_sim_cards["IoT card management"]
end

subgraph group_shared["Shared runtime"]
  node_base_service["REST service base<br/>[BaseService.ts]"]
  node_query_encoder["Query encoding<br/>[encodeQuery.ts]"]
  node_websocket_hook["WebSocket connection<br/>[useWebSocket.ts]"]
  node_websocket_messages["WebSocket messaging"]
  node_map["Map integration<br/>[amap.tsx]"]
end

node_user(("Console user"))
node_api{{"JetLinks API"}}

node_user -->|"uses"| node_app
node_app -->|"loads"| node_login
node_app -->|"loads"| node_menu
node_menu -->|"calls"| node_menu_service
node_login -->|"requests"| node_api
node_menu_service -.->|"requests"| node_api
node_device_service -->|"requests"| node_api
node_base_service -->|"requests"| node_api
node_product -.->|"requests"| node_api
node_data_collect -.->|"requests"| node_api
node_link_access -.->|"requests"| node_api
node_channels -.->|"requests"| node_api
node_edge -.->|"requests"| node_api
node_media -.->|"requests"| node_api
node_rule_engine -.->|"requests"| node_api
node_notice -.->|"requests"| node_api
node_sim_cards -.->|"requests"| node_api
node_device_management -.->|"uses"| node_device_service
node_media -.->|"uses"| node_media_player
node_websocket_messages -->|"uses"| node_websocket_hook
node_websocket_messages -->|"connects"| node_api
node_base_service -.->|"uses"| node_query_encoder

click node_app "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/app.tsx"
click node_login "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/user/Login/service.ts"
click node_menu "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/system/Menu/index.tsx"
click node_menu_service "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/system/Menu/service.ts"
click node_device_management "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Instance/index.tsx"
click node_device_service "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Instance/service.ts"
click node_product "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Product/index.tsx"
click node_data_collect "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/DataCollect"
click node_device_dash "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/DashBoard/index.tsx"
click node_link_access "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/link/AccessConfig"
click node_channels "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/link/Channel"
click node_edge "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/edge/Resource"
click node_media "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/media"
click node_media_player "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/components/Player/ScreenPlayer.tsx"
click node_rule_engine "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/rule-engine"
click node_notice "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/notice"
click node_sim_cards "https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/iot-card/CardManagement"
click node_base_service "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/utils/BaseService.ts"
click node_query_encoder "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/utils/encodeQuery.ts"
click node_websocket_hook "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/hooks/websocket/useWebSocket.ts"
click node_websocket_messages "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/hooks/websocket/useSendWebsocketMessage.ts"
click node_map "https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/components/AMapComponent/amap.tsx"

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_app,node_login,node_menu,node_menu_service,node_user toneBlue
class node_device_management,node_device_service,node_product,node_data_collect,node_device_dash toneAmber
class node_link_access,node_channels,node_edge,node_media,node_media_player,node_api toneMint
class node_rule_engine,node_notice,node_sim_cards toneRose
class node_base_service,node_query_encoder,node_websocket_hook,node_websocket_messages,node_map toneIndigo
```

## Components

### Application shell

- [Application shell](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/app.tsx): `src/app.tsx`
- [Login service](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/user/Login/service.ts): `src/pages/user/Login/service.ts`
- [Menu administration](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/system/Menu/index.tsx): `src/pages/system/Menu/index.tsx`
- [Menu service](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/system/Menu/service.ts): `src/pages/system/Menu/service.ts`

### Device operations

- [Device and product management](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Instance/index.tsx): `src/pages/device/Instance/index.tsx`
- [Device operations API](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Instance/service.ts): `src/pages/device/Instance/service.ts`
- [Product management](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/Product/index.tsx): `src/pages/device/Product/index.tsx`
- [Data collection](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/DataCollect): `src/pages/DataCollect`
- [Device dashboards](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/pages/device/DashBoard/index.tsx): `src/pages/device/DashBoard/index.tsx`

### Connectivity and media

- [Access configuration](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/link/AccessConfig): `src/pages/link/AccessConfig`
- [Protocol channels](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/link/Channel): `src/pages/link/Channel`
- [Edge resources](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/edge/Resource): `src/pages/edge/Resource`
- [Media devices and streams](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/media): `src/pages/media`
- [Media player](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/components/Player/ScreenPlayer.tsx): `src/components/Player/ScreenPlayer.tsx`

### Rules and notifications

- [Rule engine and alarms](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/rule-engine): `src/pages/rule-engine`
- [Notification configuration](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/notice): `src/pages/notice`
- [IoT card management](https://github.com/jetlinks/jetlinks-ui-antd/tree/master/src/pages/iot-card/CardManagement): `src/pages/iot-card/CardManagement`

### Shared runtime

- [REST service base](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/utils/BaseService.ts): `src/utils/BaseService.ts`
- [Query encoding](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/utils/encodeQuery.ts): `src/utils/encodeQuery.ts`
- [WebSocket connection](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/hooks/websocket/useWebSocket.ts): `src/hooks/websocket/useWebSocket.ts`
- [WebSocket messaging](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/hooks/websocket/useSendWebsocketMessage.ts): `src/hooks/websocket/useSendWebsocketMessage.ts`
- [Map integration](https://github.com/jetlinks/jetlinks-ui-antd/blob/master/src/components/AMapComponent/amap.tsx): `src/components/AMapComponent/amap.tsx`

### Other components

- **Console user**
- **JetLinks API**

## Connections

- Console user → Application shell: uses (evidence: `README.md`)
- Application shell → Login service: loads (evidence: `src/app.tsx`)
- Application shell → Menu administration: loads (evidence: `src/app.tsx`)
- Menu administration → Menu service: calls (evidence: `src/pages/system/Menu/index.tsx`)
- Login service → JetLinks API: requests (evidence: `src/pages/user/Login/service.ts`)
- Menu service → JetLinks API: requests
- Device operations API → JetLinks API: requests (evidence: `src/pages/device/Instance/service.ts`)
- REST service base → JetLinks API: requests (evidence: `src/utils/BaseService.ts`)
- Product management → JetLinks API: requests
- Data collection → JetLinks API: requests
- Access configuration → JetLinks API: requests
- Protocol channels → JetLinks API: requests
- Edge resources → JetLinks API: requests
- Media devices and streams → JetLinks API: requests
- Rule engine and alarms → JetLinks API: requests
- Notification configuration → JetLinks API: requests
- IoT card management → JetLinks API: requests
- Device and product management → Device operations API: uses
- Media devices and streams → Media player: uses
- WebSocket messaging → WebSocket connection: uses (evidence: `src/hooks/websocket/useSendWebsocketMessage.ts`)
- WebSocket messaging → JetLinks API: connects (evidence: `src/hooks/websocket/useSendWebsocketMessage.ts`)
- REST service base → Query encoding: uses
