# mokzhizhuan/greyform_uis architecture

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

- Interactive diagram: https://gitdiagram.com/mokzhizhuan/greyform_uis
- Repository: https://github.com/mokzhizhuan/greyform_uis

## Overview

GreyForm is a ROS-based operator interface for selecting PBU data and initiating wall marking. The main workflow runs from the React operator GUI through FastAPI’s directory/file operations and marking endpoints, then into ROS message publication for wall processing. Separate components handle wall-flow checks and controller-driven file/selection publication. Several backend and ROS implementation details were not sampled; edges are limited to documented or indexed references, and generated message code is grouped as interface definitions.

Main entry points: [`newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx) (Workflow status), [`newui_Greyform/src/talker_listener/talker_listener/talker_node.py`](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/talker_node.py) (ROS publisher), [`newui_Greyform/backend/main.py`](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/main.py) (API and file operations), [`newui_Greyform/backend/marking_controller.py`](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/marking_controller.py) (Wall marking controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator interface"]
  node_app["React app<br/>[App.tsx]"]
  node_status["Workflow status<br/>[Status.tsx]"]
  node_select["Select PBU<br/>[SelectPBUFile.tsx]"]
  node_detect["Detect PBU<br/>[DetectPBU.tsx]"]
  node_fourflow["Four-wall flow<br/>[FourWallFlow.tsx]"]
  node_sixflow["Six-wall flow<br/>[SixWallFlow.tsx]"]
  node_homecheck["Home checks"]
  node_homeverified["Home verification<br/>[HomeVerified.tsx]"]
  node_automode["Auto mode<br/>[SetToAutoMode.tsx]"]
end

subgraph group_api["FastAPI backend"]
  node_api_main["API and file operations<br/>[main.py]"]
  node_mark_ctrl["Wall marking controller"]
  node_marking["ROS marking API<br/>[marking.py]"]
  node_runner["Marking runner<br/>[runner.py]"]
end

subgraph group_ros["ROS processing"]
  node_controller_node["ROS controller node<br/>[controller_node.py]"]
  node_talker["ROS publisher<br/>[talker_node.py]"]
  node_listener["ROS listener<br/>[listener_node.py]"]
end

subgraph group_interfaces["ROS interfaces"]
  node_messages["Wall message types<br/>[_SelectionWall.py]"]
  node_file_message["File message type"]
end

node_operator(("Operator"))
node_remote_robot["Robot host"]
node_ros_topics["ROS topics"]

node_operator -->|"uses"| node_app
node_app -->|"renders"| node_status
node_status -->|"renders"| node_select
node_status -->|"renders"| node_detect
node_status -->|"renders"| node_fourflow
node_status -->|"renders"| node_sixflow
node_status -->|"renders"| node_homecheck
node_status -->|"renders"| node_homeverified
node_status -->|"renders"| node_automode
node_status -->|"calls API"| node_api_main
node_sixflow -->|"calls marking API"| node_mark_ctrl
node_api_main -->|"mounts subapp"| node_mark_ctrl
node_api_main -->|"runs SSH commands"| node_remote_robot
node_mark_ctrl -->|"runs marking command"| node_remote_robot
node_marking -->|"uses"| node_runner
node_marking -->|"publishes selections"| node_talker
node_controller_node -->|"calls publisher"| node_talker
node_talker -->|"publishes messages"| node_ros_topics
node_talker -->|"publishes selection"| node_messages
node_talker -->|"publishes files"| node_file_message
node_listener -.->|"subscribes"| node_ros_topics

click node_app "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/App.tsx"
click node_status "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx"
click node_select "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SelectPBUFile.tsx"
click node_detect "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/DetectPBU.tsx"
click node_fourflow "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/FourWallFlow.tsx"
click node_sixflow "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SixWallFlow.tsx"
click node_homecheck "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/HomePositionCheck.tsx"
click node_homeverified "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/HomeVerified.tsx"
click node_automode "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SetToAutoMode.tsx"
click node_api_main "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/main.py"
click node_mark_ctrl "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/marking_controller.py"
click node_marking "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/marking.py"
click node_runner "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/runner.py"
click node_controller_node "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/controller_node.py"
click node_talker "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/talker_node.py"
click node_listener "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/listener_node.py"
click node_messages "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_SelectionWall.py"
click node_file_message "https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_FileExtractionMessage.py"

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_status,node_select,node_detect,node_fourflow,node_sixflow,node_homecheck,node_homeverified,node_automode toneBlue
class node_api_main,node_mark_ctrl,node_marking,node_runner toneAmber
class node_controller_node,node_talker,node_listener toneMint
class node_messages,node_file_message toneRose
class node_operator,node_remote_robot,node_ros_topics toneIndigo
```

## Components

### Operator interface

- [React app](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/App.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/App.tsx`
- [Workflow status](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`
- [Select PBU](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SelectPBUFile.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/SelectPBUFile.tsx`
- [Detect PBU](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/DetectPBU.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/DetectPBU.tsx`
- [Four-wall flow](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/FourWallFlow.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/FourWallFlow.tsx`
- [Six-wall flow](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SixWallFlow.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/SixWallFlow.tsx`
- [Home checks](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/HomePositionCheck.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/HomePositionCheck.tsx`
- [Home verification](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/HomeVerified.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/HomeVerified.tsx`
- [Auto mode](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/greyformui-usb-completionmessage/src/Components/SetToAutoMode.tsx): `newui_Greyform/greyformui-usb-completionmessage/src/Components/SetToAutoMode.tsx`

### FastAPI backend

- [API and file operations](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/main.py): `newui_Greyform/backend/main.py`
- [Wall marking controller](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/marking_controller.py): `newui_Greyform/backend/marking_controller.py`
- [ROS marking API](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/marking.py): `newui_Greyform/backend/marking.py`
- [Marking runner](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/backend/runner.py): `newui_Greyform/backend/runner.py`

### ROS processing

- [ROS controller node](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/controller_node.py): `newui_Greyform/src/talker_listener/talker_listener/controller_node.py`
- [ROS publisher](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/talker_node.py): `newui_Greyform/src/talker_listener/talker_listener/talker_node.py`
- [ROS listener](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/src/talker_listener/talker_listener/listener_node.py): `newui_Greyform/src/talker_listener/talker_listener/listener_node.py`

### ROS interfaces

- [Wall message types](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_SelectionWall.py): `newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_SelectionWall.py`
- [File message type](https://github.com/mokzhizhuan/greyform_uis/blob/main/newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_FileExtractionMessage.py): `newui_Greyform/devel/lib/python3/dist-packages/my_robot_wallinterfaces/msg/_FileExtractionMessage.py`

### Other components

- **Operator**
- **Robot host**
- **ROS topics**

## Connections

- Operator → React app: uses
- React app → Workflow status: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/App.tsx`)
- Workflow status → Select PBU: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Detect PBU: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Four-wall flow: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Six-wall flow: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Home checks: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Home verification: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → Auto mode: renders (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Workflow status → API and file operations: calls API (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/Status.tsx`)
- Six-wall flow → Wall marking controller: calls marking API (evidence: `newui_Greyform/greyformui-usb-completionmessage/src/Components/SixWallFlow.tsx`)
- API and file operations → Wall marking controller: mounts subapp (evidence: `newui_Greyform/backend/main.py`)
- API and file operations → Robot host: runs SSH commands (evidence: `newui_Greyform/backend/main.py`)
- Wall marking controller → Robot host: runs marking command (evidence: `newui_Greyform/backend/marking_controller.py`)
- ROS marking API → Marking runner: uses (evidence: `newui_Greyform/backend/marking.py`)
- ROS marking API → ROS publisher: publishes selections (evidence: `newui_Greyform/backend/marking.py`)
- ROS controller node → ROS publisher: calls publisher (evidence: `newui_Greyform/src/talker_listener/talker_listener/controller_node.py`)
- ROS publisher → ROS topics: publishes messages (evidence: `newui_Greyform/src/talker_listener/talker_listener/talker_node.py`)
- ROS publisher → Wall message types: publishes selection (evidence: `newui_Greyform/src/talker_listener/talker_listener/talker_node.py`)
- ROS publisher → File message type: publishes files (evidence: `newui_Greyform/src/talker_listener/talker_listener/talker_node.py`)
- ROS listener → ROS topics: subscribes
