# rosteleset/smartyard-server architecture

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

- Interactive diagram: https://gitdiagram.com/rosteleset/smartyard-server
- Repository: https://github.com/rosteleset/smartyard-server

## Overview

RoBoT (SmartYard-Server) is an IP-intercom and video-surveillance platform. Its main workflow is an operator or resident using a web or mobile client to manage locations, subscribers, devices, and service events through server APIs; the server delegates domain work to configurable backends and device integrations. A separate event-service path accepts device syslog or webhook messages and invokes server actions for events such as motion, door access, and call completion. The tree and excerpts support these subsystem boundaries, but not every API-to-backend mapping, so uncertain links are omitted.

Main entry points: [`server/api/api.php`](https://github.com/rosteleset/smartyard-server/blob/main/server/api/api.php) (Web API), [`server/mobile/address/getAddressList.php`](https://github.com/rosteleset/smartyard-server/blob/main/server/mobile/address/getAddressList.php) (Mobile API), [`client/js/app.js`](https://github.com/rosteleset/smartyard-server/blob/main/client/js/app.js) (Web application), [`server/api/addresses/addresses.php`](https://github.com/rosteleset/smartyard-server/blob/main/server/api/addresses/addresses.php) (Address and subscriber APIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[app.js]"]
  node_webmodules["Management modules<br/>[addresses.js]"]
  node_rest["REST client<br/>[rest.js]"]
end

subgraph group_api["Server interfaces"]
  node_webapi["Web API<br/>[api.php]"]
  node_authapi["Authentication API<br/>[login.php]"]
  node_addressapi["Address and subscriber APIs<br/>[addresses.php]"]
  node_cameraapi["Camera APIs<br/>[cameras.php]"]
  node_ticketapi["Issue tracking APIs<br/>[issues.php]"]
  node_mobileapi["Mobile API<br/>[getAddressList.php]"]
end

subgraph group_domain["Domain backends"]
  node_backendloader["Backend loader<br/>[backend.php]"]
  node_addressbackend["Address services<br/>[addresses.php]"]
  node_households["Household services<br/>[households.php]"]
  node_camerabackend["Camera services<br/>[cameras.php]"]
  node_ticketbackend["Issue tracking<br/>[tt.php]"]
  node_billing["Billing services<br/>[billing.php]"]
end

subgraph group_device["Device and event services"]
  node_eventlistener["Device event listener<br/>[WebHookService.js]"]
  node_devicehandlers["Device event handlers<br/>[AkuvoxService.js]"]
  node_eventapi["Event action API<br/>[API.js]"]
  node_serveractions["Server event actions<br/>[openDoor.php]"]
  node_hardware["Intercom and camera drivers<br/>[domophone.php]"]
end

subgraph group_mobile["Mobile services"]
end

node_operator(("Operator"))
node_resident(("Resident"))
node_device(("Intercom or camera"))
node_mobileclient(("Mobile client"))

node_operator -->|"uses"| node_webapp
node_webapp -->|"loads"| node_webmodules
node_webapp -->|"requests"| node_rest
node_webmodules -->|"requests"| node_rest
node_rest -->|"sends requests"| node_webapi
node_webapi -->|"dispatches"| node_authapi
node_webapi -->|"dispatches"| node_addressapi
node_webapi -->|"dispatches"| node_cameraapi
node_webapi -->|"dispatches"| node_ticketapi
node_addressapi -->|"loads backend"| node_backendloader
node_addressapi -->|"uses"| node_addressbackend
node_mobileclient -->|"sends requests"| node_mobileapi
node_mobileapi -->|"loads backend"| node_backendloader
node_mobileapi -->|"reads flats"| node_households
node_mobileapi -.->|"requests services"| node_billing
node_device -.->|"sends webhook"| node_eventlistener
node_eventlistener -->|"dispatches message"| node_devicehandlers
node_devicehandlers -->|"invokes actions"| node_eventapi
node_eventapi -->|"calls actions"| node_serveractions
node_devicehandlers -->|"interprets device events"| node_hardware

click node_webapp "https://github.com/rosteleset/smartyard-server/blob/main/client/js/app.js"
click node_webmodules "https://github.com/rosteleset/smartyard-server/blob/main/client/modules/addresses/addresses.js"
click node_rest "https://github.com/rosteleset/smartyard-server/blob/main/client/js/rest.js"
click node_webapi "https://github.com/rosteleset/smartyard-server/blob/main/server/api/api.php"
click node_authapi "https://github.com/rosteleset/smartyard-server/blob/main/server/api/authentication/login.php"
click node_addressapi "https://github.com/rosteleset/smartyard-server/blob/main/server/api/addresses/addresses.php"
click node_cameraapi "https://github.com/rosteleset/smartyard-server/blob/main/server/api/cameras/cameras.php"
click node_ticketapi "https://github.com/rosteleset/smartyard-server/blob/main/server/api/tt/issues.php"
click node_mobileapi "https://github.com/rosteleset/smartyard-server/blob/main/server/mobile/address/getAddressList.php"
click node_backendloader "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/backend.php"
click node_addressbackend "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/addresses/addresses.php"
click node_households "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/households/households.php"
click node_camerabackend "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/cameras/cameras.php"
click node_ticketbackend "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/tt/tt.php"
click node_billing "https://github.com/rosteleset/smartyard-server/blob/main/server/backends/billing/billing.php"
click node_eventlistener "https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/services/base/WebHookService.js"
click node_devicehandlers "https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/services/AkuvoxService.js"
click node_eventapi "https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/utils/API.js"
click node_serveractions "https://github.com/rosteleset/smartyard-server/blob/main/server/internal/actions/openDoor.php"
click node_hardware "https://github.com/rosteleset/smartyard-server/blob/main/server/hw/ip/domophone/domophone.php"

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_webapp,node_webmodules,node_rest,node_mobileclient toneBlue
class node_webapi,node_authapi,node_addressapi,node_cameraapi,node_ticketapi,node_mobileapi toneAmber
class node_backendloader,node_addressbackend,node_households,node_camerabackend,node_ticketbackend,node_billing toneMint
class node_eventlistener,node_devicehandlers,node_eventapi,node_serveractions,node_hardware toneRose
class node_operator,node_resident,node_device toneIndigo
```

## Components

### Web client

- [Web application](https://github.com/rosteleset/smartyard-server/blob/main/client/js/app.js): `client/js/app.js`
- [Management modules](https://github.com/rosteleset/smartyard-server/blob/main/client/modules/addresses/addresses.js): `client/modules/addresses/addresses.js`
- [REST client](https://github.com/rosteleset/smartyard-server/blob/main/client/js/rest.js): `client/js/rest.js`

### Server interfaces

- [Web API](https://github.com/rosteleset/smartyard-server/blob/main/server/api/api.php): `server/api/api.php`
- [Authentication API](https://github.com/rosteleset/smartyard-server/blob/main/server/api/authentication/login.php): `server/api/authentication/login.php`
- [Address and subscriber APIs](https://github.com/rosteleset/smartyard-server/blob/main/server/api/addresses/addresses.php): `server/api/addresses/addresses.php`
- [Camera APIs](https://github.com/rosteleset/smartyard-server/blob/main/server/api/cameras/cameras.php): `server/api/cameras/cameras.php`
- [Issue tracking APIs](https://github.com/rosteleset/smartyard-server/blob/main/server/api/tt/issues.php): `server/api/tt/issues.php`
- [Mobile API](https://github.com/rosteleset/smartyard-server/blob/main/server/mobile/address/getAddressList.php): `server/mobile/address/getAddressList.php`

### Domain backends

- [Backend loader](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/backend.php): `server/backends/backend.php`
- [Address services](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/addresses/addresses.php): `server/backends/addresses/addresses.php`
- [Household services](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/households/households.php): `server/backends/households/households.php`
- [Camera services](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/cameras/cameras.php): `server/backends/cameras/cameras.php`
- [Issue tracking](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/tt/tt.php): `server/backends/tt/tt.php`
- [Billing services](https://github.com/rosteleset/smartyard-server/blob/main/server/backends/billing/billing.php): `server/backends/billing/billing.php`

### Device and event services

- [Device event listener](https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/services/base/WebHookService.js): `server/services/event/services/base/WebHookService.js`
- [Device event handlers](https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/services/AkuvoxService.js): `server/services/event/services/AkuvoxService.js`
- [Event action API](https://github.com/rosteleset/smartyard-server/blob/main/server/services/event/utils/API.js): `server/services/event/utils/API.js`
- [Server event actions](https://github.com/rosteleset/smartyard-server/blob/main/server/internal/actions/openDoor.php): `server/internal/actions/openDoor.php`
- [Intercom and camera drivers](https://github.com/rosteleset/smartyard-server/blob/main/server/hw/ip/domophone/domophone.php): `server/hw/ip/domophone/domophone.php`

### Other components

- **Operator**
- **Resident**
- **Intercom or camera**
- **Mobile client**

## Connections

- Operator → Web application: uses
- Web application → Management modules: loads
- Web application → REST client: requests
- Management modules → REST client: requests
- REST client → Web API: sends requests
- Web API → Authentication API: dispatches
- Web API → Address and subscriber APIs: dispatches
- Web API → Camera APIs: dispatches
- Web API → Issue tracking APIs: dispatches
- Address and subscriber APIs → Backend loader: loads backend
- Address and subscriber APIs → Address services: uses
- Mobile client → Mobile API: sends requests
- Mobile API → Backend loader: loads backend
- Mobile API → Household services: reads flats
- Mobile API → Billing services: requests services
- Intercom or camera → Device event listener: sends webhook
- Device event listener → Device event handlers: dispatches message
- Device event handlers → Event action API: invokes actions
- Event action API → Server event actions: calls actions
- Device event handlers → Intercom and camera drivers: interprets device events
