# rdkcentral/thunder architecture

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

- Interactive diagram: https://gitdiagram.com/rdkcentral/thunder
- Repository: https://github.com/rdkcentral/thunder

## Overview

Thunder is an embedded, plugin-based device abstraction framework: applications query and control plugin-provided functionality through interface-based APIs and RPC. The graph centers on that user workflow, with runtime management, service state/configuration, and RPC transports as distinct stages, plus messaging and platform extensions. Several implementation files are unsampled, so links to those subsystems are included only where the README or excerpts support them; dashed links indicate documented but unverified wiring.

Main entry points: [`Source/common/Service.h`](https://github.com/rdkcentral/thunder/blob/master/Source/common/Service.h) (Plugin service), [`Source/Thunder/Controller.cpp`](https://github.com/rdkcentral/thunder/blob/master/Source/Thunder/Controller.cpp) (Controller API), [`Source/plugins/IController.h`](https://github.com/rdkcentral/thunder/blob/master/Source/plugins/IController.h) (Controller interfaces), [`Source/common/JSONRPC.h`](https://github.com/rdkcentral/thunder/blob/master/Source/common/JSONRPC.h) (JSON-RPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_management["Plugin management"]
  node_controller["Controller API<br/>[Controller.cpp]"]
  node_plugin_server["Plugin server<br/>[PluginServer.cpp]"]
end

subgraph group_services["Plugin services"]
  node_plugin_contracts["Plugin interfaces<br/>[IPlugin.h]"]
  node_plugin_service["Plugin service<br/>[Service.h]"]
  node_service_config["Service configuration<br/>[Configuration.h]"]
end

subgraph group_rpc["RPC and transports"]
  node_rpc_api["Controller interfaces<br/>[IController.h]"]
  node_jsonrpc["JSON-RPC<br/>[JSONRPC.h]"]
  node_websocket["WebSocket transport<br/>[WebSocketLink.h]"]
end

subgraph group_runtime["Runtime foundations"]
  node_com_runtime["COM-style runtime<br/>[Administrator.cpp]"]
  node_core_services["Service registry<br/>[Services.cpp]"]
  node_messaging["Message client<br/>[MessageClient.cpp]"]
end

subgraph group_extensions["Platform extensions"]
  node_process_containers["Process containers"]
  node_container_backends["Container backends"]
  node_warning_reporting["Warning reporting"]
  node_cryptography["Cryptography"]
end

node_application(("Client application"))

node_application -->|"queries and controls"| node_controller
node_controller -->|"registers services"| node_plugin_server
node_application -->|"uses interfaces"| node_rpc_api
node_rpc_api -.->|"invokes via RPC"| node_jsonrpc
node_jsonrpc -.->|"uses web transport"| node_websocket
node_plugin_service -->|"reads configuration"| node_service_config
node_plugin_service -.->|"implements plugin shell"| node_plugin_contracts
node_core_services -.->|"creates services"| node_plugin_service
node_com_runtime -.->|"manages interfaces"| node_core_services
node_messaging -.->|"delivers messages"| node_application
node_process_containers -.->|"selects backend"| node_container_backends
node_application -.->|"requests process isolation"| node_process_containers
node_application -.->|"uses warning reports"| node_warning_reporting
node_application -.->|"uses secure capabilities"| node_cryptography

click node_controller "https://github.com/rdkcentral/thunder/blob/master/Source/Thunder/Controller.cpp"
click node_plugin_server "https://github.com/rdkcentral/thunder/blob/master/Source/Thunder/PluginServer.cpp"
click node_plugin_contracts "https://github.com/rdkcentral/thunder/blob/master/Source/plugins/IPlugin.h"
click node_plugin_service "https://github.com/rdkcentral/thunder/blob/master/Source/common/Service.h"
click node_service_config "https://github.com/rdkcentral/thunder/blob/master/Source/common/Configuration.h"
click node_rpc_api "https://github.com/rdkcentral/thunder/blob/master/Source/plugins/IController.h"
click node_jsonrpc "https://github.com/rdkcentral/thunder/blob/master/Source/common/JSONRPC.h"
click node_websocket "https://github.com/rdkcentral/thunder/blob/master/Source/websocket/WebSocketLink.h"
click node_com_runtime "https://github.com/rdkcentral/thunder/blob/master/Source/com/Administrator.cpp"
click node_core_services "https://github.com/rdkcentral/thunder/blob/master/Source/core/Services.cpp"
click node_messaging "https://github.com/rdkcentral/thunder/blob/master/Source/messaging/MessageClient.cpp"
click node_process_containers "https://github.com/rdkcentral/thunder/blob/master/Source/addons/processcontainers/ContainerAdministrator.cpp"
click node_container_backends "https://github.com/rdkcentral/thunder/blob/master/Source/addons/processcontainers/implementations/CRunImplementation/CRunImplementation.cpp"
click node_warning_reporting "https://github.com/rdkcentral/thunder/blob/master/Source/addons/warningreporting/WarningReportingUnit.cpp"
click node_cryptography "https://github.com/rdkcentral/thunder/blob/master/Source/cryptalgo/AESImplementation.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_controller,node_plugin_server,node_application toneBlue
class node_plugin_contracts,node_plugin_service,node_service_config toneAmber
class node_rpc_api,node_jsonrpc,node_websocket toneMint
class node_com_runtime,node_core_services,node_messaging toneRose
class node_process_containers,node_container_backends,node_warning_reporting,node_cryptography toneIndigo
```

## Components

### Plugin management

- [Controller API](https://github.com/rdkcentral/thunder/blob/master/Source/Thunder/Controller.cpp): `Source/Thunder/Controller.cpp`
- [Plugin server](https://github.com/rdkcentral/thunder/blob/master/Source/Thunder/PluginServer.cpp): `Source/Thunder/PluginServer.cpp`

### Plugin services

- [Plugin interfaces](https://github.com/rdkcentral/thunder/blob/master/Source/plugins/IPlugin.h): `Source/plugins/IPlugin.h`
- [Plugin service](https://github.com/rdkcentral/thunder/blob/master/Source/common/Service.h): `Source/common/Service.h`
- [Service configuration](https://github.com/rdkcentral/thunder/blob/master/Source/common/Configuration.h): `Source/common/Configuration.h`

### RPC and transports

- [Controller interfaces](https://github.com/rdkcentral/thunder/blob/master/Source/plugins/IController.h): `Source/plugins/IController.h`
- [JSON-RPC](https://github.com/rdkcentral/thunder/blob/master/Source/common/JSONRPC.h): `Source/common/JSONRPC.h`
- [WebSocket transport](https://github.com/rdkcentral/thunder/blob/master/Source/websocket/WebSocketLink.h): `Source/websocket/WebSocketLink.h`

### Runtime foundations

- [COM-style runtime](https://github.com/rdkcentral/thunder/blob/master/Source/com/Administrator.cpp): `Source/com/Administrator.cpp`
- [Service registry](https://github.com/rdkcentral/thunder/blob/master/Source/core/Services.cpp): `Source/core/Services.cpp`
- [Message client](https://github.com/rdkcentral/thunder/blob/master/Source/messaging/MessageClient.cpp): `Source/messaging/MessageClient.cpp`

### Platform extensions

- [Process containers](https://github.com/rdkcentral/thunder/blob/master/Source/addons/processcontainers/ContainerAdministrator.cpp): `Source/addons/processcontainers/ContainerAdministrator.cpp`
- [Container backends](https://github.com/rdkcentral/thunder/blob/master/Source/addons/processcontainers/implementations/CRunImplementation/CRunImplementation.cpp): `Source/addons/processcontainers/implementations/CRunImplementation/CRunImplementation.cpp`
- [Warning reporting](https://github.com/rdkcentral/thunder/blob/master/Source/addons/warningreporting/WarningReportingUnit.cpp): `Source/addons/warningreporting/WarningReportingUnit.cpp`
- [Cryptography](https://github.com/rdkcentral/thunder/blob/master/Source/cryptalgo/AESImplementation.cpp): `Source/cryptalgo/AESImplementation.cpp`

### Other components

- **Client application**

## Connections

- Client application → Controller API: queries and controls
- Controller API → Plugin server: registers services (evidence: `Source/Thunder/Controller.cpp`)
- Client application → Controller interfaces: uses interfaces
- Controller interfaces → JSON-RPC: invokes via RPC
- JSON-RPC → WebSocket transport: uses web transport
- Plugin service → Service configuration: reads configuration (evidence: `Source/common/Service.h`)
- Plugin service → Plugin interfaces: implements plugin shell (evidence: `Source/common/Service.h`)
- Service registry → Plugin service: creates services
- COM-style runtime → Service registry: manages interfaces
- Message client → Client application: delivers messages
- Process containers → Container backends: selects backend
- Client application → Process containers: requests process isolation
- Client application → Warning reporting: uses warning reports
- Client application → Cryptography: uses secure capabilities
