# ykhwong/ppt-ndi architecture

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

- Interactive diagram: https://gitdiagram.com/ykhwong/ppt-ndi
- Repository: https://github.com/ykhwong/ppt-ndi

## Overview

PPT NDI is an Electron desktop application that transfers PowerPoint slides as transparent-capable NDI video. Its principal workflow is to operate a presentation in Classic or PowerPoint SlideShow mode, render or obtain slide images, and send them through the native NDI library; monitor output and configuration are supporting capabilities. The excerpts show the renderer request and IPC-based dispatch, but not all runtime wiring, so some subsystem connections are omitted rather than inferred.

Main entry points: [`frontend/js/client-classic.js`](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-classic.js) (Classic controls), [`frontend/js/client-slideshow.js`](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-slideshow.js) (SlideShow controls), [`backend/backend.js`](https://github.com/ykhwong/ppt-ndi/blob/master/backend/backend.js) (Electron controller), [`backend/src/PPTNDI/PPTNDI.cpp`](https://github.com/ykhwong/ppt-ndi/blob/master/backend/src/PPTNDI/PPTNDI.cpp) (NDI sender)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation modes"]
  node_classic["Classic controls<br/>[client-classic.js]"]
  node_slideshow["SlideShow controls"]
  node_mode["Mode selector<br/>[client-mode.js]"]
  node_config["Configuration UI<br/>[client-config.js]"]
  node_cscript["PowerPoint scripts<br/>[cscript.js]"]
end

subgraph group_rendering["Slide rendering"]
  node_renderer["PPTX renderer<br/>[renderer.js]"]
  node_monitor["Monitor display<br/>[monitor.js]"]
end

subgraph group_runtime["Desktop runtime"]
  node_i18n["Localization<br/>[i18n.js]"]
  node_backend["Electron controller<br/>[backend.js]"]
end

subgraph group_output["NDI output"]
  node_ndi["NDI sender<br/>[PPTNDI.cpp]"]
end

node_user(("Operator"))
node_powerpoint["PowerPoint"]
node_ndi_network(("NDI receivers"))

node_user -->|"chooses mode"| node_mode
node_user -->|"operates"| node_classic
node_user -->|"operates"| node_slideshow
node_classic -->|"requests rendering"| node_renderer
node_classic -->|"sends IPC"| node_backend
node_slideshow -->|"sends IPC"| node_backend
node_config -->|"requests config refresh"| node_backend
node_backend -->|"routes monitor events"| node_monitor
node_classic -->|"uses scripts"| node_cscript
node_slideshow -->|"uses scripts"| node_cscript
node_classic -->|"dispatches image sends"| node_ndi
node_slideshow -->|"dispatches image sends"| node_ndi
node_ndi -->|"sends NDI frames"| node_ndi_network
node_powerpoint -->|"provides presentation"| node_slideshow

click node_classic "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-classic.js"
click node_slideshow "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-slideshow.js"
click node_mode "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-mode.js"
click node_config "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-config.js"
click node_cscript "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/cscript.js"
click node_renderer "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/renderer.js"
click node_monitor "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/monitor.js"
click node_i18n "https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/i18n.js"
click node_backend "https://github.com/ykhwong/ppt-ndi/blob/master/backend/backend.js"
click node_ndi "https://github.com/ykhwong/ppt-ndi/blob/master/backend/src/PPTNDI/PPTNDI.cpp"

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_classic,node_slideshow,node_mode,node_config,node_cscript toneBlue
class node_renderer,node_monitor toneAmber
class node_i18n,node_backend toneMint
class node_ndi toneRose
class node_user,node_powerpoint,node_ndi_network toneIndigo
```

## Components

### Presentation modes

- [Classic controls](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-classic.js): `frontend/js/client-classic.js`
- [SlideShow controls](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-slideshow.js): `frontend/js/client-slideshow.js`
- [Mode selector](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-mode.js): `frontend/js/client-mode.js`
- [Configuration UI](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/client-config.js): `frontend/js/client-config.js`
- [PowerPoint scripts](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/cscript.js): `frontend/js/cscript.js`

### Slide rendering

- [PPTX renderer](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/renderer.js): `frontend/js/renderer.js`
- [Monitor display](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/monitor.js): `frontend/js/monitor.js`

### Desktop runtime

- [Localization](https://github.com/ykhwong/ppt-ndi/blob/master/frontend/js/i18n.js): `frontend/js/i18n.js`
- [Electron controller](https://github.com/ykhwong/ppt-ndi/blob/master/backend/backend.js): `backend/backend.js`

### NDI output

- [NDI sender](https://github.com/ykhwong/ppt-ndi/blob/master/backend/src/PPTNDI/PPTNDI.cpp): `backend/src/PPTNDI/PPTNDI.cpp`

### Other components

- **Operator**
- **PowerPoint**
- **NDI receivers**

## Connections

- Operator → Mode selector: chooses mode (evidence: `README.md`)
- Operator → Classic controls: operates (evidence: `README.md`)
- Operator → SlideShow controls: operates (evidence: `README.md`)
- Classic controls → PPTX renderer: requests rendering (evidence: `frontend/js/client-classic.js`)
- Classic controls → Electron controller: sends IPC (evidence: `frontend/js/client-classic.js`)
- SlideShow controls → Electron controller: sends IPC (evidence: `frontend/js/client-slideshow.js`)
- Configuration UI → Electron controller: requests config refresh (evidence: `frontend/js/client-config.js`)
- Electron controller → Monitor display: routes monitor events (evidence: `backend/backend.js`)
- Classic controls → PowerPoint scripts: uses scripts (evidence: `frontend/js/client-classic.js`)
- SlideShow controls → PowerPoint scripts: uses scripts (evidence: `frontend/js/client-slideshow.js`)
- Classic controls → NDI sender: dispatches image sends (evidence: `frontend/js/client-classic.js`)
- SlideShow controls → NDI sender: dispatches image sends (evidence: `frontend/js/client-slideshow.js`)
- NDI sender → NDI receivers: sends NDI frames (evidence: `backend/src/PPTNDI/PPTNDI.cpp`)
- PowerPoint → SlideShow controls: provides presentation (evidence: `README.md`)
