# meshlinkfoundation/operator-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/meshlinkfoundation/operator-dashboard
- Repository: https://github.com/meshlinkfoundation/operator-dashboard

## Overview

Meshlink Operator Dashboard is an optional multi-node control panel: an operator configures broker nodes, then views aggregate health and metrics or manages clients and sessions per node. The React UI calls the dashboard API; Express routes load node configuration and invoke a server-side HTTP proxy, which handles broker authentication and requests. The README documents these capabilities and the proxy architecture. Some page and hook implementations were read but their references are not listed in the index, so uncertain UI-to-hook links are omitted.

Main entry points: [`client/src/App.tsx`](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/App.tsx) (Application router), [`server/routes.ts`](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/routes.ts) (Dashboard routes), [`client/src/lib/api.ts`](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/lib/api.ts) (Dashboard API client), [`server/proxy.ts`](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/proxy.ts) (Broker proxy and auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator interface"]
  node_app["Application router<br/>[App.tsx]"]
  node_overview["Aggregate overview<br/>[overview.tsx]"]
  node_detail["Node detail<br/>[node-detail.tsx]"]
  node_settings["Node settings<br/>[settings.tsx]"]
  node_nodecard["Node summary card<br/>[node-card.tsx]"]
  node_healthbadge["Health badge"]
  node_clients["Client management<br/>[clients-table.tsx]"]
  node_sessions["Session management<br/>[sessions-table.tsx]"]
  node_revenue["Revenue chart<br/>[revenue-chart.tsx]"]
  node_tierchart["Tier breakdown"]
  node_apihelper["Dashboard API client<br/>[api.ts]"]
  node_query["Query client<br/>[queryClient.ts]"]
end

subgraph group_api["Dashboard API"]
  node_server["Express server<br/>[index.ts]"]
  node_routes["Dashboard routes<br/>[routes.ts]"]
end

subgraph group_config["Node configuration"]
  node_nodeconfig[("Node configuration<br/>[nodes.ts]")]
end

subgraph group_brokers["Broker integration"]
  node_proxy["Broker proxy and auth<br/>[proxy.ts]"]
  node_broker["Meshlink broker nodes"]
end

node_operator(("Operator"))

node_operator -->|"uses dashboard"| node_app
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_settings
node_app -->|"provides queries"| node_query
node_nodecard -->|"renders"| node_healthbadge
node_overview -->|"requests overview"| node_apihelper
node_detail -->|"requests node data"| node_apihelper
node_settings -->|"manages nodes"| node_apihelper
node_apihelper -->|"uses requests"| node_query
node_apihelper -->|"calls dashboard API"| node_server
node_server -->|"registers routes"| node_routes
node_routes -->|"reads and updates"| node_nodeconfig
node_routes -->|"dispatches broker calls"| node_proxy
node_proxy -->|"updates auth token"| node_nodeconfig
node_proxy -->|"proxies HTTP requests"| node_broker
node_routes -->|"tests connectivity"| node_broker
node_routes -->|"aggregates node summaries"| node_proxy

click node_app "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/App.tsx"
click node_overview "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/overview.tsx"
click node_detail "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/node-detail.tsx"
click node_settings "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/settings.tsx"
click node_nodecard "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/node-card.tsx"
click node_healthbadge "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/node-health-badge.tsx"
click node_clients "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/clients-table.tsx"
click node_sessions "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/sessions-table.tsx"
click node_revenue "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/revenue-chart.tsx"
click node_tierchart "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/tier-breakdown-chart.tsx"
click node_apihelper "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/lib/api.ts"
click node_query "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/lib/queryClient.ts"
click node_server "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/index.ts"
click node_routes "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/routes.ts"
click node_nodeconfig "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/nodes.ts"
click node_proxy "https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/proxy.ts"

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_app,node_overview,node_detail,node_settings,node_nodecard,node_healthbadge,node_clients,node_sessions,node_revenue,node_tierchart,node_apihelper,node_query toneBlue
class node_server,node_routes toneAmber
class node_nodeconfig toneMint
class node_proxy,node_broker toneRose
class node_operator toneIndigo
```

## Components

### Operator interface

- [Application router](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Aggregate overview](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/overview.tsx): `client/src/pages/overview.tsx`
- [Node detail](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/node-detail.tsx): `client/src/pages/node-detail.tsx`
- [Node settings](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/pages/settings.tsx): `client/src/pages/settings.tsx`
- [Node summary card](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/node-card.tsx): `client/src/components/node-card.tsx`
- [Health badge](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/node-health-badge.tsx): `client/src/components/node-health-badge.tsx`
- [Client management](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/clients-table.tsx): `client/src/components/clients-table.tsx`
- [Session management](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/sessions-table.tsx): `client/src/components/sessions-table.tsx`
- [Revenue chart](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/revenue-chart.tsx): `client/src/components/revenue-chart.tsx`
- [Tier breakdown](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/components/tier-breakdown-chart.tsx): `client/src/components/tier-breakdown-chart.tsx`
- [Dashboard API client](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/lib/api.ts): `client/src/lib/api.ts`
- [Query client](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/client/src/lib/queryClient.ts): `client/src/lib/queryClient.ts`

### Dashboard API

- [Express server](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/index.ts): `server/index.ts`
- [Dashboard routes](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/routes.ts): `server/routes.ts`

### Node configuration

- [Node configuration](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/nodes.ts): `server/nodes.ts`

### Broker integration

- [Broker proxy and auth](https://github.com/meshlinkfoundation/operator-dashboard/blob/main/server/proxy.ts): `server/proxy.ts`
- **Meshlink broker nodes**

### Other components

- **Operator**

## Connections

- Operator → Application router: uses dashboard (evidence: `README.md`)
- Application router → Aggregate overview: routes to (evidence: `client/src/App.tsx`)
- Application router → Node detail: routes to (evidence: `client/src/App.tsx`)
- Application router → Node settings: routes to (evidence: `client/src/App.tsx`)
- Application router → Query client: provides queries (evidence: `client/src/App.tsx`)
- Node summary card → Health badge: renders (evidence: `client/src/components/node-card.tsx`)
- Aggregate overview → Dashboard API client: requests overview (evidence: `README.md`)
- Node detail → Dashboard API client: requests node data (evidence: `README.md`)
- Node settings → Dashboard API client: manages nodes (evidence: `README.md`)
- Dashboard API client → Query client: uses requests (evidence: `client/src/lib/api.ts`)
- Dashboard API client → Express server: calls dashboard API (evidence: `README.md`)
- Express server → Dashboard routes: registers routes (evidence: `server/index.ts`)
- Dashboard routes → Node configuration: reads and updates (evidence: `server/routes.ts`)
- Dashboard routes → Broker proxy and auth: dispatches broker calls (evidence: `server/routes.ts`)
- Broker proxy and auth → Node configuration: updates auth token (evidence: `server/proxy.ts`)
- Broker proxy and auth → Meshlink broker nodes: proxies HTTP requests (evidence: `README.md`)
- Dashboard routes → Meshlink broker nodes: tests connectivity (evidence: `server/routes.ts`)
- Dashboard routes → Broker proxy and auth: aggregates node summaries (evidence: `server/routes.ts`)
