# eshwar-gajula/echa-shell architecture

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

- Interactive diagram: https://gitdiagram.com/eshwar-gajula/echa-shell
- Repository: https://github.com/eshwar-gajula/echa-shell

## Overview

ECHA is a Windows desktop shell whose main workflow is to open a React HUD, collect live system and hardware data, and let users operate workspaces, files, applications, terminal commands, and power controls through Tauri/Rust. The graph includes the documented scanner, ConPTY, hardware, and telemetry capabilities alongside sampled UI and backend layers. Some feature implementations were not sampled; those branches rely on README documentation, and no unverified internal call chains are asserted.

Main entry points: [`src/components/Workspaces/DashboardLayout.tsx`](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Workspaces/DashboardLayout.tsx) (Dashboard layout), [`src/components/Terminal/Terminal.tsx`](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Terminal/Terminal.tsx) (Terminal interface), [`src/components/Header.tsx`](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Header.tsx) (System header), [`src/utils/tauriCommands.ts`](https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/tauriCommands.ts) (Tauri command bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Desktop HUD"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_dashboard["Dashboard layout"]
  node_header["System header<br/>[Header.tsx]"]
  node_telemetry_view["Telemetry panel<br/>[LeftPanel.tsx]"]
  node_controls["Hardware controls<br/>[SystemControls.tsx]"]
  node_right_panel["Navigation panel<br/>[RightPanel.tsx]"]
end

subgraph group_workspace["Workspace &amp; Terminal"]
  node_workspace_container["Workspace view"]
  node_workspace_switcher["Workspace switcher"]
  node_workspace_state["Workspace profiles"]
  node_workspace_hook["Workspace access hook<br/>[useWorkspaces.ts]"]
  node_terminal["Terminal interface<br/>[Terminal.tsx]"]
  node_cli["CLI command parser<br/>[echaCli.ts]"]
  node_audio["Audio feedback<br/>[audioSynth.ts]"]
end

subgraph group_backend["Tauri Services"]
  node_telemetry_hook["Telemetry subscription<br/>[useTelemetry.ts]"]
  node_telemetry_service["Telemetry service<br/>[telemetry.rs]"]
  node_system_commands["Hardware diagnostics<br/>[system.rs]"]
  node_command_bridge["Tauri command bridge<br/>[tauriCommands.ts]"]
  node_system_bridge["Hardware command bridge"]
  node_power["Power &amp; shell controls<br/>[power.rs]"]
  node_pty["ConPTY engine<br/>[pty.rs]"]
  node_hooks["Global keyboard hook<br/>[hooks.rs]"]
  node_system_types["Hardware data types<br/>[system.ts]"]
  node_telemetry_types["Telemetry data types<br/>[telemetry.ts]"]
end

subgraph group_discovery["File &amp; App Discovery"]
  node_scanner_ui["App library<br/>[AppLibrary.tsx]"]
  node_files_ui["File inspector<br/>[FilesTab.tsx]"]
  node_scanner["App scanner<br/>[registry.rs]"]
  node_categorizer["App categorization<br/>[categorize.rs]"]
  node_scanner_commands["Scanner commands<br/>[scanner.rs]"]
  node_fs_commands["File navigation<br/>[fs.rs]"]
end

node_user(("Desktop user"))
node_windows["Windows system"]

node_user -->|"opens"| node_app
node_app -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_header
node_dashboard -->|"renders"| node_telemetry_view
node_dashboard -->|"renders"| node_right_panel
node_dashboard -->|"renders"| node_workspace_container
node_dashboard -->|"reads"| node_telemetry_hook
node_header -->|"requests"| node_system_bridge
node_header -->|"requests"| node_command_bridge
node_workspace_container -->|"renders"| node_terminal
node_workspace_container -->|"uses"| node_workspace_hook
node_workspace_hook -->|"reads"| node_workspace_state
node_workspace_switcher -.->|"switches"| node_workspace_state
node_workspace_state -->|"plays cues"| node_audio
node_terminal -->|"switches"| node_workspace_hook
node_terminal -->|"dispatches"| node_cli
node_terminal -->|"launches apps"| node_command_bridge
node_terminal -->|"plays cues"| node_audio
node_telemetry_service -.->|"streams data"| node_telemetry_hook
node_telemetry_view -->|"displays"| node_telemetry_types
node_system_bridge -->|"invokes"| node_system_commands
node_command_bridge -->|"invokes"| node_power
node_command_bridge -->|"invokes"| node_pty
node_system_commands -.->|"controls hardware"| node_windows
node_controls -->|"requests"| node_system_bridge
node_system_types -->|"types data"| node_header
node_right_panel -->|"renders"| node_scanner_ui
node_right_panel -->|"renders"| node_files_ui
node_scanner_ui -->|"requests scans"| node_scanner_commands
node_files_ui -.->|"browses files"| node_fs_commands
node_scanner_commands -.->|"dispatches"| node_scanner
node_scanner -->|"categorizes"| node_categorizer

click node_app "https://github.com/eshwar-gajula/echa-shell/blob/main/src/App.tsx"
click node_dashboard "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Workspaces/DashboardLayout.tsx"
click node_header "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Header.tsx"
click node_telemetry_view "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/LeftPanel.tsx"
click node_controls "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/SystemControls.tsx"
click node_right_panel "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/RightPanel.tsx"
click node_workspace_container "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Workspaces/WorkspaceContainer.tsx"
click node_workspace_switcher "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/WorkspaceSwitcher.tsx"
click node_workspace_state "https://github.com/eshwar-gajula/echa-shell/blob/main/src/context/WorkspaceContext.tsx"
click node_workspace_hook "https://github.com/eshwar-gajula/echa-shell/blob/main/src/hooks/useWorkspaces.ts"
click node_terminal "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Terminal/Terminal.tsx"
click node_cli "https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/echaCli.ts"
click node_audio "https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/audioSynth.ts"
click node_telemetry_hook "https://github.com/eshwar-gajula/echa-shell/blob/main/src/hooks/useTelemetry.ts"
click node_telemetry_service "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/telemetry.rs"
click node_system_commands "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/system.rs"
click node_command_bridge "https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/tauriCommands.ts"
click node_system_bridge "https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/tauriSystemCommands.ts"
click node_power "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/power.rs"
click node_pty "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/pty.rs"
click node_hooks "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/hooks.rs"
click node_scanner_ui "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Scanner/AppLibrary.tsx"
click node_files_ui "https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/FilesTab.tsx"
click node_scanner "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/scanner/registry.rs"
click node_categorizer "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/scanner/categorize.rs"
click node_scanner_commands "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/scanner.rs"
click node_fs_commands "https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/fs.rs"
click node_system_types "https://github.com/eshwar-gajula/echa-shell/blob/main/src/types/system.ts"
click node_telemetry_types "https://github.com/eshwar-gajula/echa-shell/blob/main/src/types/telemetry.ts"

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_app,node_dashboard,node_header,node_telemetry_view,node_controls,node_right_panel,node_user toneBlue
class node_workspace_container,node_workspace_switcher,node_workspace_state,node_workspace_hook,node_terminal,node_cli,node_audio toneAmber
class node_telemetry_hook,node_telemetry_service,node_system_commands,node_command_bridge,node_system_bridge,node_power,node_pty,node_hooks,node_system_types,node_telemetry_types toneMint
class node_scanner_ui,node_files_ui,node_scanner,node_categorizer,node_scanner_commands,node_fs_commands toneRose
class node_windows toneIndigo
```

## Components

### Desktop HUD

- [App bootstrap](https://github.com/eshwar-gajula/echa-shell/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard layout](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Workspaces/DashboardLayout.tsx): `src/components/Workspaces/DashboardLayout.tsx`
- [System header](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Telemetry panel](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/LeftPanel.tsx): `src/components/HUD/LeftPanel.tsx`
- [Hardware controls](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/SystemControls.tsx): `src/components/HUD/SystemControls.tsx`
- [Navigation panel](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/RightPanel.tsx): `src/components/HUD/RightPanel.tsx`

### Workspace & Terminal

- [Workspace view](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Workspaces/WorkspaceContainer.tsx): `src/components/Workspaces/WorkspaceContainer.tsx`
- [Workspace switcher](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/WorkspaceSwitcher.tsx): `src/components/HUD/WorkspaceSwitcher.tsx`
- [Workspace profiles](https://github.com/eshwar-gajula/echa-shell/blob/main/src/context/WorkspaceContext.tsx): `src/context/WorkspaceContext.tsx`
- [Workspace access hook](https://github.com/eshwar-gajula/echa-shell/blob/main/src/hooks/useWorkspaces.ts): `src/hooks/useWorkspaces.ts`
- [Terminal interface](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Terminal/Terminal.tsx): `src/components/Terminal/Terminal.tsx`
- [CLI command parser](https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/echaCli.ts): `src/utils/echaCli.ts`
- [Audio feedback](https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/audioSynth.ts): `src/utils/audioSynth.ts`

### Tauri Services

- [Telemetry subscription](https://github.com/eshwar-gajula/echa-shell/blob/main/src/hooks/useTelemetry.ts): `src/hooks/useTelemetry.ts`
- [Telemetry service](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/telemetry.rs): `src-tauri/src/telemetry.rs`
- [Hardware diagnostics](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/system.rs): `src-tauri/src/commands/system.rs`
- [Tauri command bridge](https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/tauriCommands.ts): `src/utils/tauriCommands.ts`
- [Hardware command bridge](https://github.com/eshwar-gajula/echa-shell/blob/main/src/utils/tauriSystemCommands.ts): `src/utils/tauriSystemCommands.ts`
- [Power & shell controls](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/power.rs): `src-tauri/src/commands/power.rs`
- [ConPTY engine](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/pty.rs): `src-tauri/src/commands/pty.rs`
- [Global keyboard hook](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/hooks.rs): `src-tauri/src/hooks.rs`
- [Hardware data types](https://github.com/eshwar-gajula/echa-shell/blob/main/src/types/system.ts): `src/types/system.ts`
- [Telemetry data types](https://github.com/eshwar-gajula/echa-shell/blob/main/src/types/telemetry.ts): `src/types/telemetry.ts`

### File & App Discovery

- [App library](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/Scanner/AppLibrary.tsx): `src/components/Scanner/AppLibrary.tsx`
- [File inspector](https://github.com/eshwar-gajula/echa-shell/blob/main/src/components/HUD/FilesTab.tsx): `src/components/HUD/FilesTab.tsx`
- [App scanner](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/scanner/registry.rs): `src-tauri/src/scanner/registry.rs`
- [App categorization](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/scanner/categorize.rs): `src-tauri/src/scanner/categorize.rs`
- [Scanner commands](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/scanner.rs): `src-tauri/src/commands/scanner.rs`
- [File navigation](https://github.com/eshwar-gajula/echa-shell/blob/main/src-tauri/src/commands/fs.rs): `src-tauri/src/commands/fs.rs`

### Other components

- **Desktop user**
- **Windows system**

## Connections

- Desktop user → App bootstrap: opens (evidence: `README.md`)
- App bootstrap → Dashboard layout: renders (evidence: `src/App.tsx`)
- Dashboard layout → System header: renders (evidence: `src/components/Workspaces/DashboardLayout.tsx`)
- Dashboard layout → Telemetry panel: renders (evidence: `src/components/Workspaces/DashboardLayout.tsx`)
- Dashboard layout → Navigation panel: renders (evidence: `src/components/Workspaces/DashboardLayout.tsx`)
- Dashboard layout → Workspace view: renders (evidence: `src/components/Workspaces/DashboardLayout.tsx`)
- Dashboard layout → Telemetry subscription: reads (evidence: `src/components/Workspaces/DashboardLayout.tsx`)
- System header → Hardware command bridge: requests (evidence: `src/components/Header.tsx`)
- System header → Tauri command bridge: requests (evidence: `src/components/Header.tsx`)
- Workspace view → Terminal interface: renders (evidence: `src/components/Workspaces/WorkspaceContainer.tsx`)
- Workspace view → Workspace access hook: uses (evidence: `src/components/Workspaces/WorkspaceContainer.tsx`)
- Workspace access hook → Workspace profiles: reads (evidence: `src/hooks/useWorkspaces.ts`)
- Workspace switcher → Workspace profiles: switches
- Workspace profiles → Audio feedback: plays cues (evidence: `src/context/WorkspaceContext.tsx`)
- Terminal interface → Workspace access hook: switches (evidence: `src/components/Terminal/Terminal.tsx`)
- Terminal interface → CLI command parser: dispatches (evidence: `src/components/Terminal/Terminal.tsx`)
- Terminal interface → Tauri command bridge: launches apps (evidence: `src/components/Terminal/Terminal.tsx`)
- Terminal interface → Audio feedback: plays cues (evidence: `src/components/Terminal/Terminal.tsx`)
- Telemetry service → Telemetry subscription: streams data (evidence: `README.md`)
- Telemetry panel → Telemetry data types: displays (evidence: `src/components/HUD/LeftPanel.tsx`)
- Hardware command bridge → Hardware diagnostics: invokes
- Tauri command bridge → Power & shell controls: invokes
- Tauri command bridge → ConPTY engine: invokes
- Hardware diagnostics → Windows system: controls hardware (evidence: `README.md`)
- Hardware controls → Hardware command bridge: requests (evidence: `src/components/HUD/SystemControls.tsx`)
- Hardware data types → System header: types data (evidence: `src/components/Header.tsx`)
- Navigation panel → App library: renders (evidence: `src/components/HUD/RightPanel.tsx`)
- Navigation panel → File inspector: renders (evidence: `src/components/HUD/RightPanel.tsx`)
- App library → Scanner commands: requests scans
- File inspector → File navigation: browses files
- Scanner commands → App scanner: dispatches
- App scanner → App categorization: categorizes (evidence: `src-tauri/src/scanner/registry.rs`)
