# jordanmateo-byte/vizio-open-home architecture

> Architecture diagram of the GitHub repository jordanmateo-byte/vizio-open-home, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jordanmateo-byte/vizio-open-home
- Repository: https://github.com/jordanmateo-byte/vizio-open-home

## Overview

Vizio Open Home replaces the region-blocked VIZIO Home screen with a local SmartCast launcher. The main user workflow is remote navigation through the launcher, opening an app through the TV’s local API, or browsing and rearranging the app library with preferences saved locally. A separate installation workflow pairs with the TV, prepares USB files, verifies staged changes and supports restoration. The temporary USB bridge transfers files between the PC and TV. Source excerpts show launcher/API calls and bridge mechanics; broader installation links follow README documentation rather than unsampled implementation.

Main entry points: [`src/runtime.js`](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js) (Navigation and launch), [`tools/bridge-server.cjs`](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/bridge-server.cjs) (Temporary bridge server), [`tools/usb-kit.mjs`](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/usb-kit.mjs) (USB kit generator), [`tools/common.mjs`](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/common.mjs) (Private state and validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["TV launcher"]
  node_launcher_ui["Home interface"]
  node_launcher_runtime["Navigation and launch<br/>[runtime.js]"]
  node_app_library["App library<br/>[runtime.js]"]
  node_preferences["Local preferences<br/>[runtime.js]"]
  node_catalog["App catalog<br/>[catalog.json]"]
end

subgraph group_install["Install and recovery"]
  node_usb_kit["USB kit generator<br/>[usb-kit.mjs]"]
  node_install_plan["Install and restore plan<br/>[plan.mjs]"]
end

subgraph group_bridge["USB bridge"]
  node_bridge_agent["USB transfer agent<br/>[agent.html.in]"]
  node_bridge_receiver["USB CGI receiver<br/>[receiver.sh.in]"]
  node_bridge_server["Temporary bridge server<br/>[bridge-server.cjs]"]
  node_firewall["Temporary firewall control"]
end

subgraph group_pc["PC tools"]
  node_tv_pairing["TV pairing and info<br/>[tv.mjs]"]
  node_bridge_jobs["Transfer job client<br/>[job.mjs]"]
  node_shared_state["Private state and validation<br/>[common.mjs]"]
end

node_owner(("TV owner"))
node_tv_api{{"SmartCast API"}}
node_tv_files[("TV storage and Home")]

node_owner -->|"navigates"| node_launcher_ui
node_launcher_ui -->|"hosts runtime"| node_launcher_runtime
node_launcher_runtime -->|"opens"| node_app_library
node_launcher_runtime -->|"loads and saves"| node_preferences
node_launcher_runtime -->|"uses catalog"| node_catalog
node_launcher_runtime -->|"requests app launch"| node_tv_api
node_tv_pairing -->|"pairs and sends commands"| node_tv_api
node_usb_kit -->|"generates agent"| node_bridge_agent
node_usb_kit -->|"generates receivers"| node_bridge_receiver
node_usb_kit -->|"stores session"| node_shared_state
node_install_plan -->|"stages Home changes"| node_tv_files
node_bridge_jobs -->|"enqueues jobs"| node_bridge_server
node_bridge_server -->|"stores results"| node_shared_state
node_bridge_agent -->|"exchanges transfer jobs"| node_bridge_server
node_bridge_receiver -.->|"receives files"| node_tv_files
node_firewall -.->|"limits access"| node_bridge_server
node_bridge_jobs -->|"reads session"| node_shared_state

click node_launcher_ui "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/index.template.html"
click node_launcher_runtime "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js"
click node_app_library "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js"
click node_preferences "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js"
click node_catalog "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/data/catalog.json"
click node_tv_pairing "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/tv.mjs"
click node_usb_kit "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/usb-kit.mjs"
click node_install_plan "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/plan.mjs"
click node_bridge_agent "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/bridge/agent.html.in"
click node_bridge_receiver "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/bridge/receiver.sh.in"
click node_bridge_server "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/bridge-server.cjs"
click node_bridge_jobs "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/job.mjs"
click node_shared_state "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/common.mjs"
click node_firewall "https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/windows-firewall.ps1"

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_launcher_ui,node_launcher_runtime,node_app_library,node_preferences,node_catalog toneBlue
class node_usb_kit,node_install_plan,node_tv_files toneAmber
class node_bridge_agent,node_bridge_receiver,node_bridge_server,node_firewall,node_tv_api toneMint
class node_tv_pairing,node_bridge_jobs,node_shared_state toneRose
class node_owner toneIndigo
```

## Components

### TV launcher

- [Home interface](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/index.template.html): `src/index.template.html`
- [Navigation and launch](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js): `src/runtime.js`
- [App library](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js): `src/runtime.js`
- [Local preferences](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/src/runtime.js): `src/runtime.js`
- [App catalog](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/data/catalog.json): `data/catalog.json`

### Install and recovery

- [USB kit generator](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/usb-kit.mjs): `tools/usb-kit.mjs`
- [Install and restore plan](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/plan.mjs): `tools/plan.mjs`

### USB bridge

- [USB transfer agent](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/bridge/agent.html.in): `bridge/agent.html.in`
- [USB CGI receiver](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/bridge/receiver.sh.in): `bridge/receiver.sh.in`
- [Temporary bridge server](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/bridge-server.cjs): `tools/bridge-server.cjs`
- [Temporary firewall control](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/windows-firewall.ps1): `tools/windows-firewall.ps1`

### PC tools

- [TV pairing and info](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/tv.mjs): `tools/tv.mjs`
- [Transfer job client](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/job.mjs): `tools/job.mjs`
- [Private state and validation](https://github.com/jordanmateo-byte/vizio-open-home/blob/main/tools/common.mjs): `tools/common.mjs`

### Other components

- **TV owner**
- **SmartCast API**
- **TV storage and Home**

## Connections

- TV owner → Home interface: navigates (evidence: `README.md`)
- Home interface → Navigation and launch: hosts runtime (evidence: `README.md`)
- Navigation and launch → App library: opens (evidence: `src/runtime.js`)
- Navigation and launch → Local preferences: loads and saves (evidence: `src/runtime.js`)
- Navigation and launch → App catalog: uses catalog (evidence: `README.md`)
- Navigation and launch → SmartCast API: requests app launch (evidence: `src/runtime.js`)
- TV pairing and info → SmartCast API: pairs and sends commands (evidence: `tools/tv.mjs`)
- USB kit generator → USB transfer agent: generates agent (evidence: `tools/usb-kit.mjs`)
- USB kit generator → USB CGI receiver: generates receivers (evidence: `tools/usb-kit.mjs`)
- USB kit generator → Private state and validation: stores session (evidence: `tools/usb-kit.mjs`)
- Install and restore plan → TV storage and Home: stages Home changes (evidence: `tools/plan.mjs`)
- Transfer job client → Temporary bridge server: enqueues jobs (evidence: `tools/job.mjs`)
- Temporary bridge server → Private state and validation: stores results (evidence: `tools/bridge-server.cjs`)
- USB transfer agent → Temporary bridge server: exchanges transfer jobs (evidence: `README.md`)
- USB CGI receiver → TV storage and Home: receives files
- Temporary firewall control → Temporary bridge server: limits access
- Transfer job client → Private state and validation: reads session (evidence: `tools/job.mjs`)
