# pmkaulani/prank architecture

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

- Interactive diagram: https://gitdiagram.com/pmkaulani/prank
- Repository: https://github.com/pmkaulani/prank

## Overview

Chaos Prank is a consensual theatrical prank with two user-facing routes: a standalone browser experience and a Python desktop experience. In the browser, device detection selects a mobile terminal roast or a desktop command-copy screen; running the command starts the Python sequence, which stages fake diagnostics and meme loading before showing animated popups and cleaning up. The README documents launcher bootstrapping, emergency exit, and restoration. Some implementation excerpts are partial, so links for unsampled browser and launcher behavior follow the README rather than inspected source.

Main entry points: [`chaos_prank.py`](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py) (Python Main Flow), [`index.html`](https://github.com/pmkaulani/prank/blob/main/index.html) (Standalone Web Page), [`launch.bat`](https://github.com/pmkaulani/prank/blob/main/launch.bat) (Windows Bootstrap), [`launch.sh`](https://github.com/pmkaulani/prank/blob/main/launch.sh) (Bash Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Experience"]
  node_webpage["Standalone Web Page<br/>[index.html]"]
  node_mobile["Mobile Terminal Roast<br/>[index.html]"]
  node_desktop["Desktop Command Card<br/>[index.html]"]
  node_cmd["Copied Run Command"]
end

subgraph group_launch["Launch Paths"]
  node_winboot["Windows Bootstrap<br/>[launch.bat]"]
  node_unixboot["Bash Bootstrap<br/>[launch.sh]"]
  node_winlocal["CMD Local Launcher<br/>[run_prank.bat]"]
  node_pslocal["PowerShell Launcher<br/>[run_prank.ps1]"]
end

subgraph group_prank["Python Prank"]
  node_main["Python Main Flow<br/>[chaos_prank.py]"]
  node_boot["Terminal Diagnostics<br/>[chaos_prank.py]"]
  node_download["Meme Loading Phase<br/>[chaos_prank.py]"]
  node_cascade["Popup Cascade<br/>[chaos_prank.py]"]
  node_exit["Emergency Exit Listener<br/>[chaos_prank.py]"]
  node_cleanup["Terminal Restoration<br/>[chaos_prank.py]"]
end

subgraph group_assets["Meme Assets"]
  node_memeassets["Curated Meme Images"]
end

node_user(("Visitor / User"))

node_user -->|"opens"| node_webpage
node_webpage -->|"selects mobile"| node_mobile
node_webpage -->|"selects desktop"| node_desktop
node_desktop -->|"copies command"| node_cmd
node_user -->|"runs command"| node_winboot
node_user -->|"runs command"| node_unixboot
node_user -->|"starts locally"| node_winlocal
node_user -->|"starts locally"| node_pslocal
node_winboot -->|"bootstraps"| node_main
node_unixboot -->|"bootstraps"| node_main
node_winlocal -->|"launches"| node_main
node_pslocal -->|"launches"| node_main
node_main -->|"runs"| node_boot
node_main -->|"runs"| node_download
node_download -->|"loads images"| node_memeassets
node_main -->|"starts display"| node_cascade
node_main -->|"starts listener"| node_exit
node_exit -->|"triggers shutdown"| node_cleanup
node_main -->|"restores terminal"| node_cleanup

click node_webpage "https://github.com/pmkaulani/prank/blob/main/index.html"
click node_mobile "https://github.com/pmkaulani/prank/blob/main/index.html"
click node_desktop "https://github.com/pmkaulani/prank/blob/main/index.html"
click node_winboot "https://github.com/pmkaulani/prank/blob/main/launch.bat"
click node_unixboot "https://github.com/pmkaulani/prank/blob/main/launch.sh"
click node_winlocal "https://github.com/pmkaulani/prank/blob/main/run_prank.bat"
click node_pslocal "https://github.com/pmkaulani/prank/blob/main/run_prank.ps1"
click node_main "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"
click node_boot "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"
click node_download "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"
click node_memeassets "https://github.com/pmkaulani/prank/tree/main/memes"
click node_cascade "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"
click node_exit "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"
click node_cleanup "https://github.com/pmkaulani/prank/blob/main/chaos_prank.py"

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_webpage,node_mobile,node_desktop,node_cmd,node_user toneBlue
class node_winboot,node_unixboot,node_winlocal,node_pslocal toneAmber
class node_main,node_boot,node_download,node_cascade,node_exit,node_cleanup toneMint
class node_memeassets toneRose
```

## Components

### Web Experience

- [Standalone Web Page](https://github.com/pmkaulani/prank/blob/main/index.html): `index.html`
- [Mobile Terminal Roast](https://github.com/pmkaulani/prank/blob/main/index.html): `index.html`
- [Desktop Command Card](https://github.com/pmkaulani/prank/blob/main/index.html): `index.html`
- **Copied Run Command**

### Launch Paths

- [Windows Bootstrap](https://github.com/pmkaulani/prank/blob/main/launch.bat): `launch.bat`
- [Bash Bootstrap](https://github.com/pmkaulani/prank/blob/main/launch.sh): `launch.sh`
- [CMD Local Launcher](https://github.com/pmkaulani/prank/blob/main/run_prank.bat): `run_prank.bat`
- [PowerShell Launcher](https://github.com/pmkaulani/prank/blob/main/run_prank.ps1): `run_prank.ps1`

### Python Prank

- [Python Main Flow](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`
- [Terminal Diagnostics](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`
- [Meme Loading Phase](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`
- [Popup Cascade](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`
- [Emergency Exit Listener](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`
- [Terminal Restoration](https://github.com/pmkaulani/prank/blob/main/chaos_prank.py): `chaos_prank.py`

### Meme Assets

- [Curated Meme Images](https://github.com/pmkaulani/prank/tree/main/memes): `memes`

### Other components

- **Visitor / User**

## Connections

- Visitor / User → Standalone Web Page: opens
- Standalone Web Page → Mobile Terminal Roast: selects mobile
- Standalone Web Page → Desktop Command Card: selects desktop
- Desktop Command Card → Copied Run Command: copies command
- Visitor / User → Windows Bootstrap: runs command
- Visitor / User → Bash Bootstrap: runs command
- Visitor / User → CMD Local Launcher: starts locally
- Visitor / User → PowerShell Launcher: starts locally
- Windows Bootstrap → Python Main Flow: bootstraps
- Bash Bootstrap → Python Main Flow: bootstraps
- CMD Local Launcher → Python Main Flow: launches
- PowerShell Launcher → Python Main Flow: launches
- Python Main Flow → Terminal Diagnostics: runs
- Python Main Flow → Meme Loading Phase: runs
- Meme Loading Phase → Curated Meme Images: loads images
- Python Main Flow → Popup Cascade: starts display
- Python Main Flow → Emergency Exit Listener: starts listener
- Emergency Exit Listener → Terminal Restoration: triggers shutdown
- Python Main Flow → Terminal Restoration: restores terminal
