# psy-zney/sentinellan architecture

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

- Interactive diagram: https://gitdiagram.com/psy-zney/sentinellan
- Repository: https://github.com/psy-zney/sentinellan

## Overview

SentinelLAN is an endpoint-management and employee-support product: employees use its portals or mobile app to view assigned devices and submit support requests; IT and company administrators manage devices, alerts, policies, and accounts; enrolled agents report device health and perform authorized commands. The graph separates user-facing clients, backend capabilities, and the endpoint agent. Service-to-store and API-endpoint wiring is largely unsampled, so those internal links are omitted; broader product capabilities are retained as subsystem nodes based on the README and source tree.

Main entry points: [`apps/agent/src/SentinelLAN.Agent.Core/AgentCycle.cs`](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Core/AgentCycle.cs) (Telemetry and command cycle), [`apps/agent/src/SentinelLAN.Agent/Worker.cs`](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent/Worker.cs) (Agent service worker), [`apps/mobile/src/app`](https://github.com/psy-zney/sentinellan/tree/main/apps/mobile/src/app) (Mobile app), [`apps/mobile/src/lib/api/client.ts`](https://github.com/psy-zney/sentinellan/blob/main/apps/mobile/src/lib/api/client.ts) (Mobile API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_webportals["Company and employee portals"]
  node_mobile["Mobile app"]
  node_mobileapi["Mobile API client<br/>[client.ts]"]
end

subgraph group_backend["Management backend"]
  node_api["HTTP API<br/>[Endpoints]"]
  node_auth["Authentication and sessions<br/>[Authentication]"]
  node_enrollment["Device enrollment<br/>[Enrollment]"]
  node_deviceops["Device management<br/>[Devices]"]
  node_assetops["Assets and incidents<br/>[AssetManagement]"]
  node_alerts["Alerts and audit<br/>[Alerts]"]
  node_policies["Policies and commands<br/>[Policies]"]
  node_selfservice["Support self-service<br/>[SelfService]"]
  node_usermanagement["User management<br/>[Users]"]
  node_vps["Platform operations<br/>[VpsNodes]"]
  node_storage[("Management persistence")]
end

subgraph group_agent["Endpoint agent"]
  node_agentworker["Agent service worker<br/>[Worker.cs]"]
  node_agentcycle["Telemetry and command cycle<br/>[AgentCycle.cs]"]
  node_telemetry["System telemetry"]
  node_agentapi["Agent API adapter<br/>[Adapters.cs]"]
  node_commandexec["Command execution"]
  node_policyapply["Policy application"]
  node_securequeue[("Protected offline state")]
end

node_employee(("Employee"))
node_itadmin(("IT and admins"))
node_employeeuser(("Employee"))
node_operator(("IT operator"))
node_manageddevice(("Managed device"))

node_employee -->|"uses"| node_webportals
node_employee -->|"uses"| node_mobile
node_itadmin -->|"manages through"| node_webportals
node_itadmin -->|"manages through"| node_mobile
node_mobile -->|"uses API client"| node_mobileapi
node_mobileapi -->|"sends HTTP requests"| node_api
node_agentworker -->|"runs cycle"| node_agentcycle
node_agentcycle -.->|"collects telemetry"| node_telemetry
node_agentcycle -.->|"exchanges device data"| node_agentapi
node_agentcycle -.->|"executes commands"| node_commandexec
node_agentcycle -.->|"applies policies"| node_policyapply
node_agentworker -->|"reports device health"| node_api
node_employeeuser -->|"submits support requests"| node_selfservice
node_operator -->|"manages devices"| node_deviceops
node_operator -->|"handles alerts"| node_alerts
node_manageddevice -->|"runs agent"| node_agentworker

click node_webportals "https://github.com/psy-zney/sentinellan/tree/main/apps/company/src/app"
click node_mobile "https://github.com/psy-zney/sentinellan/tree/main/apps/mobile/src/app"
click node_mobileapi "https://github.com/psy-zney/sentinellan/blob/main/apps/mobile/src/lib/api/client.ts"
click node_api "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Api/Endpoints"
click node_auth "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Authentication"
click node_enrollment "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Enrollment"
click node_deviceops "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Devices"
click node_assetops "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/AssetManagement"
click node_alerts "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Alerts"
click node_policies "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Policies"
click node_selfservice "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/SelfService"
click node_usermanagement "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Users"
click node_vps "https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/VpsNodes"
click node_storage "https://github.com/psy-zney/sentinellan/blob/main/apps/backend/src/SentinelLAN.Infrastructure/SentinelDbContext.cs"
click node_agentworker "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent/Worker.cs"
click node_agentcycle "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Core/AgentCycle.cs"
click node_telemetry "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/SystemTelemetryCollector.cs"
click node_agentapi "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/Adapters.cs"
click node_commandexec "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsCommandExecutor.cs"
click node_policyapply "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsPolicyApplier.cs"
click node_securequeue "https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/ProtectedOfflineTelemetryQueueStore.cs"

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_webportals,node_mobile,node_mobileapi toneBlue
class node_api,node_auth,node_enrollment,node_deviceops,node_assetops,node_alerts,node_policies,node_selfservice,node_usermanagement,node_vps,node_storage toneAmber
class node_agentworker,node_agentcycle,node_telemetry,node_agentapi,node_commandexec,node_policyapply,node_securequeue toneMint
class node_employee,node_itadmin,node_employeeuser,node_operator,node_manageddevice toneIndigo
```

## Components

### User clients

- [Company and employee portals](https://github.com/psy-zney/sentinellan/tree/main/apps/company/src/app): `apps/company/src/app`
- [Mobile app](https://github.com/psy-zney/sentinellan/tree/main/apps/mobile/src/app): `apps/mobile/src/app`
- [Mobile API client](https://github.com/psy-zney/sentinellan/blob/main/apps/mobile/src/lib/api/client.ts): `apps/mobile/src/lib/api/client.ts`

### Management backend

- [HTTP API](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Api/Endpoints): `apps/backend/src/SentinelLAN.Api/Endpoints`
- [Authentication and sessions](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Authentication): `apps/backend/src/SentinelLAN.Application/Authentication`
- [Device enrollment](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Enrollment): `apps/backend/src/SentinelLAN.Application/Enrollment`
- [Device management](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Devices): `apps/backend/src/SentinelLAN.Application/Devices`
- [Assets and incidents](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/AssetManagement): `apps/backend/src/SentinelLAN.Application/AssetManagement`
- [Alerts and audit](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Alerts): `apps/backend/src/SentinelLAN.Application/Alerts`
- [Policies and commands](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Policies): `apps/backend/src/SentinelLAN.Application/Policies`
- [Support self-service](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/SelfService): `apps/backend/src/SentinelLAN.Application/SelfService`
- [User management](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/Users): `apps/backend/src/SentinelLAN.Application/Users`
- [Platform operations](https://github.com/psy-zney/sentinellan/tree/main/apps/backend/src/SentinelLAN.Application/VpsNodes): `apps/backend/src/SentinelLAN.Application/VpsNodes`
- [Management persistence](https://github.com/psy-zney/sentinellan/blob/main/apps/backend/src/SentinelLAN.Infrastructure/SentinelDbContext.cs): `apps/backend/src/SentinelLAN.Infrastructure/SentinelDbContext.cs`

### Endpoint agent

- [Agent service worker](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent/Worker.cs): `apps/agent/src/SentinelLAN.Agent/Worker.cs`
- [Telemetry and command cycle](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Core/AgentCycle.cs): `apps/agent/src/SentinelLAN.Agent.Core/AgentCycle.cs`
- [System telemetry](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/SystemTelemetryCollector.cs): `apps/agent/src/SentinelLAN.Agent.Infrastructure/SystemTelemetryCollector.cs`
- [Agent API adapter](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/Adapters.cs): `apps/agent/src/SentinelLAN.Agent.Infrastructure/Adapters.cs`
- [Command execution](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsCommandExecutor.cs): `apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsCommandExecutor.cs`
- [Policy application](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsPolicyApplier.cs): `apps/agent/src/SentinelLAN.Agent.Infrastructure/WindowsPolicyApplier.cs`
- [Protected offline state](https://github.com/psy-zney/sentinellan/blob/main/apps/agent/src/SentinelLAN.Agent.Infrastructure/ProtectedOfflineTelemetryQueueStore.cs): `apps/agent/src/SentinelLAN.Agent.Infrastructure/ProtectedOfflineTelemetryQueueStore.cs`

### Other components

- **Employee**
- **IT and admins**
- **Employee**
- **IT operator**
- **Managed device**

## Connections

- Employee → Company and employee portals: uses (evidence: `README.md`)
- Employee → Mobile app: uses (evidence: `README.md`)
- IT and admins → Company and employee portals: manages through (evidence: `README.md`)
- IT and admins → Mobile app: manages through (evidence: `README.md`)
- Mobile app → Mobile API client: uses API client (evidence: `apps/mobile/src/lib/api/client.ts`)
- Mobile API client → HTTP API: sends HTTP requests (evidence: `apps/mobile/src/lib/api/client.ts`)
- Agent service worker → Telemetry and command cycle: runs cycle (evidence: `apps/agent/src/SentinelLAN.Agent/Worker.cs`)
- Telemetry and command cycle → System telemetry: collects telemetry
- Telemetry and command cycle → Agent API adapter: exchanges device data
- Telemetry and command cycle → Command execution: executes commands
- Telemetry and command cycle → Policy application: applies policies
- Agent service worker → HTTP API: reports device health (evidence: `README.md`)
- Employee → Support self-service: submits support requests (evidence: `README.md`)
- IT operator → Device management: manages devices (evidence: `README.md`)
- IT operator → Alerts and audit: handles alerts (evidence: `README.md`)
- Managed device → Agent service worker: runs agent (evidence: `README.md`)
