# openbackhaul/microwavedevicegatekeeper architecture

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

- Interactive diagram: https://gitdiagram.com/openbackhaul/microwavedevicegatekeeper
- Repository: https://github.com/openbackhaul/microwavedevicegatekeeper

## Overview

MicroWaveDeviceGatekeeper is an immediate-write API for configuration attributes on devices connected to the controller; it does not store intents or provide GET on those write paths. Its main workflow is an API request through a controller and service to OpenDaylight, with a response returned through the controller. Other documented or indexed capabilities include device-list synchronization, controller notifications, software upgrades, and profile and interface operations. Relationships are shown where the README or supplied source index/excerpts support them; unsampled details are not inferred.

Main entry points: [`server/service/individualServices/PrepareForwardingAutomation.js`](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/PrepareForwardingAutomation.js) (Forwarding automation), [`server/service/IndividualServicesService.js`](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/IndividualServicesService.js) (Device operations), [`server/service/BasicServicesService.js`](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/BasicServicesService.js) (Basic services), [`server/service/OpenDayLightClient/ODLClient.js`](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLClient.js) (Controller REST client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and access"]
  node_entry["HTTP server<br/>[index.js]"]
  node_auth["Operation-key auth<br/>[apiKeyAuth.js]"]
  node_putapi["Configuration API"]
  node_writeout["Response writer<br/>[writer.js]"]
  node_basicapi["Basic services API<br/>[BasicServices.js]"]
end

subgraph group_domain["Configuration services"]
  node_basic["Basic services"]
  node_individual["Device operations"]
  node_upgrade["Software upgrade<br/>[SoftwareUpgrade.js]"]
  node_profiles["Profile services"]
  node_core["Core service<br/>[CoreService.js]"]
  node_files["File profile"]
  node_generic["Generic response profile"]
  node_action["Action profile"]
  node_integer["Integer profile"]
  node_string["String profile"]
end

subgraph group_controller["Controller integration"]
  node_odlops["Controller operations<br/>[ODLOperations.js]"]
  node_odlclient["Controller REST client<br/>[ODLClient.js]"]
  node_restutil["REST utilities<br/>[RESTUtility.js]"]
  node_odlauth["Controller authentication"]
end

subgraph group_interfaces["Interface services"]
  node_opclient["Operation client"]
  node_opserver["Operation server"]
  node_httpclient["HTTP client"]
  node_httpserver["HTTP server interface"]
  node_tcpclient["TCP client"]
  node_tcpserver["TCP server"]
end

subgraph group_helpers["Automation helpers"]
  node_individualutil["Profile lookup"]
  node_forwarding["Forwarding automation"]
end

node_client(("API consumer"))
node_controlleractor(("OpenDaylight controller"))
node_external(("Forwarding service"))

node_client -->|"sends API request"| node_entry
node_entry -->|"validates key"| node_auth
node_entry -.->|"routes requests"| node_putapi
node_putapi -->|"invokes operations"| node_individual
node_putapi -->|"uses responses"| node_writeout
node_individual -->|"writes live config"| node_odlops
node_odlops -->|"dispatches requests"| node_odlclient
node_odlclient -->|"builds parameters"| node_restutil
node_odlclient -->|"gets credentials"| node_odlauth
node_odlclient -->|"sends REST requests"| node_controlleractor
node_basicapi -->|"invokes services"| node_basic
node_basic -->|"reads live topology"| node_odlops
node_basic -->|"reads profile values"| node_individualutil
node_individual -->|"reads profile values"| node_individualutil
node_individual -->|"uses upgrade logic"| node_upgrade
node_individual -.->|"synchronizes device list"| node_controlleractor
node_basic -.->|"subscribes notifications"| node_controlleractor
node_httpclient -->|"prepares automation"| node_forwarding
node_opclient -->|"prepares automation"| node_forwarding
node_opserver -->|"prepares automation"| node_forwarding
node_tcpclient -->|"prepares automation"| node_forwarding
node_tcpserver -->|"prepares automation"| node_forwarding
node_forwarding -->|"prepares inputs"| node_external
node_profiles -.->|"provides profile lookup"| node_individualutil

click node_entry "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/index.js"
click node_auth "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/utils/apiKeyAuth.js"
click node_putapi "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/controllers/IndividualServices.js"
click node_writeout "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/utils/writer.js"
click node_basicapi "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/controllers/BasicServices.js"
click node_basic "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/BasicServicesService.js"
click node_individual "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/IndividualServicesService.js"
click node_upgrade "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/SoftwareUpgrade.js"
click node_profiles "https://github.com/openbackhaul/microwavedevicegatekeeper/tree/develop/server/service"
click node_opclient "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OperationClientService.js"
click node_opserver "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OperationServerService.js"
click node_httpclient "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/HttpClientService.js"
click node_httpserver "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/HttpServerService.js"
click node_tcpclient "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/TcpClientService.js"
click node_tcpserver "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/TcpServerService.js"
click node_odlops "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLOperations.js"
click node_odlclient "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLClient.js"
click node_restutil "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/RESTUtility.js"
click node_odlauth "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLAuthentication.js"
click node_individualutil "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/IndividualServiceUtility.js"
click node_forwarding "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/PrepareForwardingAutomation.js"
click node_core "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/CoreService.js"
click node_files "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/FileProfileService.js"
click node_generic "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/GenericResponseProfileService.js"
click node_action "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/ActionProfileService.js"
click node_integer "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/IntegerProfileService.js"
click node_string "https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/StringProfileService.js"

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_entry,node_auth,node_putapi,node_writeout,node_basicapi toneBlue
class node_basic,node_individual,node_upgrade,node_profiles,node_core,node_files,node_generic,node_action,node_integer,node_string toneAmber
class node_odlops,node_odlclient,node_restutil,node_odlauth,node_client toneMint
class node_opclient,node_opserver,node_httpclient,node_httpserver,node_tcpclient,node_tcpserver toneRose
class node_individualutil,node_forwarding,node_controlleractor,node_external toneIndigo
```

## Components

### API and access

- [HTTP server](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/index.js): `server/index.js`
- [Operation-key auth](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/utils/apiKeyAuth.js): `server/utils/apiKeyAuth.js`
- [Configuration API](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/controllers/IndividualServices.js): `server/controllers/IndividualServices.js`
- [Response writer](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/utils/writer.js): `server/utils/writer.js`
- [Basic services API](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/controllers/BasicServices.js): `server/controllers/BasicServices.js`

### Configuration services

- [Basic services](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/BasicServicesService.js): `server/service/BasicServicesService.js`
- [Device operations](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/IndividualServicesService.js): `server/service/IndividualServicesService.js`
- [Software upgrade](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/SoftwareUpgrade.js): `server/service/individualServices/SoftwareUpgrade.js`
- [Profile services](https://github.com/openbackhaul/microwavedevicegatekeeper/tree/develop/server/service): `server/service`
- [Core service](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/CoreService.js): `server/service/CoreService.js`
- [File profile](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/FileProfileService.js): `server/service/FileProfileService.js`
- [Generic response profile](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/GenericResponseProfileService.js): `server/service/GenericResponseProfileService.js`
- [Action profile](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/ActionProfileService.js): `server/service/ActionProfileService.js`
- [Integer profile](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/IntegerProfileService.js): `server/service/IntegerProfileService.js`
- [String profile](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/StringProfileService.js): `server/service/StringProfileService.js`

### Controller integration

- [Controller operations](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLOperations.js): `server/service/OpenDayLightClient/ODLOperations.js`
- [Controller REST client](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLClient.js): `server/service/OpenDayLightClient/ODLClient.js`
- [REST utilities](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/RESTUtility.js): `server/service/OpenDayLightClient/RESTUtility.js`
- [Controller authentication](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OpenDayLightClient/ODLAuthentication.js): `server/service/OpenDayLightClient/ODLAuthentication.js`

### Interface services

- [Operation client](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OperationClientService.js): `server/service/OperationClientService.js`
- [Operation server](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/OperationServerService.js): `server/service/OperationServerService.js`
- [HTTP client](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/HttpClientService.js): `server/service/HttpClientService.js`
- [HTTP server interface](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/HttpServerService.js): `server/service/HttpServerService.js`
- [TCP client](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/TcpClientService.js): `server/service/TcpClientService.js`
- [TCP server](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/TcpServerService.js): `server/service/TcpServerService.js`

### Automation helpers

- [Profile lookup](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/IndividualServiceUtility.js): `server/service/individualServices/IndividualServiceUtility.js`
- [Forwarding automation](https://github.com/openbackhaul/microwavedevicegatekeeper/blob/develop/server/service/individualServices/PrepareForwardingAutomation.js): `server/service/individualServices/PrepareForwardingAutomation.js`

### Other components

- **API consumer**
- **OpenDaylight controller**
- **Forwarding service**

## Connections

- API consumer → HTTP server: sends API request (evidence: `README.md`)
- HTTP server → Operation-key auth: validates key (evidence: `server/index.js`)
- HTTP server → Configuration API: routes requests
- Configuration API → Device operations: invokes operations (evidence: `server/controllers/IndividualServices.js`)
- Configuration API → Response writer: uses responses (evidence: `server/controllers/IndividualServices.js`)
- Device operations → Controller operations: writes live config (evidence: `server/service/IndividualServicesService.js`)
- Controller operations → Controller REST client: dispatches requests (evidence: `server/service/OpenDayLightClient/ODLOperations.js`)
- Controller REST client → REST utilities: builds parameters (evidence: `server/service/OpenDayLightClient/ODLClient.js`)
- Controller REST client → Controller authentication: gets credentials (evidence: `server/service/OpenDayLightClient/ODLClient.js`)
- Controller REST client → OpenDaylight controller: sends REST requests (evidence: `server/service/OpenDayLightClient/ODLClient.js`)
- Basic services API → Basic services: invokes services (evidence: `server/controllers/BasicServices.js`)
- Basic services → Controller operations: reads live topology (evidence: `server/service/BasicServicesService.js`)
- Basic services → Profile lookup: reads profile values (evidence: `server/service/BasicServicesService.js`)
- Device operations → Profile lookup: reads profile values (evidence: `server/service/IndividualServicesService.js`)
- Device operations → Software upgrade: uses upgrade logic (evidence: `server/service/IndividualServicesService.js`)
- Device operations → OpenDaylight controller: synchronizes device list
- Basic services → OpenDaylight controller: subscribes notifications
- HTTP client → Forwarding automation: prepares automation (evidence: `server/service/HttpClientService.js`)
- Operation client → Forwarding automation: prepares automation (evidence: `server/service/OperationClientService.js`)
- Operation server → Forwarding automation: prepares automation (evidence: `server/service/OperationServerService.js`)
- TCP client → Forwarding automation: prepares automation (evidence: `server/service/TcpClientService.js`)
- TCP server → Forwarding automation: prepares automation (evidence: `server/service/TcpServerService.js`)
- Forwarding automation → Forwarding service: prepares inputs (evidence: `server/service/individualServices/PrepareForwardingAutomation.js`)
- Profile services → Profile lookup: provides profile lookup (evidence: `server/service/IndividualServicesService.js`)
