# zzyandcjl/duoyi-head-mounted-device-software architecture

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

- Interactive diagram: https://gitdiagram.com/zzyandcjl/duoyi-head-mounted-device-software
- Repository: https://github.com/zzyandcjl/duoyi-head-mounted-device-software

## Overview

DuoYi is an Android wearable capture and remote-collaboration app. The main documented workflow is to capture UVC camera and headset media, then save it locally and/or stream video and voice for remote viewing; recordings can also be uploaded for Feishu delivery. The README describes a Node.js web/backend and vision capabilities, but those sources are not in this tree (they are identified as other branches), so their nodes have no source paths. App-level wiring beyond the documented flows is not verifiable from the sampled Kotlin excerpts.

Main entry points: [`app/src/main/java/com/example/zzyy/MainActivity.kt`](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/MainActivity.kt) (Android app), [`app/src/main/java/com/example/zzyy/upload/FeishuUploadClient.kt`](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/upload/FeishuUploadClient.kt) (Upload client), [`app/src/main/java/com/example/zzyy/live/RtmpLiveStreamer.kt`](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/RtmpLiveStreamer.kt) (RTMP streamer), [`app/src/main/java/com/example/zzyy/live/LiveNotificationClient.kt`](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/LiveNotificationClient.kt) (Live notices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and media"]
  node_activity["Android app<br/>[MainActivity.kt]"]
  node_uvc["UVC camera<br/>[UvcVideoSource.kt]"]
  node_localmedia[("Local media<br/>[MainActivity.kt]")]
  node_uploadclient["Upload client"]
  node_uploadsettings["Upload settings<br/>[UploadSettings.kt]"]
end

subgraph group_live["Live collaboration"]
  node_srs["SRS RTMP"]
  node_streamer["RTMP streamer"]
  node_livekit["LiveKit voice"]
  node_notification["Live notices"]
end

subgraph group_services["Web and services"]
  node_backend["Node backend"]
  node_browser(("Viewer browser"))
  node_watchpages["Watch pages"]
  node_groundstation["Ground station"]
  node_vision["YOLO proxy"]
  node_feishu["Feishu group"]
end

node_operator(("Device operator"))

node_operator -->|"operates"| node_activity
node_activity -->|"captures from"| node_uvc
node_activity -->|"saves media"| node_localmedia
node_activity -->|"starts video"| node_streamer
node_streamer -->|"streams to"| node_srs
node_activity -->|"starts voice"| node_livekit
node_activity -->|"uploads recordings"| node_uploadclient
node_uploadclient -->|"sends video"| node_backend
node_uploadclient -->|"uses settings"| node_uploadsettings
node_backend -->|"delivers recordings"| node_feishu
node_activity -->|"notifies"| node_notification
node_notification -->|"sends notices"| node_backend
node_operator -->|"shares link"| node_browser
node_browser -->|"opens"| node_watchpages
node_watchpages -->|"views stream"| node_srs
node_watchpages -->|"joins voice"| node_livekit
node_watchpages -.->|"embeds"| node_groundstation
node_watchpages -.->|"requests recognition"| node_vision

click node_activity "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/MainActivity.kt"
click node_uvc "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/UvcVideoSource.kt"
click node_localmedia "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/MainActivity.kt"
click node_uploadclient "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/upload/FeishuUploadClient.kt"
click node_uploadsettings "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/upload/UploadSettings.kt"
click node_streamer "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/RtmpLiveStreamer.kt"
click node_notification "https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/LiveNotificationClient.kt"

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_activity,node_uvc,node_localmedia,node_uploadclient,node_uploadsettings toneBlue
class node_srs,node_streamer,node_livekit,node_notification toneAmber
class node_backend,node_browser,node_watchpages,node_groundstation,node_vision,node_feishu toneMint
class node_operator toneIndigo
```

## Components

### Capture and media

- [Android app](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/MainActivity.kt): `app/src/main/java/com/example/zzyy/MainActivity.kt`
- [UVC camera](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/UvcVideoSource.kt): `app/src/main/java/com/example/zzyy/live/UvcVideoSource.kt`
- [Local media](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/MainActivity.kt): `app/src/main/java/com/example/zzyy/MainActivity.kt`
- [Upload client](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/upload/FeishuUploadClient.kt): `app/src/main/java/com/example/zzyy/upload/FeishuUploadClient.kt`
- [Upload settings](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/upload/UploadSettings.kt): `app/src/main/java/com/example/zzyy/upload/UploadSettings.kt`

### Live collaboration

- **SRS RTMP**
- [RTMP streamer](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/RtmpLiveStreamer.kt): `app/src/main/java/com/example/zzyy/live/RtmpLiveStreamer.kt`
- **LiveKit voice**
- [Live notices](https://github.com/zzyandcjl/duoyi-head-mounted-device-software/blob/main/app/src/main/java/com/example/zzyy/live/LiveNotificationClient.kt): `app/src/main/java/com/example/zzyy/live/LiveNotificationClient.kt`

### Web and services

- **Node backend**
- **Viewer browser**
- **Watch pages**
- **Ground station**
- **YOLO proxy**
- **Feishu group**

### Other components

- **Device operator**

## Connections

- Device operator → Android app: operates
- Android app → UVC camera: captures from
- Android app → Local media: saves media
- Android app → RTMP streamer: starts video
- RTMP streamer → SRS RTMP: streams to
- Android app → LiveKit voice: starts voice
- Android app → Upload client: uploads recordings
- Upload client → Node backend: sends video
- Upload client → Upload settings: uses settings
- Node backend → Feishu group: delivers recordings
- Android app → Live notices: notifies
- Live notices → Node backend: sends notices
- Device operator → Viewer browser: shares link
- Viewer browser → Watch pages: opens
- Watch pages → SRS RTMP: views stream
- Watch pages → LiveKit voice: joins voice
- Watch pages → Ground station: embeds
- Watch pages → YOLO proxy: requests recognition
