# efxtv/l3mon architecture

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

- Interactive diagram: https://gitdiagram.com/efxtv/l3mon
- Repository: https://github.com/efxtv/l3mon

## Overview

L3MON is an Android remote-management suite: an administrator uses its web dashboard to inspect device data, issue commands, and build a configured APK; connected Android clients exchange commands and telemetry with the server. The sampled code shows the Express routes, Socket.IO entry point, client manager, persistence, logging, and APK builder. The README documents additional product capabilities, but the tree/source excerpts do not expose their individual dashboard or Android implementations, so those are represented at subsystem level.

Main entry points: [`includes/expressRoutes.js`](https://github.com/efxtv/l3mon/blob/main/includes/expressRoutes.js) (HTTP routes), [`includes/clientManager.js`](https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js) (Client manager), [`includes/apkBuilder.js`](https://github.com/efxtv/l3mon/blob/main/includes/apkBuilder.js) (APK builder), [`index.js`](https://github.com/efxtv/l3mon/blob/main/index.js) (Server entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Admin dashboard"]
  node_dashboard["Dashboard UI"]
end

subgraph group_server["Node server"]
  node_routes["HTTP routes<br/>[expressRoutes.js]"]
  node_entry["Server entry<br/>[index.js]"]
  node_socket["Socket.IO service<br/>[index.js]"]
  node_clients["Client manager<br/>[clientManager.js]"]
  node_constants["Protocol settings<br/>[const.js]"]
  node_database[("JSON persistence<br/>[databaseGateway.js]")]
  node_logs["Log manager<br/>[logManager.js]"]
  node_device_data["Device telemetry<br/>[clientManager.js]"]
  node_commands["Commands and queue<br/>[clientManager.js]"]
  node_client_store[("Per-client records<br/>[databaseGateway.js]")]
end

subgraph group_device["Android client"]
  node_android_client["Android client<br/>[MainService.smali]"]
  node_device_features["Device capabilities"]
end

subgraph group_build["APK generation"]
  node_apk_builder["APK builder<br/>[apkBuilder.js]"]
  node_apk_template["Android APK template<br/>[IOSocket.smali]"]
  node_built_apk["Built client APK"]
end

node_admin(("Administrator"))
node_device_operator(("Test-device operator"))

node_admin -->|"uses"| node_dashboard
node_dashboard -->|"requests"| node_routes
node_entry -->|"starts"| node_socket
node_entry -->|"mounts"| node_routes
node_socket -->|"dispatches connection"| node_clients
node_routes -->|"requests data"| node_clients
node_routes -->|"sends commands"| node_commands
node_routes -->|"starts build"| node_apk_builder
node_routes -->|"reads logs"| node_logs
node_clients -->|"handles events"| node_device_data
node_clients -->|"reads and writes"| node_client_store
node_clients -->|"queues and sends"| node_commands
node_logs -->|"writes logs"| node_database
node_device_data -->|"stores telemetry"| node_client_store
node_apk_builder -->|"patches"| node_apk_template
node_apk_builder -->|"builds and signs"| node_built_apk
node_device_operator -->|"installs"| node_built_apk
node_android_client -->|"connects"| node_socket
node_commands -->|"delivers commands"| node_android_client
node_android_client -->|"provides"| node_device_features
node_device_features -->|"reports telemetry"| node_device_data
node_apk_builder -->|"uses paths"| node_constants
node_entry -->|"configures ports"| node_constants

click node_dashboard "https://github.com/efxtv/l3mon/tree/main/assets/views"
click node_routes "https://github.com/efxtv/l3mon/blob/main/includes/expressRoutes.js"
click node_entry "https://github.com/efxtv/l3mon/blob/main/index.js"
click node_socket "https://github.com/efxtv/l3mon/blob/main/index.js"
click node_clients "https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js"
click node_constants "https://github.com/efxtv/l3mon/blob/main/includes/const.js"
click node_database "https://github.com/efxtv/l3mon/blob/main/includes/databaseGateway.js"
click node_logs "https://github.com/efxtv/l3mon/blob/main/includes/logManager.js"
click node_device_data "https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js"
click node_commands "https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js"
click node_apk_builder "https://github.com/efxtv/l3mon/blob/main/includes/apkBuilder.js"
click node_apk_template "https://github.com/efxtv/l3mon/blob/main/app/factory/decompiled/smali/com/etechd/l3mon/IOSocket.smali"
click node_android_client "https://github.com/efxtv/l3mon/blob/main/app/factory/decompiled/smali/com/etechd/l3mon/MainService.smali"
click node_client_store "https://github.com/efxtv/l3mon/blob/main/includes/databaseGateway.js"
click node_built_apk "https://github.com/efxtv/l3mon/tree/main/clientData"
click node_device_features "https://github.com/efxtv/l3mon/tree/main/app/factory/decompiled/smali/com/etechd/l3mon"

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_dashboard toneBlue
class node_routes,node_entry,node_socket,node_clients,node_constants,node_database,node_logs,node_device_data,node_commands,node_client_store toneAmber
class node_android_client,node_device_features toneMint
class node_apk_builder,node_apk_template,node_built_apk toneRose
class node_admin,node_device_operator toneIndigo
```

## Components

### Admin dashboard

- [Dashboard UI](https://github.com/efxtv/l3mon/tree/main/assets/views): `assets/views`

### Node server

- [HTTP routes](https://github.com/efxtv/l3mon/blob/main/includes/expressRoutes.js): `includes/expressRoutes.js`
- [Server entry](https://github.com/efxtv/l3mon/blob/main/index.js): `index.js`
- [Socket.IO service](https://github.com/efxtv/l3mon/blob/main/index.js): `index.js`
- [Client manager](https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js): `includes/clientManager.js`
- [Protocol settings](https://github.com/efxtv/l3mon/blob/main/includes/const.js): `includes/const.js`
- [JSON persistence](https://github.com/efxtv/l3mon/blob/main/includes/databaseGateway.js): `includes/databaseGateway.js`
- [Log manager](https://github.com/efxtv/l3mon/blob/main/includes/logManager.js): `includes/logManager.js`
- [Device telemetry](https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js): `includes/clientManager.js`
- [Commands and queue](https://github.com/efxtv/l3mon/blob/main/includes/clientManager.js): `includes/clientManager.js`
- [Per-client records](https://github.com/efxtv/l3mon/blob/main/includes/databaseGateway.js): `includes/databaseGateway.js`

### Android client

- [Android client](https://github.com/efxtv/l3mon/blob/main/app/factory/decompiled/smali/com/etechd/l3mon/MainService.smali): `app/factory/decompiled/smali/com/etechd/l3mon/MainService.smali`
- [Device capabilities](https://github.com/efxtv/l3mon/tree/main/app/factory/decompiled/smali/com/etechd/l3mon): `app/factory/decompiled/smali/com/etechd/l3mon`

### APK generation

- [APK builder](https://github.com/efxtv/l3mon/blob/main/includes/apkBuilder.js): `includes/apkBuilder.js`
- [Android APK template](https://github.com/efxtv/l3mon/blob/main/app/factory/decompiled/smali/com/etechd/l3mon/IOSocket.smali): `app/factory/decompiled/smali/com/etechd/l3mon/IOSocket.smali`
- [Built client APK](https://github.com/efxtv/l3mon/tree/main/clientData): `clientData`

### Other components

- **Administrator**
- **Test-device operator**

## Connections

- Administrator → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → HTTP routes: requests (evidence: `README.md`)
- Server entry → Socket.IO service: starts (evidence: `index.js`)
- Server entry → HTTP routes: mounts (evidence: `index.js`)
- Socket.IO service → Client manager: dispatches connection (evidence: `index.js`)
- HTTP routes → Client manager: requests data (evidence: `includes/expressRoutes.js`)
- HTTP routes → Commands and queue: sends commands (evidence: `includes/expressRoutes.js`)
- HTTP routes → APK builder: starts build (evidence: `includes/expressRoutes.js`)
- HTTP routes → Log manager: reads logs (evidence: `includes/expressRoutes.js`)
- Client manager → Device telemetry: handles events (evidence: `includes/clientManager.js`)
- Client manager → Per-client records: reads and writes (evidence: `includes/clientManager.js`)
- Client manager → Commands and queue: queues and sends (evidence: `includes/clientManager.js`)
- Log manager → JSON persistence: writes logs (evidence: `includes/logManager.js`)
- Device telemetry → Per-client records: stores telemetry (evidence: `includes/clientManager.js`)
- APK builder → Android APK template: patches (evidence: `includes/apkBuilder.js`)
- APK builder → Built client APK: builds and signs (evidence: `includes/apkBuilder.js`)
- Test-device operator → Built client APK: installs (evidence: `README.md`)
- Android client → Socket.IO service: connects (evidence: `README.md`)
- Commands and queue → Android client: delivers commands (evidence: `README.md`)
- Android client → Device capabilities: provides (evidence: `README.md`)
- Device capabilities → Device telemetry: reports telemetry (evidence: `README.md`)
- APK builder → Protocol settings: uses paths (evidence: `includes/apkBuilder.js`)
- Server entry → Protocol settings: configures ports (evidence: `index.js`)
