# nethesis/freepbx-framework architecture

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

- Interactive diagram: https://gitdiagram.com/nethesis/freepbx-framework
- Repository: https://github.com/nethesis/freepbx-framework

## Overview

FreePBX is a web GUI for configuring and managing Asterisk. The main user-facing path is through the administration interface; the README documents its role in controlling Asterisk, but the sampled sources do not expose the full telephony-configuration flow. The excerpts do show a distinct update-management workflow: console settings are handled by UpdateManager, which manages update configuration and scheduling and consults SystemUpdates. Installation, database access, media handling, and LESS caching are also represented. Unexcerpted capabilities are included only where the README or tree supports them; several connections remain unverified.

Main entry points: [`amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php`](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php) (Update manager), [`amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php`](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php) (Update console), [`amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php`](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php) (Media driver), [`amp_conf/htdocs/admin/libraries/less/Cache.php`](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/less/Cache.php) (LESS cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration"]
  node_webui["Admin interface<br/>[index.php]"]
  node_ajax["Admin AJAX<br/>[ajax.php]"]
  node_moduleadmin["Module administration<br/>[page.modules.php]"]
end

subgraph group_updates["Updates"]
  node_console["Update console"]
  node_updatemgr["Update manager<br/>[UpdateManager.php]"]
  node_sysupdates["System updates<br/>[SystemUpdates.php]"]
  node_feedclient["Feed HTTP client<br/>[Client.php]"]
end

subgraph group_platform["Platform services"]
  node_db["Database access<br/>[Database.class.php]"]
  node_media["Media processing<br/>[Media.php]"]
  node_driver["Media driver<br/>[Driver.php]"]
  node_track["Audio track<br/>[Track.php]"]
  node_mime["MIME detection<br/>[Type.php]"]
  node_lesscache["LESS cache<br/>[Cache.php]"]
  node_less["LESS compiler<br/>[Less.php]"]
end

subgraph group_setup["Installation"]
  node_installer["Installer<br/>[install.php]"]
  node_installlib["Install services"]
end

node_operator(("PBX administrator"))
node_asterisk["Asterisk PBX"]

node_operator -.->|"uses"| node_webui
node_webui -->|"controls"| node_asterisk
node_console -->|"creates"| node_updatemgr
node_console -->|"checks support"| node_sysupdates
node_updatemgr -->|"checks capability"| node_sysupdates
node_driver -->|"references"| node_media
node_driver -->|"references"| node_track
node_lesscache -.->|"uses compiler"| node_less
node_lesscache -->|"uses version"| node_less
node_installer -->|"loads"| node_installlib
node_installlib -->|"schedules updates"| node_updatemgr

click node_webui "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/index.php"
click node_ajax "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/ajax.php"
click node_moduleadmin "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/page.modules.php"
click node_console "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php"
click node_updatemgr "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php"
click node_sysupdates "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/SystemUpdates.php"
click node_feedclient "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/PicoFeed/Client.php"
click node_db "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/BMO/Database.class.php"
click node_media "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Media/Media.php"
click node_driver "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php"
click node_track "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Jasny/Audio/Track.php"
click node_mime "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/mm/Mime/Type.php"
click node_lesscache "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/less/Cache.php"
click node_less "https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/less/Less.php"
click node_installer "https://github.com/nethesis/freepbx-framework/blob/release/14.0/install.php"
click node_installlib "https://github.com/nethesis/freepbx-framework/blob/release/14.0/installlib/installer.class.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_webui,node_ajax,node_moduleadmin toneBlue
class node_console,node_updatemgr,node_sysupdates,node_feedclient toneAmber
class node_db,node_media,node_driver,node_track,node_mime,node_lesscache,node_less toneMint
class node_installer,node_installlib toneRose
class node_operator,node_asterisk toneIndigo
```

## Components

### Administration

- [Admin interface](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/index.php): `amp_conf/htdocs/admin/index.php`
- [Admin AJAX](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/ajax.php): `amp_conf/htdocs/admin/ajax.php`
- [Module administration](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/page.modules.php): `amp_conf/htdocs/admin/page.modules.php`

### Updates

- [Update console](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php): `amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php`
- [Update manager](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php): `amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php`
- [System updates](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/SystemUpdates.php): `amp_conf/htdocs/admin/libraries/Builtin/SystemUpdates.php`
- [Feed HTTP client](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/Builtin/PicoFeed/Client.php): `amp_conf/htdocs/admin/libraries/Builtin/PicoFeed/Client.php`

### Platform services

- [Database access](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/BMO/Database.class.php): `amp_conf/htdocs/admin/libraries/BMO/Database.class.php`
- [Media processing](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Media/Media.php): `amp_conf/htdocs/admin/libraries/media/Media/Media.php`
- [Media driver](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php): `amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php`
- [Audio track](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/Jasny/Audio/Track.php): `amp_conf/htdocs/admin/libraries/media/Jasny/Audio/Track.php`
- [MIME detection](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/media/mm/Mime/Type.php): `amp_conf/htdocs/admin/libraries/media/mm/Mime/Type.php`
- [LESS cache](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/less/Cache.php): `amp_conf/htdocs/admin/libraries/less/Cache.php`
- [LESS compiler](https://github.com/nethesis/freepbx-framework/blob/release/14.0/amp_conf/htdocs/admin/libraries/less/Less.php): `amp_conf/htdocs/admin/libraries/less/Less.php`

### Installation

- [Installer](https://github.com/nethesis/freepbx-framework/blob/release/14.0/install.php): `install.php`
- [Install services](https://github.com/nethesis/freepbx-framework/blob/release/14.0/installlib/installer.class.php): `installlib/installer.class.php`

### Other components

- **PBX administrator**
- **Asterisk PBX**

## Connections

- PBX administrator → Admin interface: uses
- Admin interface → Asterisk PBX: controls
- Update console → Update manager: creates (evidence: `amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php`)
- Update console → System updates: checks support (evidence: `amp_conf/htdocs/admin/libraries/Console/Updatemanager.class.php`)
- Update manager → System updates: checks capability (evidence: `amp_conf/htdocs/admin/libraries/Builtin/UpdateManager.php`)
- Media driver → Media processing: references (evidence: `amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php`)
- Media driver → Audio track: references (evidence: `amp_conf/htdocs/admin/libraries/media/Media/Driver/Driver.php`)
- LESS cache → LESS compiler: uses compiler (evidence: `amp_conf/htdocs/admin/libraries/less/Cache.php`)
- LESS cache → LESS compiler: uses version (evidence: `amp_conf/htdocs/admin/libraries/less/Cache.php`)
- Installer → Install services: loads (evidence: `install.php`)
- Install services → Update manager: schedules updates (evidence: `installlib/installer.class.php`)
