# celorissi/omnishell architecture

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

- Interactive diagram: https://gitdiagram.com/celorissi/omnishell
- Repository: https://github.com/celorissi/omnishell

## Overview

OmniShell is a Flask/Socket.IO web panel for user-managed SSH sessions and infrastructure runbooks. The principal workflow is browser login, then opening an interactive SSH terminal; the server creates an SSH bridge to the remote host and returns session events to the browser. The README also documents user management and a dark-themed interface. The sampled source confirms authentication and administrative operations, runbook routes, and Paramiko-based connections, but does not show all route wiring or storage implementations, so uncertain relationships are omitted.

Main entry points: [`ssh.py`](https://github.com/celorissi/omnishell/blob/main/ssh.py) (Web application), [`users`](https://github.com/celorissi/omnishell/tree/main/users) (User data), [`templates`](https://github.com/celorissi/omnishell/tree/main/templates) (Login and panel pages), [`static`](https://github.com/celorissi/omnishell/tree/main/static) (Theme assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_flask_app["Web application<br/>[ssh.py]"]
  node_page_templates["Login and panel pages"]
  node_static_assets["Theme assets"]
end

subgraph group_identity["Identity and administration"]
  node_auth["Authentication<br/>[ssh.py]"]
  node_user_admin["User administration<br/>[ssh.py]"]
  node_user_data[("User data")]
end

subgraph group_operations["Infrastructure operations"]
  node_runbooks["Runbook management<br/>[ssh.py]"]
  node_runbook_data["Runbook files"]
  node_socket_sessions["Socket session handling<br/>[ssh.py]"]
  node_ssh_bridge["SSH bridge<br/>[ssh.py]"]
end

node_browser(("User browser"))
node_remote_host{{"SSH server or device"}}

node_browser -->|"uses panel"| node_flask_app
node_flask_app -->|"renders pages"| node_page_templates
node_flask_app -.->|"serves interface"| node_static_assets
node_browser -->|"authenticates"| node_auth
node_auth -->|"loads and saves"| node_user_data
node_browser -->|"manages users"| node_user_admin
node_user_admin -->|"updates records"| node_user_data
node_browser -->|"manages runbooks"| node_runbooks
node_runbooks -.->|"reads and writes"| node_runbook_data
node_browser -->|"opens terminal"| node_socket_sessions
node_socket_sessions -->|"creates bridge"| node_ssh_bridge
node_ssh_bridge -->|"opens SSH shell"| node_remote_host
node_socket_sessions -->|"emits session events"| node_browser

click node_flask_app "https://github.com/celorissi/omnishell/blob/main/ssh.py"
click node_page_templates "https://github.com/celorissi/omnishell/tree/main/templates"
click node_static_assets "https://github.com/celorissi/omnishell/tree/main/static"
click node_auth "https://github.com/celorissi/omnishell/blob/main/ssh.py"
click node_user_admin "https://github.com/celorissi/omnishell/blob/main/ssh.py"
click node_user_data "https://github.com/celorissi/omnishell/tree/main/users"
click node_runbooks "https://github.com/celorissi/omnishell/blob/main/ssh.py"
click node_runbook_data "https://github.com/celorissi/omnishell/tree/main/runbooks_data"
click node_socket_sessions "https://github.com/celorissi/omnishell/blob/main/ssh.py"
click node_ssh_bridge "https://github.com/celorissi/omnishell/blob/main/ssh.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_flask_app,node_page_templates,node_static_assets,node_browser toneBlue
class node_auth,node_user_admin,node_user_data toneAmber
class node_runbooks,node_runbook_data,node_socket_sessions,node_ssh_bridge,node_remote_host toneMint
```

## Components

### Web interface

- [Web application](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`
- [Login and panel pages](https://github.com/celorissi/omnishell/tree/main/templates): `templates`
- [Theme assets](https://github.com/celorissi/omnishell/tree/main/static): `static`

### Identity and administration

- [Authentication](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`
- [User administration](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`
- [User data](https://github.com/celorissi/omnishell/tree/main/users): `users`

### Infrastructure operations

- [Runbook management](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`
- [Runbook files](https://github.com/celorissi/omnishell/tree/main/runbooks_data): `runbooks_data`
- [Socket session handling](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`
- [SSH bridge](https://github.com/celorissi/omnishell/blob/main/ssh.py): `ssh.py`

### Other components

- **User browser**
- **SSH server or device**

## Connections

- User browser → Web application: uses panel (evidence: `README.md`)
- Web application → Login and panel pages: renders pages (evidence: `README.md`)
- Web application → Theme assets: serves interface
- User browser → Authentication: authenticates (evidence: `ssh.py`)
- Authentication → User data: loads and saves (evidence: `ssh.py`)
- User browser → User administration: manages users (evidence: `ssh.py`)
- User administration → User data: updates records (evidence: `ssh.py`)
- User browser → Runbook management: manages runbooks (evidence: `ssh.py`)
- Runbook management → Runbook files: reads and writes
- User browser → Socket session handling: opens terminal (evidence: `README.md`)
- Socket session handling → SSH bridge: creates bridge (evidence: `ssh.py`)
- SSH bridge → SSH server or device: opens SSH shell (evidence: `ssh.py`)
- Socket session handling → User browser: emits session events (evidence: `ssh.py`)
