# pitocoofc/ghostos architecture

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

- Interactive diagram: https://gitdiagram.com/pitocoofc/ghostos
- Repository: https://github.com/pitocoofc/ghostos

## Overview

WebOS is an experimental, mobile-oriented web operating-system environment running in an Android WebView through Capacitor. Its documented user journey is entering the system, opening applications, and using system utilities or games; major branches include file management, a simulated terminal, and an app-store concept. The tree also contains standalone games, notes, and SuperGrep. Source excerpts cover SuperGrep and selected game logic, but not the OS shell or most app pages, so those components are identified from the tree and README; their internal connections are not inferred.

Main entry points: [`www/SuperGrep/motor.js`](https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/motor.js) (SuperGrep scanner), [`www/index.html`](https://github.com/pitocoofc/ghostos/blob/main/www/index.html) (System entry), [`www/inicio.html`](https://github.com/pitocoofc/ghostos/blob/main/www/inicio.html) (Home workspace), [`www/os.html`](https://github.com/pitocoofc/ghostos/blob/main/www/os.html) (Windowing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["System shell"]
  node_entry["System entry<br/>[index.html]"]
  node_home["Home workspace<br/>[inicio.html]"]
  node_windowing["Windowing<br/>[os.html]"]
end

subgraph group_apps["System apps"]
  node_files["File manager<br/>[files.html]"]
  node_terminal["Terminal<br/>[terminal.html]"]
  node_browser["Browser<br/>[browser.html]"]
  node_gallery["Gallery<br/>[galeria.html]"]
  node_wifi["WiFi app<br/>[wifi.html]"]
  node_store["App store concept<br/>[extra.html]"]
end

subgraph group_games["Games"]
  node_gameshub["Games hub<br/>[jogos.html]"]
  node_game2048["2048 game<br/>[game_manager.js]"]
  node_hextris["Hextris game<br/>[main.js]"]
end

subgraph group_tools["Tools and utilities"]
  node_notes["Notes<br/>[script.js]"]
  node_emulator["Emulator<br/>[chip8.html]"]
end

subgraph group_security["Security analysis"]
  node_supergrep["SuperGrep scanner<br/>[motor.js]"]
  node_deobfuscator["Deobfuscator<br/>[deobfuscator.js]"]
  node_urlcheck["URL checker<br/>[url_shielder.js]"]
end

node_user(("User"))

node_user -->|"enters system"| node_entry
node_entry -.->|"presents workspace"| node_home
node_home -->|"opens apps"| node_windowing
node_supergrep -->|"checks obfuscation"| node_deobfuscator
node_supergrep -->|"checks URLs"| node_urlcheck

click node_entry "https://github.com/pitocoofc/ghostos/blob/main/www/index.html"
click node_home "https://github.com/pitocoofc/ghostos/blob/main/www/inicio.html"
click node_windowing "https://github.com/pitocoofc/ghostos/blob/main/www/os.html"
click node_files "https://github.com/pitocoofc/ghostos/blob/main/www/files.html"
click node_terminal "https://github.com/pitocoofc/ghostos/blob/main/www/terminal.html"
click node_browser "https://github.com/pitocoofc/ghostos/blob/main/www/browser.html"
click node_gallery "https://github.com/pitocoofc/ghostos/blob/main/www/galeria.html"
click node_wifi "https://github.com/pitocoofc/ghostos/blob/main/www/wifi.html"
click node_store "https://github.com/pitocoofc/ghostos/blob/main/www/extra.html"
click node_gameshub "https://github.com/pitocoofc/ghostos/blob/main/www/jogos.html"
click node_game2048 "https://github.com/pitocoofc/ghostos/blob/main/www/jogos/2048/js/game_manager.js"
click node_hextris "https://github.com/pitocoofc/ghostos/blob/main/www/jogos/hextris/js/main.js"
click node_notes "https://github.com/pitocoofc/ghostos/blob/main/www/notas/src/script.js"
click node_emulator "https://github.com/pitocoofc/ghostos/blob/main/www/Emulador/chip8.html"
click node_supergrep "https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/motor.js"
click node_deobfuscator "https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/deobfuscator.js"
click node_urlcheck "https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/url_shielder.js"

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_entry,node_home,node_windowing,node_user toneBlue
class node_files,node_terminal,node_browser,node_gallery,node_wifi,node_store toneAmber
class node_gameshub,node_game2048,node_hextris toneMint
class node_notes,node_emulator toneRose
class node_supergrep,node_deobfuscator,node_urlcheck toneIndigo
```

## Components

### System shell

- [System entry](https://github.com/pitocoofc/ghostos/blob/main/www/index.html): `www/index.html`
- [Home workspace](https://github.com/pitocoofc/ghostos/blob/main/www/inicio.html): `www/inicio.html`
- [Windowing](https://github.com/pitocoofc/ghostos/blob/main/www/os.html): `www/os.html`

### System apps

- [File manager](https://github.com/pitocoofc/ghostos/blob/main/www/files.html): `www/files.html`
- [Terminal](https://github.com/pitocoofc/ghostos/blob/main/www/terminal.html): `www/terminal.html`
- [Browser](https://github.com/pitocoofc/ghostos/blob/main/www/browser.html): `www/browser.html`
- [Gallery](https://github.com/pitocoofc/ghostos/blob/main/www/galeria.html): `www/galeria.html`
- [WiFi app](https://github.com/pitocoofc/ghostos/blob/main/www/wifi.html): `www/wifi.html`
- [App store concept](https://github.com/pitocoofc/ghostos/blob/main/www/extra.html): `www/extra.html`

### Games

- [Games hub](https://github.com/pitocoofc/ghostos/blob/main/www/jogos.html): `www/jogos.html`
- [2048 game](https://github.com/pitocoofc/ghostos/blob/main/www/jogos/2048/js/game_manager.js): `www/jogos/2048/js/game_manager.js`
- [Hextris game](https://github.com/pitocoofc/ghostos/blob/main/www/jogos/hextris/js/main.js): `www/jogos/hextris/js/main.js`

### Tools and utilities

- [Notes](https://github.com/pitocoofc/ghostos/blob/main/www/notas/src/script.js): `www/notas/src/script.js`
- [Emulator](https://github.com/pitocoofc/ghostos/blob/main/www/Emulador/chip8.html): `www/Emulador/chip8.html`

### Security analysis

- [SuperGrep scanner](https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/motor.js): `www/SuperGrep/motor.js`
- [Deobfuscator](https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/deobfuscator.js): `www/SuperGrep/deobfuscator.js`
- [URL checker](https://github.com/pitocoofc/ghostos/blob/main/www/SuperGrep/url_shielder.js): `www/SuperGrep/url_shielder.js`

### Other components

- **User**

## Connections

- User → System entry: enters system (evidence: `readme.md`)
- System entry → Home workspace: presents workspace
- Home workspace → Windowing: opens apps (evidence: `readme.md`)
- SuperGrep scanner → Deobfuscator: checks obfuscation (evidence: `www/SuperGrep/motor.js`)
- SuperGrep scanner → URL checker: checks URLs (evidence: `www/SuperGrep/motor.js`)
