# cztomczak/phpdesktop architecture

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

- Interactive diagram: https://gitdiagram.com/cztomczak/phpdesktop
- Repository: https://github.com/cztomczak/phpdesktop

## Overview

PHP Desktop turns existing PHP web apps or CLI tools into desktop applications by embedding a browser, a web server, and PHP. The documented runtime serves app pages through CGI, which isolates PHP execution in short-lived processes. The README also identifies SQLite and support for Internet Explorer or Chromium-based browsers. No runtime source files are present in the supplied tree, so component paths and undocumented call relationships are omitted; edges below reflect README descriptions only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop runtime"]
  node_desktop_app["PHP Desktop app"]
  node_browser["Embedded browser"]
  node_chromium["Chromium engine"]
  node_internet_explorer["Internet Explorer"]
end

subgraph group_web["Embedded web stack"]
  node_web_server["Mongoose server"]
  node_php_cgi["PHP-CGI"]
end

subgraph group_app["Application content"]
  node_app_content["PHP app content"]
  node_sqlite[("SQLite")]
end

node_user(("Desktop user"))

node_user -->|"launches"| node_desktop_app
node_desktop_app -->|"embeds"| node_browser
node_desktop_app -->|"embeds"| node_web_server
node_desktop_app -->|"embeds"| node_php_cgi
node_browser -->|"requests pages"| node_web_server
node_web_server -->|"serves through CGI"| node_php_cgi
node_php_cgi -->|"executes scripts"| node_app_content
node_browser -.->|"may use"| node_chromium
node_browser -.->|"may use"| node_internet_explorer

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_desktop_app,node_browser,node_chromium,node_internet_explorer,node_user toneBlue
class node_web_server,node_php_cgi toneAmber
class node_app_content,node_sqlite toneMint
```

## Components

### Desktop runtime

- **PHP Desktop app**
- **Embedded browser**
- **Chromium engine**
- **Internet Explorer**

### Embedded web stack

- **Mongoose server**
- **PHP-CGI**

### Application content

- **PHP app content**
- **SQLite**

### Other components

- **Desktop user**

## Connections

- Desktop user → PHP Desktop app: launches (evidence: `README.md`)
- PHP Desktop app → Embedded browser: embeds (evidence: `README.md`)
- PHP Desktop app → Mongoose server: embeds (evidence: `README.md`)
- PHP Desktop app → PHP-CGI: embeds (evidence: `README.md`)
- Embedded browser → Mongoose server: requests pages (evidence: `README.md`)
- Mongoose server → PHP-CGI: serves through CGI (evidence: `README.md`)
- PHP-CGI → PHP app content: executes scripts (evidence: `README.md`)
- Embedded browser → Chromium engine: may use (evidence: `README.md`)
- Embedded browser → Internet Explorer: may use (evidence: `README.md`)
