# ylianst/meshcentral architecture

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

- Interactive diagram: https://gitdiagram.com/ylianst/meshcentral
- Repository: https://github.com/ylianst/meshcentral

## Overview

MeshCentral is a self-hosted remote computer management service. Administrators create device groups and install agents; managed computers appear in the web interface, where users can access remote desktop, terminal, and file management. The graph preserves those documented capabilities and the Intel AMT and browser-side remote desktop components visible in the source index. Many server-side routes and integrations are unsampled, so their connections are omitted rather than inferred from filenames; dashed links mark the documented but implementation-unverified workflow.

Main entry points: [`amtmanager.js`](https://github.com/ylianst/meshcentral/blob/master/amtmanager.js) (AMT manager), [`meshcentral.js`](https://github.com/ylianst/meshcentral/blob/master/meshcentral.js) (MeshCentral server), [`meshagent.js`](https://github.com/ylianst/meshcentral/blob/master/meshagent.js) (Mesh agent), [`db.js`](https://github.com/ylianst/meshcentral/blob/master/db.js) (Device database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_management["Management service"]
  node_server["MeshCentral server<br/>[meshcentral.js]"]
  node_web["Web server<br/>[webserver.js]"]
  node_database[("Device database<br/>[db.js]")]
  node_user["User and device management<br/>[meshuser.js]"]
  node_auth["Authentication<br/>[pass.js]"]
  node_twofactor["WebAuthn<br/>[webauthn.js]"]
end

subgraph group_endpoints["Managed endpoints"]
  node_agent["Mesh agent<br/>[meshagent.js]"]
  node_agentcore["Agent core<br/>[meshcore.js]"]
  node_computer(("Managed computer"))
end

subgraph group_remote["Remote access"]
  node_desktop["Remote desktop"]
  node_terminal["Remote terminal<br/>[win-terminal.js]"]
  node_files["Device file access<br/>[meshdevicefile.js]"]
  node_relay["Connection relay<br/>[meshrelay.js]"]
end

subgraph group_amt["Intel AMT"]
  node_amtmanager["AMT manager<br/>[amtmanager.js]"]
  node_amtcomm["AMT communications<br/>[amt-wsman-comm.js]"]
  node_amtwsman["WS-Man<br/>[amt-wsman.js]"]
  node_amtprotocol["AMT protocol<br/>[amt.js]"]
end

subgraph group_browser["Browser clients"]
  node_vnc["VNC client<br/>[rfb.js]"]
  node_vncdisplay["VNC display<br/>[display.js]"]
  node_tight["Tight decoder<br/>[tight.js]"]
  node_inflator["Data inflator<br/>[inflator.js]"]
  node_rdp["RDP protocol<br/>[rdp.js]"]
end

node_admin(("Administrator"))
node_browseruser(("Browser user"))

node_admin -.->|"administers"| node_server
node_computer -.->|"installs"| node_agent
node_agent -.->|"registers with"| node_server
node_server -.->|"records devices"| node_database
node_server -.->|"serves management site"| node_web
node_browseruser -.->|"uses"| node_web
node_browseruser -.->|"controls remotely"| node_desktop
node_browseruser -.->|"accesses"| node_terminal
node_browseruser -.->|"manages files"| node_files
node_agent -.->|"runs"| node_agentcore
node_desktop -.->|"relays session"| node_relay
node_vnc -->|"updates display"| node_vncdisplay
node_vnc -.->|"decodes rectangles"| node_tight
node_tight -->|"inflates data"| node_inflator
node_rdp -.->|"provides RDP client"| node_browseruser
node_amtmanager -->|"reads device record"| node_database
node_amtmanager -->|"uses communications"| node_amtcomm
node_amtmanager -->|"uses WS-Man"| node_amtwsman
node_amtmanager -->|"uses AMT protocol"| node_amtprotocol
node_amtmanager -.->|"manages AMT"| node_computer
node_auth -.->|"supports WebAuthn"| node_twofactor
node_user -.->|"manages records"| node_database

click node_server "https://github.com/ylianst/meshcentral/blob/master/meshcentral.js"
click node_web "https://github.com/ylianst/meshcentral/blob/master/webserver.js"
click node_database "https://github.com/ylianst/meshcentral/blob/master/db.js"
click node_user "https://github.com/ylianst/meshcentral/blob/master/meshuser.js"
click node_auth "https://github.com/ylianst/meshcentral/blob/master/pass.js"
click node_twofactor "https://github.com/ylianst/meshcentral/blob/master/webauthn.js"
click node_agent "https://github.com/ylianst/meshcentral/blob/master/meshagent.js"
click node_agentcore "https://github.com/ylianst/meshcentral/blob/master/agents/meshcore.js"
click node_desktop "https://github.com/ylianst/meshcentral/blob/master/meshdesktopmultiplex.js"
click node_terminal "https://github.com/ylianst/meshcentral/blob/master/agents/modules_meshcore/win-terminal.js"
click node_files "https://github.com/ylianst/meshcentral/blob/master/meshdevicefile.js"
click node_relay "https://github.com/ylianst/meshcentral/blob/master/meshrelay.js"
click node_vnc "https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/rfb.js"
click node_vncdisplay "https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/display.js"
click node_tight "https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/decoders/tight.js"
click node_inflator "https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/inflator.js"
click node_rdp "https://github.com/ylianst/meshcentral/blob/master/rdp/protocol/rdp.js"
click node_amtmanager "https://github.com/ylianst/meshcentral/blob/master/amtmanager.js"
click node_amtcomm "https://github.com/ylianst/meshcentral/blob/master/amt/amt-wsman-comm.js"
click node_amtwsman "https://github.com/ylianst/meshcentral/blob/master/amt/amt-wsman.js"
click node_amtprotocol "https://github.com/ylianst/meshcentral/blob/master/amt/amt.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_server,node_web,node_database,node_user,node_auth,node_twofactor,node_browseruser toneBlue
class node_agent,node_agentcore,node_computer toneAmber
class node_desktop,node_terminal,node_files,node_relay toneMint
class node_amtmanager,node_amtcomm,node_amtwsman,node_amtprotocol toneRose
class node_vnc,node_vncdisplay,node_tight,node_inflator,node_rdp,node_admin toneIndigo
```

## Components

### Management service

- [MeshCentral server](https://github.com/ylianst/meshcentral/blob/master/meshcentral.js): `meshcentral.js`
- [Web server](https://github.com/ylianst/meshcentral/blob/master/webserver.js): `webserver.js`
- [Device database](https://github.com/ylianst/meshcentral/blob/master/db.js): `db.js`
- [User and device management](https://github.com/ylianst/meshcentral/blob/master/meshuser.js): `meshuser.js`
- [Authentication](https://github.com/ylianst/meshcentral/blob/master/pass.js): `pass.js`
- [WebAuthn](https://github.com/ylianst/meshcentral/blob/master/webauthn.js): `webauthn.js`

### Managed endpoints

- [Mesh agent](https://github.com/ylianst/meshcentral/blob/master/meshagent.js): `meshagent.js`
- [Agent core](https://github.com/ylianst/meshcentral/blob/master/agents/meshcore.js): `agents/meshcore.js`
- **Managed computer**

### Remote access

- [Remote desktop](https://github.com/ylianst/meshcentral/blob/master/meshdesktopmultiplex.js): `meshdesktopmultiplex.js`
- [Remote terminal](https://github.com/ylianst/meshcentral/blob/master/agents/modules_meshcore/win-terminal.js): `agents/modules_meshcore/win-terminal.js`
- [Device file access](https://github.com/ylianst/meshcentral/blob/master/meshdevicefile.js): `meshdevicefile.js`
- [Connection relay](https://github.com/ylianst/meshcentral/blob/master/meshrelay.js): `meshrelay.js`

### Intel AMT

- [AMT manager](https://github.com/ylianst/meshcentral/blob/master/amtmanager.js): `amtmanager.js`
- [AMT communications](https://github.com/ylianst/meshcentral/blob/master/amt/amt-wsman-comm.js): `amt/amt-wsman-comm.js`
- [WS-Man](https://github.com/ylianst/meshcentral/blob/master/amt/amt-wsman.js): `amt/amt-wsman.js`
- [AMT protocol](https://github.com/ylianst/meshcentral/blob/master/amt/amt.js): `amt/amt.js`

### Browser clients

- [VNC client](https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/rfb.js): `public/novnc/core/rfb.js`
- [VNC display](https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/display.js): `public/novnc/core/display.js`
- [Tight decoder](https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/decoders/tight.js): `public/novnc/core/decoders/tight.js`
- [Data inflator](https://github.com/ylianst/meshcentral/blob/master/public/novnc/core/inflator.js): `public/novnc/core/inflator.js`
- [RDP protocol](https://github.com/ylianst/meshcentral/blob/master/rdp/protocol/rdp.js): `rdp/protocol/rdp.js`

### Other components

- **Administrator**
- **Browser user**

## Connections

- Administrator → MeshCentral server: administers
- Managed computer → Mesh agent: installs
- Mesh agent → MeshCentral server: registers with
- MeshCentral server → Device database: records devices
- MeshCentral server → Web server: serves management site
- Browser user → Web server: uses
- Browser user → Remote desktop: controls remotely
- Browser user → Remote terminal: accesses
- Browser user → Device file access: manages files
- Mesh agent → Agent core: runs
- Remote desktop → Connection relay: relays session
- VNC client → VNC display: updates display (evidence: `public/novnc/core/rfb.js`)
- VNC client → Tight decoder: decodes rectangles (evidence: `public/novnc/core/rfb.js`)
- Tight decoder → Data inflator: inflates data (evidence: `public/novnc/core/decoders/tight.js`)
- RDP protocol → Browser user: provides RDP client
- AMT manager → Device database: reads device record (evidence: `amtmanager.js`)
- AMT manager → AMT communications: uses communications (evidence: `amtmanager.js`)
- AMT manager → WS-Man: uses WS-Man (evidence: `amtmanager.js`)
- AMT manager → AMT protocol: uses AMT protocol (evidence: `amtmanager.js`)
- AMT manager → Managed computer: manages AMT
- Authentication → WebAuthn: supports WebAuthn
- User and device management → Device database: manages records
