# pterodactyl/panel architecture

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

- Interactive diagram: https://gitdiagram.com/pterodactyl/panel
- Repository: https://github.com/pterodactyl/panel

## Overview

Pterodactyl Panel is a PHP game-server management application: users and administrators manage accounts, server configuration, and runtime controls, while game servers run in isolated Docker containers. The visible request path begins at the PHP entry point and Laravel routing; client API routes dispatch to account and server-control controllers. Server, node, egg, allocation, backup, database, schedule, and user models provide the domain state, with a repository base as an internal persistence layer. The README establishes the product capabilities; several runtime integrations and route groups are not sampled, so those links are omitted or marked unverified.

Main entry points: [`app/Models/Server.php`](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Server.php) (Server state), [`app/Models/Model.php`](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Model.php) (Validated model base), [`app/Models/Database.php`](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Database.php) (Server databases), [`routes/api-client.php`](https://github.com/pterodactyl/panel/blob/1.0-develop/routes/api-client.php) (Client API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_php["PHP entry point<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>[app.php]"]
  node_routing["Route configuration"]
end

subgraph group_api["Client API"]
  node_clientroutes["Client API routes<br/>[api-client.php]"]
  node_account["Account API"]
  node_servercontrol["Server control API"]
  node_admin["Admin server management"]
end

subgraph group_domain["Server domain"]
  node_server[("Server state<br/>[Server.php]")]
  node_user[("User accounts<br/>[User.php]")]
  node_node[("Compute nodes<br/>[Node.php]")]
  node_egg[("Egg configurations<br/>[Egg.php]")]
  node_allocation[("Network allocations<br/>[Allocation.php]")]
  node_backup[("Server backups<br/>[Backup.php]")]
  node_database[("Server databases<br/>[Database.php]")]
  node_schedule[("Server schedules<br/>[Schedule.php]")]
  node_subuser[("Server permissions<br/>[Subuser.php]")]
  node_permission[("Permission definitions<br/>[Permission.php]")]
end

subgraph group_persistence["Persistence and activity"]
  node_modelbase["Validated model base<br/>[Model.php]"]
  node_repository["Repository base<br/>[Repository.php]"]
  node_identifiable["Model identity contract<br/>[Identifiable.php]"]
  node_activity["Activity logging facade<br/>[Activity.php]"]
end

node_visitor(("Panel user"))
node_gamehost{{"Wings game-server agent"}}

node_visitor -->|"requests panel"| node_php
node_php -->|"loads"| node_bootstrap
node_clientroutes -->|"dispatches account"| node_account
node_clientroutes -->|"dispatches power"| node_servercontrol
node_server -->|"extends"| node_modelbase
node_user -->|"extends"| node_modelbase
node_egg -->|"extends"| node_modelbase
node_backup -->|"extends"| node_modelbase
node_database -->|"extends"| node_modelbase
node_allocation -->|"extends"| node_modelbase
node_server -->|"relates to"| node_database
node_server -->|"relates to"| node_node
node_server -->|"relates to"| node_egg
node_server -->|"relates to"| node_allocation
node_server -->|"relates to"| node_backup
node_server -->|"relates to"| node_schedule
node_server -->|"relates to"| node_subuser
node_database -->|"belongs to"| node_server
node_repository -->|"uses model"| node_modelbase
node_server -->|"implements"| node_identifiable
node_user -->|"implements"| node_identifiable
node_servercontrol -.->|"controls runtime"| node_gamehost
node_admin -.->|"manages runtime"| node_gamehost

click node_php "https://github.com/pterodactyl/panel/blob/1.0-develop/public/index.php"
click node_bootstrap "https://github.com/pterodactyl/panel/blob/1.0-develop/bootstrap/app.php"
click node_routing "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Providers/RouteServiceProvider.php"
click node_clientroutes "https://github.com/pterodactyl/panel/blob/1.0-develop/routes/api-client.php"
click node_account "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Api/Client/AccountController.php"
click node_servercontrol "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Api/Client/Servers/PowerController.php"
click node_admin "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Admin/ServersController.php"
click node_server "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Server.php"
click node_user "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/User.php"
click node_node "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Node.php"
click node_egg "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Egg.php"
click node_allocation "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Allocation.php"
click node_backup "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Backup.php"
click node_database "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Database.php"
click node_schedule "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Schedule.php"
click node_subuser "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Subuser.php"
click node_permission "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Permission.php"
click node_modelbase "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Model.php"
click node_repository "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Repositories/Repository.php"
click node_identifiable "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Contracts/Models/Identifiable.php"
click node_activity "https://github.com/pterodactyl/panel/blob/1.0-develop/app/Facades/Activity.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_php,node_bootstrap,node_routing,node_visitor toneBlue
class node_clientroutes,node_account,node_servercontrol,node_admin toneAmber
class node_server,node_user,node_node,node_egg,node_allocation,node_backup,node_database,node_schedule,node_subuser,node_permission,node_gamehost toneMint
class node_modelbase,node_repository,node_identifiable,node_activity toneRose
```

## Components

### Application entry

- [PHP entry point](https://github.com/pterodactyl/panel/blob/1.0-develop/public/index.php): `public/index.php`
- [Application bootstrap](https://github.com/pterodactyl/panel/blob/1.0-develop/bootstrap/app.php): `bootstrap/app.php`
- [Route configuration](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`

### Client API

- [Client API routes](https://github.com/pterodactyl/panel/blob/1.0-develop/routes/api-client.php): `routes/api-client.php`
- [Account API](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Api/Client/AccountController.php): `app/Http/Controllers/Api/Client/AccountController.php`
- [Server control API](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Api/Client/Servers/PowerController.php): `app/Http/Controllers/Api/Client/Servers/PowerController.php`
- [Admin server management](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Admin/ServersController.php): `app/Http/Controllers/Admin/ServersController.php`

### Server domain

- [Server state](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Server.php): `app/Models/Server.php`
- [User accounts](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/User.php): `app/Models/User.php`
- [Compute nodes](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Node.php): `app/Models/Node.php`
- [Egg configurations](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Egg.php): `app/Models/Egg.php`
- [Network allocations](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Allocation.php): `app/Models/Allocation.php`
- [Server backups](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Backup.php): `app/Models/Backup.php`
- [Server databases](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Database.php): `app/Models/Database.php`
- [Server schedules](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Schedule.php): `app/Models/Schedule.php`
- [Server permissions](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Subuser.php): `app/Models/Subuser.php`
- [Permission definitions](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Permission.php): `app/Models/Permission.php`

### Persistence and activity

- [Validated model base](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Model.php): `app/Models/Model.php`
- [Repository base](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Repositories/Repository.php): `app/Repositories/Repository.php`
- [Model identity contract](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Contracts/Models/Identifiable.php): `app/Contracts/Models/Identifiable.php`
- [Activity logging facade](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Facades/Activity.php): `app/Facades/Activity.php`

### Other components

- **Panel user**
- **Wings game-server agent**

## Connections

- Panel user → PHP entry point: requests panel
- PHP entry point → Application bootstrap: loads (evidence: `public/index.php`)
- Client API routes → Account API: dispatches account (evidence: `routes/api-client.php`)
- Client API routes → Server control API: dispatches power (evidence: `routes/api-client.php`)
- Server state → Validated model base: extends (evidence: `app/Models/Server.php`)
- User accounts → Validated model base: extends (evidence: `app/Models/User.php`)
- Egg configurations → Validated model base: extends (evidence: `app/Models/Egg.php`)
- Server backups → Validated model base: extends (evidence: `app/Models/Backup.php`)
- Server databases → Validated model base: extends (evidence: `app/Models/Database.php`)
- Network allocations → Validated model base: extends (evidence: `app/Models/Allocation.php`)
- Server state → Server databases: relates to (evidence: `app/Models/Server.php`)
- Server state → Compute nodes: relates to (evidence: `app/Models/Server.php`)
- Server state → Egg configurations: relates to (evidence: `app/Models/Server.php`)
- Server state → Network allocations: relates to (evidence: `app/Models/Server.php`)
- Server state → Server backups: relates to (evidence: `app/Models/Server.php`)
- Server state → Server schedules: relates to (evidence: `app/Models/Server.php`)
- Server state → Server permissions: relates to (evidence: `app/Models/Server.php`)
- Server databases → Server state: belongs to (evidence: `app/Models/Database.php`)
- Repository base → Validated model base: uses model (evidence: `app/Repositories/Repository.php`)
- Server state → Model identity contract: implements (evidence: `app/Models/Server.php`)
- User accounts → Model identity contract: implements (evidence: `app/Models/User.php`)
- Server control API → Wings game-server agent: controls runtime
- Admin server management → Wings game-server agent: manages runtime
