# tootooroo/rtsprotocol architecture

> Architecture diagram of the GitHub repository tootooroo/rtsprotocol, 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/tootooroo/rtsprotocol
- Repository: https://github.com/tootooroo/rtsprotocol

## Overview

RTS Protocol is a collection of robot-operations tools: a Map UI with backend support, plus a Repair Assistant for hardware replacement, troubleshooting, and paperwork. In the Map workflow, an operator views robot status or paperwork in the Companion, which uses browser automation and backend paperwork routines to update service records. The Repair Assistant provides repair workflows including FRU/BOM changes, inventory and maintenance tasks, firmware flashing, troubleshooting, and paperwork automation. The graph includes documented capabilities whose implementation details were not sampled; edges are limited to README statements and SOURCE INDEX references, so some runtime links remain unspecified.

Main entry points: [`repair-assistant/source/RepairAssistant.py`](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/RepairAssistant.py) (Repair Assistant), [`Map/Companion/companion.py`](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/companion.py) (Map Companion), [`repair-assistant/source/home_paperwork/companion.py`](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/companion.py) (Home Companion), [`repair-assistant/source/spine_browser.py`](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/spine_browser.py) (SPINE Browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_map["Robot Map"]
  node_map_ui["Map Companion<br/>[companion.py]"]
  node_map_browser["Browser Session<br/>[browser_manager.py]"]
  node_map_routes["Salesforce Routing"]
  node_map_paperwork["Map Paperwork<br/>[paperwork.py]"]
  node_map_status["Robot Status<br/>[status_display.py]"]
  node_map_layout["Window Layout<br/>[window_layout.py]"]
end

subgraph group_backend["Map Backend"]
  node_map_backend["Map Services"]
  node_backend_actions["Backend Actions<br/>[actions.py]"]
  node_backend_scraper["Status Scraper<br/>[scraper.py]"]
  node_backend_dryrun["Dry-run Updates"]
  node_backend_links["Salesforce Link Resolver"]
  node_backend_paperwork["Record Workflows<br/>[paperwork.py]"]
end

subgraph group_repair["Repair Workflows"]
  node_repair_app["Repair Assistant<br/>[RepairAssistant.py]"]
  node_repair_inventory[("Inventory Ledger")]
  node_repair_maintenance["Maintenance Tasks<br/>[maintenance.py]"]
  node_repair_spine["SPINE Browser<br/>[spine_browser.py]"]
  node_repair_fru["FRU Corrections"]
  node_repair_duplicates["FRU Duplicates"]
  node_repair_flashing["Firmware Flashing<br/>[flashing.py]"]
  node_repair_troubleshooting["Troubleshooting<br/>[troubleshooting.py]"]
  node_repair_bitbucket["Bitbucket Browser"]
end

subgraph group_paperwork["Paperwork Automation"]
  node_repair_paperwork["Repair Paperwork<br/>[paperwork.py]"]
  node_paperwork_overlay["Paperwork Overlay"]
  node_home_companion["Home Companion<br/>[companion.py]"]
  node_home_paperwork["Home Paperwork<br/>[paperwork.py]"]
  node_home_routes["Case Routing"]
  node_home_browser["Browser Session<br/>[browser_manager.py]"]
end

node_operator(("Operator"))
node_salesforce{{"Salesforce"}}
node_buganizer{{"Buganizer"}}
node_spine_service{{"SPINE"}}
node_bitbucket{{"Bitbucket"}}

node_operator -->|"views and operates"| node_map_ui
node_map_ui -->|"uses session"| node_map_browser
node_map_ui -->|"uses routes"| node_map_routes
node_map_ui -->|"opens paperwork"| node_map_paperwork
node_map_ui -->|"uses workflows"| node_backend_paperwork
node_map_ui -->|"shows status"| node_map_status
node_map_ui -->|"places windows"| node_map_layout
node_backend_scraper -->|"calls actions"| node_backend_actions
node_backend_scraper -->|"uses resolver"| node_backend_links
node_backend_scraper -.->|"supports updates"| node_backend_dryrun
node_operator -->|"selects workflow"| node_repair_app
node_repair_app -->|"uses ledger"| node_repair_inventory
node_repair_app -->|"runs tasks"| node_repair_maintenance
node_repair_app -->|"runs corrections"| node_repair_fru
node_repair_app -->|"checks duplicates"| node_repair_duplicates
node_repair_app -->|"starts flashing"| node_repair_flashing
node_repair_app -->|"starts diagnosis"| node_repair_troubleshooting
node_repair_app -->|"uses browser"| node_repair_bitbucket
node_repair_app -->|"uses browser"| node_repair_spine
node_repair_app -->|"launches paperwork"| node_repair_paperwork
node_repair_app -->|"launches overlay"| node_paperwork_overlay
node_repair_app -->|"launches companion"| node_home_companion
node_repair_fru -->|"reads unit data"| node_repair_spine
node_repair_duplicates -->|"reads unit data"| node_repair_spine
node_repair_maintenance -->|"uses ledger"| node_repair_inventory
node_repair_maintenance -->|"reads unit data"| node_repair_spine
node_repair_troubleshooting -->|"uses flashing"| node_repair_flashing
node_home_companion -->|"uses workflows"| node_home_paperwork
node_home_companion -->|"uses routes"| node_home_routes
node_home_companion -->|"uses session"| node_home_browser
node_home_paperwork -->|"uses session"| node_home_browser
node_home_companion -->|"updates records"| node_buganizer
node_home_companion -->|"updates cases"| node_salesforce
node_paperwork_overlay -->|"automates records"| node_buganizer
node_paperwork_overlay -->|"automates cases"| node_salesforce
node_repair_spine -->|"reads unit data"| node_spine_service
node_repair_bitbucket -.->|"accesses repository"| node_bitbucket
node_backend_paperwork -->|"updates records"| node_buganizer
node_backend_paperwork -->|"updates cases"| node_salesforce
node_repair_app -->|"updates dashboard"| node_map_status
node_repair_app -->|"uses layout"| node_map_layout

click node_map_ui "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/companion.py"
click node_map_browser "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/browser_manager.py"
click node_map_routes "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/salesforce_routes.py"
click node_map_paperwork "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/paperwork.py"
click node_map_status "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/status_display.py"
click node_map_layout "https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/window_layout.py"
click node_map_backend "https://github.com/tootooroo/rtsprotocol/tree/main/Backend"
click node_backend_actions "https://github.com/tootooroo/rtsprotocol/blob/main/Backend/actions.py"
click node_backend_scraper "https://github.com/tootooroo/rtsprotocol/blob/main/Backend/scraper.py"
click node_backend_dryrun "https://github.com/tootooroo/rtsprotocol/blob/main/Backend/dry_run_status_update.py"
click node_backend_links "https://github.com/tootooroo/rtsprotocol/blob/main/Backend/salesforce_link_resolver.py"
click node_backend_paperwork "https://github.com/tootooroo/rtsprotocol/blob/main/Backend/paperwork.py"
click node_repair_app "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/RepairAssistant.py"
click node_repair_inventory "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/inventory_ledger.py"
click node_repair_maintenance "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/maintenance.py"
click node_repair_spine "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/spine_browser.py"
click node_repair_fru "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/fru_spine_correction.py"
click node_repair_duplicates "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/fru_spine_duplicates.py"
click node_repair_flashing "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/flashing.py"
click node_repair_troubleshooting "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/troubleshooting.py"
click node_repair_bitbucket "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/bitbucket_browser.py"
click node_repair_paperwork "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/paperwork.py"
click node_paperwork_overlay "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/paperwork_overlay.py"
click node_home_companion "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/companion.py"
click node_home_paperwork "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/paperwork.py"
click node_home_routes "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/salesforce_routes.py"
click node_home_browser "https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/browser_manager.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_map_ui,node_map_browser,node_map_routes,node_map_paperwork,node_map_status,node_map_layout toneBlue
class node_map_backend,node_backend_actions,node_backend_scraper,node_backend_dryrun,node_backend_links,node_backend_paperwork toneAmber
class node_repair_app,node_repair_inventory,node_repair_maintenance,node_repair_spine,node_repair_fru,node_repair_duplicates,node_repair_flashing,node_repair_troubleshooting,node_repair_bitbucket toneMint
class node_repair_paperwork,node_paperwork_overlay,node_home_companion,node_home_paperwork,node_home_routes,node_home_browser toneRose
class node_operator,node_salesforce,node_buganizer,node_spine_service,node_bitbucket toneIndigo
```

## Components

### Robot Map

- [Map Companion](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/companion.py): `Map/Companion/companion.py`
- [Browser Session](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/browser_manager.py): `Map/Companion/browser_manager.py`
- [Salesforce Routing](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/salesforce_routes.py): `Map/Companion/salesforce_routes.py`
- [Map Paperwork](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/paperwork.py): `Map/Companion/paperwork.py`
- [Robot Status](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/status_display.py): `Map/Companion/status_display.py`
- [Window Layout](https://github.com/tootooroo/rtsprotocol/blob/main/Map/Companion/window_layout.py): `Map/Companion/window_layout.py`

### Map Backend

- [Map Services](https://github.com/tootooroo/rtsprotocol/tree/main/Backend): `Backend`
- [Backend Actions](https://github.com/tootooroo/rtsprotocol/blob/main/Backend/actions.py): `Backend/actions.py`
- [Status Scraper](https://github.com/tootooroo/rtsprotocol/blob/main/Backend/scraper.py): `Backend/scraper.py`
- [Dry-run Updates](https://github.com/tootooroo/rtsprotocol/blob/main/Backend/dry_run_status_update.py): `Backend/dry_run_status_update.py`
- [Salesforce Link Resolver](https://github.com/tootooroo/rtsprotocol/blob/main/Backend/salesforce_link_resolver.py): `Backend/salesforce_link_resolver.py`
- [Record Workflows](https://github.com/tootooroo/rtsprotocol/blob/main/Backend/paperwork.py): `Backend/paperwork.py`

### Repair Workflows

- [Repair Assistant](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/RepairAssistant.py): `repair-assistant/source/RepairAssistant.py`
- [Inventory Ledger](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/inventory_ledger.py): `repair-assistant/source/inventory_ledger.py`
- [Maintenance Tasks](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/maintenance.py): `repair-assistant/source/maintenance.py`
- [SPINE Browser](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/spine_browser.py): `repair-assistant/source/spine_browser.py`
- [FRU Corrections](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/fru_spine_correction.py): `repair-assistant/source/fru_spine_correction.py`
- [FRU Duplicates](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/fru_spine_duplicates.py): `repair-assistant/source/fru_spine_duplicates.py`
- [Firmware Flashing](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/flashing.py): `repair-assistant/source/flashing.py`
- [Troubleshooting](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/troubleshooting.py): `repair-assistant/source/troubleshooting.py`
- [Bitbucket Browser](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/bitbucket_browser.py): `repair-assistant/source/bitbucket_browser.py`

### Paperwork Automation

- [Repair Paperwork](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/paperwork.py): `repair-assistant/source/paperwork.py`
- [Paperwork Overlay](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/paperwork_overlay.py): `repair-assistant/source/paperwork_overlay.py`
- [Home Companion](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/companion.py): `repair-assistant/source/home_paperwork/companion.py`
- [Home Paperwork](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/paperwork.py): `repair-assistant/source/home_paperwork/paperwork.py`
- [Case Routing](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/salesforce_routes.py): `repair-assistant/source/home_paperwork/salesforce_routes.py`
- [Browser Session](https://github.com/tootooroo/rtsprotocol/blob/main/repair-assistant/source/home_paperwork/browser_manager.py): `repair-assistant/source/home_paperwork/browser_manager.py`

### Other components

- **Operator**
- **Salesforce**
- **Buganizer**
- **SPINE**
- **Bitbucket**

## Connections

- Operator → Map Companion: views and operates
- Map Companion → Browser Session: uses session (evidence: `Map/Companion/companion.py`)
- Map Companion → Salesforce Routing: uses routes (evidence: `Map/Companion/companion.py`)
- Map Companion → Map Paperwork: opens paperwork (evidence: `Map/Companion/companion.py`)
- Map Companion → Record Workflows: uses workflows (evidence: `Map/Companion/companion.py`)
- Map Companion → Robot Status: shows status
- Map Companion → Window Layout: places windows (evidence: `Map/Companion/companion.py`)
- Status Scraper → Backend Actions: calls actions (evidence: `Backend/scraper.py`)
- Status Scraper → Salesforce Link Resolver: uses resolver (evidence: `Backend/scraper.py`)
- Status Scraper → Dry-run Updates: supports updates
- Operator → Repair Assistant: selects workflow
- Repair Assistant → Inventory Ledger: uses ledger (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Maintenance Tasks: runs tasks (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → FRU Corrections: runs corrections (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → FRU Duplicates: checks duplicates (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Firmware Flashing: starts flashing (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Troubleshooting: starts diagnosis (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Bitbucket Browser: uses browser (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → SPINE Browser: uses browser (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Repair Paperwork: launches paperwork (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Paperwork Overlay: launches overlay (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Home Companion: launches companion (evidence: `repair-assistant/source/RepairAssistant.py`)
- FRU Corrections → SPINE Browser: reads unit data (evidence: `repair-assistant/source/fru_spine_correction.py`)
- FRU Duplicates → SPINE Browser: reads unit data (evidence: `repair-assistant/source/fru_spine_duplicates.py`)
- Maintenance Tasks → Inventory Ledger: uses ledger (evidence: `repair-assistant/source/maintenance.py`)
- Maintenance Tasks → SPINE Browser: reads unit data (evidence: `repair-assistant/source/maintenance.py`)
- Troubleshooting → Firmware Flashing: uses flashing (evidence: `repair-assistant/source/troubleshooting.py`)
- Home Companion → Home Paperwork: uses workflows (evidence: `repair-assistant/source/home_paperwork/companion.py`)
- Home Companion → Case Routing: uses routes (evidence: `repair-assistant/source/home_paperwork/companion.py`)
- Home Companion → Browser Session: uses session (evidence: `repair-assistant/source/home_paperwork/companion.py`)
- Home Paperwork → Browser Session: uses session (evidence: `repair-assistant/source/home_paperwork/paperwork.py`)
- Home Companion → Buganizer: updates records (evidence: `repair-assistant/source/home_paperwork/companion.py`)
- Home Companion → Salesforce: updates cases (evidence: `repair-assistant/source/home_paperwork/companion.py`)
- Paperwork Overlay → Buganizer: automates records (evidence: `repair-assistant/source/paperwork_overlay.py`)
- Paperwork Overlay → Salesforce: automates cases (evidence: `repair-assistant/source/paperwork_overlay.py`)
- SPINE Browser → SPINE: reads unit data (evidence: `repair-assistant/source/spine_browser.py`)
- Bitbucket Browser → Bitbucket: accesses repository
- Record Workflows → Buganizer: updates records (evidence: `Backend/paperwork.py`)
- Record Workflows → Salesforce: updates cases (evidence: `Backend/paperwork.py`)
- Repair Assistant → Robot Status: updates dashboard (evidence: `repair-assistant/source/RepairAssistant.py`)
- Repair Assistant → Window Layout: uses layout (evidence: `repair-assistant/source/RepairAssistant.py`)
