Skip to content

RDKDEV-1421 Add thunderUI Documentation#123

Open
gourivarma3 wants to merge 1 commit into
rdkcentral:masterfrom
gourivarma3:feature/RDKDEV-1421
Open

RDKDEV-1421 Add thunderUI Documentation#123
gourivarma3 wants to merge 1 commit into
rdkcentral:masterfrom
gourivarma3:feature/RDKDEV-1421

Conversation

@gourivarma3

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 10:36
@gourivarma3 gourivarma3 changed the title Added documentation for thunderUI RDKDEV-1421 Add thunderUI Documentation Jun 8, 2026
@gourivarma3

Copy link
Copy Markdown
Author

Added README.md for thunderUI
I have read the CLA Document and I hereby sign the CLA

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a comprehensive technical README under docs/ describing ThunderUI’s purpose, architecture, module structure, and runtime/build configuration to help developers understand and operate the project.

Changes:

  • Introduces a full ThunderUI design/architecture overview (including Mermaid diagrams).
  • Documents module responsibilities and component interactions (JSON-RPC/WebSocket + REST fallback).
  • Describes configuration and persistence behavior (conf/env/localStorage).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/README.md

ThunderUI provides a single-page web application that communicates with Thunder's Controller plugin over JSON-RPC (via WebSocket) and REST HTTP. On startup, it queries the Controller for the list of active plugins on the device and dynamically constructs a navigation menu and per-plugin views. Each plugin view exposes the operations and data surfaces offered by the corresponding Thunder plugin, ranging from network configuration and device diagnostics to browser control and tracing. The UI runs entirely in the browser; all persistent device state resides in Thunder and is accessed through the API layer. User session state (last active plugin, last navigated URL) is kept in browser `localStorage`.

ThunderUI is deployed as static web assets (`bundle.js`, `index.html`, `img/`) under `${datadir}/WPEFramework/Controller/UI` on the target device and is served directly by the Thunder Controller's built-in HTTP server.
Comment thread docs/README.md

### RDK-V Platform and Integration Requirements

- **WPEFramework Version**: Requires a Thunder instance exposing the Controller plugin via HTTP on port 80 and WebSocket notification channel at `/Service/Controller`.
Comment thread docs/README.md
### RDK-V Platform and Integration Requirements

- **WPEFramework Version**: Requires a Thunder instance exposing the Controller plugin via HTTP on port 80 and WebSocket notification channel at `/Service/Controller`.
- **Build Dependencies**: Node.js (≥ 17 handled automatically with OpenSSL legacy provider), npm, Webpack 4, ThunderJS v1.2.4, `copy-webpack-plugin`, `css-loader`, `style-loader`, `dotenv-webpack`.
Comment thread docs/README.md
- Bootstrap and routing: `src/js/core/application.js`
- Per-plugin lifecycle: `src/js/core/plugin.js`

- **Event Processing**: All incoming WebSocket messages from the Controller notification channel are parsed in `WpeApi.startWebSocket`. Each message is matched against the `socketListeners` array by callsign; listeners registered with callsign `'all'` receive every notification. Individual plugin views register and unregister listeners via `addWebSocketListener` / `removeWebSocketListener`.
Comment thread docs/README.md
participant PluginView as Subscribed Plugin View

Thunder->>WpeApi: WebSocket push: {callsign, event, params}
WpeApi->>WpeApi: Parse and route to socketListeners[]
Comment thread docs/README.md
Comment on lines +352 to +358
| Key | Content |
| ---------------------------- | ------------------------------------------------------------------- |
| `lastActivePlugin` | Callsign of the last active plugin view, restored on next page load |
| `thunderUI_selectedInstance` | Last selected composite Thunder instance name |
| `thunderUI_currentPlugin` | Last active plugin in the context of the selected instance |
| `paused` | Whether the device status footer statistics display was hidden |
| `autoFwdKeys` | Whether automatic key forwarding to RemoteControl is enabled |
Comment thread docs/README.md
| **Thunder Plugins** | | |
| `Controller` | Plugin lifecycle management: enumerate active plugins, activate, deactivate, suspend, resume | `Controller.1.status`, `Controller.1.activate`, `Controller.1.deactivate`, `Controller.1.suspend`, `Controller.1.resume` |
| `DeviceInfo` | Read device identity and resource metrics for the status footer and Device Info view | `DeviceInfo.1.status` (system info, network interfaces) |
| `Network` | Read network interface list and IP addresses; set default interface; execute ping | `Network.1.interfaces`, `Network.1.defaultinterface`, `Network.1.ping` |
Comment thread docs/README.md
| `TraceControl` | Read and set trace module enable/disable state; stream live trace output | `TraceControl.1.set`; WebSocket stream at `/Service/TraceControl` |
| `MessageControl` | Read and set message control enable/disable state; stream live debug messages | `MessageControl.1.enable`; WebSocket stream at `/Service/MessageControl` |
| `Power` | Read current power state; trigger power state transitions | `Power.1.state` (read/write) |
| `DisplaySettings` | Read/set video resolution, sound mode, zoom setting, connected displays | `DisplaySettings.1.currentresolution`, `DisplaySettings.1.supportedresolutions`, `DisplaySettings.1.setsoundmode` |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants