# esupportail/mybookings-services architecture

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

- Interactive diagram: https://gitdiagram.com/esupportail/mybookings-services
- Repository: https://github.com/esupportail/mybookings-services

## Overview

MyBookings Services is a Symfony API and service container that bridges MyBookings to LDAP, email, and access-control systems. The main user workflow is an authenticated HTTP request to user endpoints, which delegates lookup or search to user/group services and returns directory data. Separate API branches expose actuator operations and health checks; CLI commands configure providers and test their connectivity. The graph follows shown calls and README-documented capabilities; some configuration and framework wiring is not shown in the excerpts, so those links are omitted.

Main entry points: [`src/Command/TestServicesCommand.php`](https://github.com/esupportail/mybookings-services/blob/main/src/Command/TestServicesCommand.php) (Connectivity Tests), [`src/Service/Ldap.php`](https://github.com/esupportail/mybookings-services/blob/main/src/Service/Ldap.php) (LDAP Adapter), [`src/Service/ActuatorService.php`](https://github.com/esupportail/mybookings-services/blob/main/src/Service/ActuatorService.php) (Actuator Operations), [`src/Service/UserService.php`](https://github.com/esupportail/mybookings-services/blob/main/src/Service/UserService.php) (User Lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_front["HTTP Runtime<br/>[index.php]"]
  node_kernel["Symfony Kernel<br/>[Kernel.php]"]
  node_auth["Token Authenticator"]
  node_apiuser["API User<br/>[ApiUser.php]"]
  node_users["User Endpoints<br/>[UserController.php]"]
  node_actuatorapi["Actuator Endpoints"]
  node_healthapi["Health Endpoint"]
  node_mailcontroller["Mail Endpoint"]
end

subgraph group_identity["Identity Services"]
  node_userservice["User Lookup<br/>[UserService.php]"]
  node_groupservice["Provider Search<br/>[GroupService.php]"]
end

subgraph group_integrations["External Integrations"]
  node_ldap["LDAP Adapter<br/>[Ldap.php]"]
  node_mail["Mail Sender<br/>[Mail.php]"]
  node_actuatorservice["Actuator Operations"]
end

subgraph group_operations["Operations"]
  node_configure["Provider Configuration"]
  node_test["Connectivity Tests"]
  node_configfiles["Provider YAML"]
end

node_client(("API Client"))
node_directory[("LDAP Directory")]
node_smtp["SMTP Service"]
node_access["Access Control"]
node_cli(("CLI Operator"))

node_client -->|"sends requests"| node_front
node_front -->|"boots"| node_kernel
node_client -->|"sends token"| node_auth
node_auth -->|"creates user"| node_apiuser
node_users -->|"delegates lookup"| node_userservice
node_users -->|"delegates provider search"| node_groupservice
node_userservice -->|"queries directory"| node_ldap
node_groupservice -->|"queries provider"| node_ldap
node_ldap -->|"queries"| node_directory
node_mailcontroller -->|"sends email"| node_mail
node_mail -->|"sends message"| node_smtp
node_actuatorapi -->|"executes operation"| node_actuatorservice
node_actuatorservice -->|"reads endpoint"| node_access
node_healthapi -->|"checks actuators"| node_actuatorservice
node_healthapi -->|"checks providers"| node_ldap
node_cli -->|"runs command"| node_configure
node_configure -->|"generates YAML"| node_configfiles
node_cli -->|"runs command"| node_test
node_test -->|"tests connection"| node_ldap
node_test -->|"tests sending"| node_mail
node_test -->|"tests reads"| node_actuatorservice
node_test -->|"tests search"| node_userservice

click node_front "https://github.com/esupportail/mybookings-services/blob/main/public/index.php"
click node_kernel "https://github.com/esupportail/mybookings-services/blob/main/src/Kernel.php"
click node_auth "https://github.com/esupportail/mybookings-services/blob/main/src/Security/ApiAuthenticator.php"
click node_apiuser "https://github.com/esupportail/mybookings-services/blob/main/src/Security/ApiUser.php"
click node_users "https://github.com/esupportail/mybookings-services/blob/main/src/Controller/UserController.php"
click node_actuatorapi "https://github.com/esupportail/mybookings-services/blob/main/src/Controller/ActuatorController.php"
click node_healthapi "https://github.com/esupportail/mybookings-services/blob/main/src/Controller/HealthController.php"
click node_userservice "https://github.com/esupportail/mybookings-services/blob/main/src/Service/UserService.php"
click node_groupservice "https://github.com/esupportail/mybookings-services/blob/main/src/Service/GroupService.php"
click node_ldap "https://github.com/esupportail/mybookings-services/blob/main/src/Service/Ldap.php"
click node_mailcontroller "https://github.com/esupportail/mybookings-services/blob/main/src/Controller/MailerController.php"
click node_mail "https://github.com/esupportail/mybookings-services/blob/main/src/Service/Mail.php"
click node_actuatorservice "https://github.com/esupportail/mybookings-services/blob/main/src/Service/ActuatorService.php"
click node_configure "https://github.com/esupportail/mybookings-services/blob/main/src/Command/ConfigureServicesCommand.php"
click node_test "https://github.com/esupportail/mybookings-services/blob/main/src/Command/TestServicesCommand.php"
click node_configfiles "https://github.com/esupportail/mybookings-services/tree/main/config/examples"

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_front,node_kernel,node_auth,node_apiuser,node_users,node_actuatorapi,node_healthapi,node_mailcontroller,node_client toneBlue
class node_userservice,node_groupservice,node_directory toneAmber
class node_ldap,node_mail,node_actuatorservice toneMint
class node_configure,node_test,node_configfiles toneRose
class node_smtp,node_access,node_cli toneIndigo
```

## Components

### HTTP API

- [HTTP Runtime](https://github.com/esupportail/mybookings-services/blob/main/public/index.php): `public/index.php`
- [Symfony Kernel](https://github.com/esupportail/mybookings-services/blob/main/src/Kernel.php): `src/Kernel.php`
- [Token Authenticator](https://github.com/esupportail/mybookings-services/blob/main/src/Security/ApiAuthenticator.php): `src/Security/ApiAuthenticator.php`
- [API User](https://github.com/esupportail/mybookings-services/blob/main/src/Security/ApiUser.php): `src/Security/ApiUser.php`
- [User Endpoints](https://github.com/esupportail/mybookings-services/blob/main/src/Controller/UserController.php): `src/Controller/UserController.php`
- [Actuator Endpoints](https://github.com/esupportail/mybookings-services/blob/main/src/Controller/ActuatorController.php): `src/Controller/ActuatorController.php`
- [Health Endpoint](https://github.com/esupportail/mybookings-services/blob/main/src/Controller/HealthController.php): `src/Controller/HealthController.php`
- [Mail Endpoint](https://github.com/esupportail/mybookings-services/blob/main/src/Controller/MailerController.php): `src/Controller/MailerController.php`

### Identity Services

- [User Lookup](https://github.com/esupportail/mybookings-services/blob/main/src/Service/UserService.php): `src/Service/UserService.php`
- [Provider Search](https://github.com/esupportail/mybookings-services/blob/main/src/Service/GroupService.php): `src/Service/GroupService.php`

### External Integrations

- [LDAP Adapter](https://github.com/esupportail/mybookings-services/blob/main/src/Service/Ldap.php): `src/Service/Ldap.php`
- [Mail Sender](https://github.com/esupportail/mybookings-services/blob/main/src/Service/Mail.php): `src/Service/Mail.php`
- [Actuator Operations](https://github.com/esupportail/mybookings-services/blob/main/src/Service/ActuatorService.php): `src/Service/ActuatorService.php`

### Operations

- [Provider Configuration](https://github.com/esupportail/mybookings-services/blob/main/src/Command/ConfigureServicesCommand.php): `src/Command/ConfigureServicesCommand.php`
- [Connectivity Tests](https://github.com/esupportail/mybookings-services/blob/main/src/Command/TestServicesCommand.php): `src/Command/TestServicesCommand.php`
- [Provider YAML](https://github.com/esupportail/mybookings-services/tree/main/config/examples): `config/examples`

### Other components

- **API Client**
- **LDAP Directory**
- **SMTP Service**
- **Access Control**
- **CLI Operator**

## Connections

- API Client → HTTP Runtime: sends requests (evidence: `README.md`)
- HTTP Runtime → Symfony Kernel: boots (evidence: `public/index.php`)
- API Client → Token Authenticator: sends token (evidence: `README.md`)
- Token Authenticator → API User: creates user (evidence: `src/Security/ApiAuthenticator.php`)
- User Endpoints → User Lookup: delegates lookup (evidence: `src/Controller/UserController.php`)
- User Endpoints → Provider Search: delegates provider search (evidence: `src/Controller/UserController.php`)
- User Lookup → LDAP Adapter: queries directory (evidence: `src/Service/UserService.php`)
- Provider Search → LDAP Adapter: queries provider (evidence: `src/Service/GroupService.php`)
- LDAP Adapter → LDAP Directory: queries (evidence: `README.md`)
- Mail Endpoint → Mail Sender: sends email (evidence: `src/Controller/MailerController.php`)
- Mail Sender → SMTP Service: sends message (evidence: `src/Service/Mail.php`)
- Actuator Endpoints → Actuator Operations: executes operation (evidence: `src/Controller/ActuatorController.php`)
- Actuator Operations → Access Control: reads endpoint (evidence: `src/Service/ActuatorService.php`)
- Health Endpoint → Actuator Operations: checks actuators (evidence: `src/Controller/HealthController.php`)
- Health Endpoint → LDAP Adapter: checks providers (evidence: `src/Controller/HealthController.php`)
- CLI Operator → Provider Configuration: runs command (evidence: `README.md`)
- Provider Configuration → Provider YAML: generates YAML (evidence: `README.md`)
- CLI Operator → Connectivity Tests: runs command (evidence: `src/Command/TestServicesCommand.php`)
- Connectivity Tests → LDAP Adapter: tests connection (evidence: `src/Command/TestServicesCommand.php`)
- Connectivity Tests → Mail Sender: tests sending (evidence: `src/Command/TestServicesCommand.php`)
- Connectivity Tests → Actuator Operations: tests reads (evidence: `src/Command/TestServicesCommand.php`)
- Connectivity Tests → User Lookup: tests search (evidence: `src/Command/TestServicesCommand.php`)
