← Back to Keelo

KEELO // System Design

Keelo is a self-hosted Remote Monitoring & Management (RMM) platform I designed and built. Endpoint agents report status through a message broker, technicians open remote desktop, terminal and file sessions with single sign-on, and every action is checked against a role-based permission model. Devices are discovered from Active Directory. The diagrams below document its design in UML.

01

Use Case Diagram

Three roles with different rights: administrators configure the platform, technicians monitor and connect to endpoints, read-only users view inventory. Active Directory and the endpoint agents are external systems.

Administrator

Technician

Read-only user

Active Directory
(LDAP)

Managed endpoints
(Keelo agent)

Manage users, roles
& permissions

Configure AD sync

Discover devices from AD

Deploy agent to endpoints

Monitor device status

Remote desktop / terminal / files

View inventory & dashboard

02

Component Diagram

Endpoint agents publish their status to a NATS JetStream message broker; the Flask API consumes it, stores state in PostgreSQL, enforces permissions on every call and brokers remote sessions through MeshCentral running in Docker.

Managed network

Keelo server (Linux / WSL2)

HTTPS / REST

start / stop

SQL

durable consumer

WebSocket + SSO token

LDAP (encrypted bind)

publish status

desktop / terminal / files

Keelo dashboard
web UI (browser)

Keelo Launcher
service control GUI

Keelo API
Python / Flask
@require_permission

NATS JetStream
message broker

PostgreSQL

MeshCentral
(Docker)

Active Directory
LDAP

Keelo agent
Windows Service

Mesh agent

03

Sequence Diagram — Agent Telemetry via Message Broker

Asynchronous, decoupled status reporting: agents never call the API directly, and a durable stream means no status message is lost if the server restarts.

DashboardPostgreSQLKeelo APINATS JetStreamKeelo agent (endpoint)DashboardPostgreSQLKeelo APINATS JetStreamKeelo agent (endpoint)loop[Every interval]Durable stream: if the API restarts,unacknowledged messages are redeliveredPublish status message (host, metrics)1Persist in stream2Deliver to durable consumer3Upsert device status + last_seen4Ack5GET /devices6Query devices7Online / offline + latest status8
04

Sequence Diagram — Remote Session with Single Sign-On

Every remote session is authorised against the role matrix and per-user overrides, then opened in MeshCentral with a short-lived encrypted token, so the technician never logs in twice.

MeshCentralPostgreSQLKeelo APIDashboardMeshCentralPostgreSQLKeelo APIDashboardalt[Permission denied][Allowed]TechnicianClick "Remote desktop" on a device1POST /remote/session {device}2Load role permissions + user overrides3403 Forbidden4Find node by hostname (WebSocket)5Node ID6Issue short-lived encrypted login token7Session URL with token8Open remote desktop (SSO, no second login)9Technician
05

Entity-Relationship Diagram — Access Control & AD Discovery

Role-based access control (default role matrix + per-user overrides) and Active Directory discovery, with the bind password stored encrypted.

has

default matrix

granted by

overrides

on

runs

finds

becomes managed

ROLE

int

id

PK

string

name

superadmin, admin, technician, readonly

USER

int

id

PK

string

username

int

role_id

FK

ROLE_PERMISSION

int

role_id

FK

int

permission_id

FK

PERMISSION

int

id

PK

string

code

USER_PERMISSION_OVERRIDE

int

user_id

FK

int

permission_id

FK

bool

allowed

AD_CONFIG

int

id

PK

string

server

string

base_dn

string

bind_password_encrypted

AD_SYNC_LOG

int

id

PK

int

ad_config_id

FK

datetime

run_at

int

devices_found

DISCOVERED_DEVICE

int

id

PK

int

sync_id

FK

string

hostname

string

os

DEVICE

int

id

PK

string

hostname

string

agent_status

datetime

last_seen