# lunaticthrasher/phpup architecture

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

- Interactive diagram: https://gitdiagram.com/lunaticthrasher/phpup
- Repository: https://github.com/lunaticthrasher/phpup

## Overview

phpup is a cross-platform command-line tool for installing and managing local PHP development stacks. The documented workflow is: a developer launches the platform script, uses its dashboard to choose an operation, and phpup installs, updates, switches, or manages services for the stack. The README documents these capabilities and version sources, but no script excerpts were provided, so internal call ownership and implementation details cannot be verified; edges below represent documented relationships only.

Main entry points: [`phpup.sh`](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh) (Interactive dashboard), [`phpup.ps1`](https://github.com/lunaticthrasher/phpup/blob/main/phpup.ps1) (Windows launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and dashboard"]
  node_windows_script["Windows launcher<br/>[phpup.ps1]"]
  node_unix_script["macOS/Linux launcher<br/>[phpup.sh]"]
  node_dashboard["Interactive dashboard<br/>[phpup.sh]"]
end

subgraph group_stack["Stack management"]
  node_install["Install stack<br/>[phpup.sh]"]
  node_update["Update components<br/>[phpup.sh]"]
  node_switch["Switch PHP version<br/>[phpup.sh]"]
  node_services["Manage services<br/>[phpup.sh]"]
  node_safe_delete["Safe delete/restore<br/>[phpup.sh]"]
end

subgraph group_resolution["Version resolution"]
  node_resolver["Stable-version resolver<br/>[phpup.sh]"]
  node_component_sources["Component sources"]
end

node_developer(("Developer"))

node_developer -->|"launches on Windows"| node_windows_script
node_developer -->|"launches on macOS/Linux"| node_unix_script
node_windows_script -->|"opens dashboard"| node_dashboard
node_unix_script -->|"opens dashboard"| node_dashboard
node_dashboard -->|"starts install"| node_install
node_dashboard -->|"starts update"| node_update
node_dashboard -->|"selects version"| node_switch
node_dashboard -->|"controls services"| node_services
node_dashboard -->|"starts deletion"| node_safe_delete
node_install -->|"resolves versions"| node_resolver
node_update -->|"resolves versions"| node_resolver
node_resolver -->|"queries releases"| node_component_sources

click node_windows_script "https://github.com/lunaticthrasher/phpup/blob/main/phpup.ps1"
click node_unix_script "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_dashboard "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_install "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_update "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_switch "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_services "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_safe_delete "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"
click node_resolver "https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh"

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_windows_script,node_unix_script,node_dashboard toneBlue
class node_install,node_update,node_switch,node_services,node_safe_delete toneAmber
class node_resolver,node_component_sources toneMint
class node_developer toneIndigo
```

## Components

### Entry and dashboard

- [Windows launcher](https://github.com/lunaticthrasher/phpup/blob/main/phpup.ps1): `phpup.ps1`
- [macOS/Linux launcher](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- [Interactive dashboard](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`

### Stack management

- [Install stack](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- [Update components](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- [Switch PHP version](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- [Manage services](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- [Safe delete/restore](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`

### Version resolution

- [Stable-version resolver](https://github.com/lunaticthrasher/phpup/blob/main/phpup.sh): `phpup.sh`
- **Component sources**

### Other components

- **Developer**

## Connections

- Developer → Windows launcher: launches on Windows (evidence: `README.md`)
- Developer → macOS/Linux launcher: launches on macOS/Linux (evidence: `README.md`)
- Windows launcher → Interactive dashboard: opens dashboard (evidence: `README.md`)
- macOS/Linux launcher → Interactive dashboard: opens dashboard (evidence: `README.md`)
- Interactive dashboard → Install stack: starts install (evidence: `README.md`)
- Interactive dashboard → Update components: starts update (evidence: `README.md`)
- Interactive dashboard → Switch PHP version: selects version (evidence: `README.md`)
- Interactive dashboard → Manage services: controls services (evidence: `README.md`)
- Interactive dashboard → Safe delete/restore: starts deletion (evidence: `README.md`)
- Install stack → Stable-version resolver: resolves versions (evidence: `README.md`)
- Update components → Stable-version resolver: resolves versions (evidence: `README.md`)
- Stable-version resolver → Component sources: queries releases (evidence: `README.md`)
