# spookynetwork/spookyomni architecture

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

- Interactive diagram: https://gitdiagram.com/spookynetwork/spookyomni
- Repository: https://github.com/spookynetwork/spookyomni

## Overview

This is a Tauri/React desktop client for the Sovereign Engine. The visible workflow is API-key authentication, then navigating to command or swarm views: the command dashboard presents agent controls, task execution, memory, and status; the swarm view receives telemetry over WebSocket. The native layer exposes command execution, trade validation, Notion telemetry, and state-snapshot commands. The README calls this a scaffold, and several displayed capabilities are placeholders. Connections for unsampled components are limited to relationships listed in the source index or documented in the excerpts.

Main entry points: [`src/components/SovereignDashboard.tsx`](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignDashboard.tsx) (Command dashboard), [`src-tauri/src/lib.rs`](https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/lib.rs) (Tauri command runtime), [`src/App.tsx`](https://github.com/spookynetwork/spookyomni/blob/main/src/App.tsx) (App navigation), [`src/components/AuthGate.tsx`](https://github.com/spookynetwork/spookyomni/blob/main/src/components/AuthGate.tsx) (API-key gate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Client shell"]
  node_app_entry["React entry<br/>[main.tsx]"]
  node_app["App navigation<br/>[App.tsx]"]
  node_auth["API-key gate<br/>[AuthGate.tsx]"]
end

subgraph group_operations["Command operations"]
  node_dashboard["Command dashboard"]
  node_hud["Status HUD<br/>[SovereignHUD.tsx]"]
  node_agent_controls["Agent controls"]
  node_task_window["Task execution"]
  node_memory_viewer["Memory viewer<br/>[MemoryViewer.tsx]"]
  node_tactical_editor["Tactical editor<br/>[TacticalEditor.tsx]"]
  node_kraken_terminal["Kraken terminal"]
  node_liquid_terminal["Liquid terminal<br/>[LiquidTerminal.tsx]"]
  node_sovereign_auth["Sovereign auth<br/>[SovereignAuth.tsx]"]
  node_corals_dashboard["Corals dashboard"]
end

subgraph group_telemetry["Swarm telemetry"]
  node_swarm_view["Swarm telemetry view<br/>[SwarmTelemetry.tsx]"]
  node_socket_client["Telemetry socket client"]
  node_socket_contract["Telemetry contract<br/>[SpookySocket.ts]"]
end

subgraph group_native["Native runtime"]
  node_native_runtime["Tauri command runtime<br/>[lib.rs]"]
  node_native_shell["Desktop runtime entry<br/>[main.rs]"]
  node_trade_guard["Trade safety governor<br/>[safety_governor.rs]"]
  node_state_snapshot[("State snapshot writer<br/>[state_manager.rs]")]
end

subgraph group_visuals["Cinematic UI"]
  node_biolume["Biolume layer<br/>[BiolumeLayer.tsx]"]
  node_bubble_cursor["Bubble cursor<br/>[BubbleCursor.tsx]"]
  node_cinematic_panel["Cinematic panel<br/>[CinematicPanel.tsx]"]
  node_glow_stream["Glow stream<br/>[GlowStream.tsx]"]
  node_cinematic_tokens["Visual theme tokens<br/>[tokens.ts]"]
end

node_user(("Desktop user"))
node_account_service{{"Account API"}}
node_swarm_service{{"Telemetry service"}}
node_notion_service{{"Notion API"}}
node_host_shell{{"Host command shell"}}

node_user -->|"opens"| node_app_entry
node_app_entry -->|"renders"| node_app
node_app -->|"wraps"| node_auth
node_user -->|"submits key"| node_auth
node_auth -->|"fetches account"| node_account_service
node_app -->|"shows command"| node_dashboard
node_app -->|"shows swarm"| node_swarm_view
node_dashboard -->|"renders"| node_hud
node_dashboard -->|"renders"| node_agent_controls
node_dashboard -->|"renders"| node_task_window
node_dashboard -->|"renders"| node_memory_viewer
node_swarm_view -->|"reads auth"| node_auth
node_swarm_view -->|"uses"| node_socket_client
node_socket_client -->|"implements"| node_socket_contract
node_socket_client -->|"receives frames"| node_swarm_service
node_native_shell -.->|"starts"| node_native_runtime
node_native_runtime -->|"registers command"| node_trade_guard
node_native_runtime -->|"registers command"| node_state_snapshot
node_native_runtime -->|"queries"| node_notion_service
node_native_runtime -->|"executes commands"| node_host_shell
node_corals_dashboard -.->|"uses cinematic exports"| node_biolume
node_cinematic_panel -->|"reads theme"| node_cinematic_tokens
node_biolume -->|"reads theme"| node_cinematic_tokens
node_glow_stream -->|"reads theme"| node_cinematic_tokens

click node_app_entry "https://github.com/spookynetwork/spookyomni/blob/main/src/main.tsx"
click node_app "https://github.com/spookynetwork/spookyomni/blob/main/src/App.tsx"
click node_auth "https://github.com/spookynetwork/spookyomni/blob/main/src/components/AuthGate.tsx"
click node_dashboard "https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignDashboard.tsx"
click node_hud "https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignHUD.tsx"
click node_agent_controls "https://github.com/spookynetwork/spookyomni/blob/main/src/components/AgentControlPanel.tsx"
click node_task_window "https://github.com/spookynetwork/spookyomni/blob/main/src/components/TaskExecutionWindow.tsx"
click node_memory_viewer "https://github.com/spookynetwork/spookyomni/blob/main/src/components/MemoryViewer.tsx"
click node_tactical_editor "https://github.com/spookynetwork/spookyomni/blob/main/src/components/TacticalEditor.tsx"
click node_kraken_terminal "https://github.com/spookynetwork/spookyomni/blob/main/src/components/KrakenTradingTerminal.tsx"
click node_liquid_terminal "https://github.com/spookynetwork/spookyomni/blob/main/src/components/LiquidTerminal.tsx"
click node_sovereign_auth "https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignAuth.tsx"
click node_corals_dashboard "https://github.com/spookynetwork/spookyomni/blob/main/src/components/SpookyCoralsDashboard.tsx"
click node_swarm_view "https://github.com/spookynetwork/spookyomni/blob/main/src/components/SwarmTelemetry.tsx"
click node_socket_client "https://github.com/spookynetwork/spookyomni/blob/main/src/lib/SpookySocketClient.ts"
click node_socket_contract "https://github.com/spookynetwork/spookyomni/blob/main/src/interfaces/SpookySocket.ts"
click node_native_runtime "https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/lib.rs"
click node_native_shell "https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/main.rs"
click node_trade_guard "https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/safety_governor.rs"
click node_state_snapshot "https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/state_manager.rs"
click node_biolume "https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/BiolumeLayer.tsx"
click node_bubble_cursor "https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/BubbleCursor.tsx"
click node_cinematic_panel "https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/CinematicPanel.tsx"
click node_glow_stream "https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/GlowStream.tsx"
click node_cinematic_tokens "https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/tokens.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_entry,node_app,node_auth,node_user toneBlue
class node_dashboard,node_hud,node_agent_controls,node_task_window,node_memory_viewer,node_tactical_editor,node_kraken_terminal,node_liquid_terminal,node_sovereign_auth,node_corals_dashboard toneAmber
class node_swarm_view,node_socket_client,node_socket_contract,node_account_service,node_notion_service toneMint
class node_native_runtime,node_native_shell,node_trade_guard,node_state_snapshot toneRose
class node_biolume,node_bubble_cursor,node_cinematic_panel,node_glow_stream,node_cinematic_tokens,node_swarm_service,node_host_shell toneIndigo
```

## Components

### Client shell

- [React entry](https://github.com/spookynetwork/spookyomni/blob/main/src/main.tsx): `src/main.tsx`
- [App navigation](https://github.com/spookynetwork/spookyomni/blob/main/src/App.tsx): `src/App.tsx`
- [API-key gate](https://github.com/spookynetwork/spookyomni/blob/main/src/components/AuthGate.tsx): `src/components/AuthGate.tsx`

### Command operations

- [Command dashboard](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignDashboard.tsx): `src/components/SovereignDashboard.tsx`
- [Status HUD](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignHUD.tsx): `src/components/SovereignHUD.tsx`
- [Agent controls](https://github.com/spookynetwork/spookyomni/blob/main/src/components/AgentControlPanel.tsx): `src/components/AgentControlPanel.tsx`
- [Task execution](https://github.com/spookynetwork/spookyomni/blob/main/src/components/TaskExecutionWindow.tsx): `src/components/TaskExecutionWindow.tsx`
- [Memory viewer](https://github.com/spookynetwork/spookyomni/blob/main/src/components/MemoryViewer.tsx): `src/components/MemoryViewer.tsx`
- [Tactical editor](https://github.com/spookynetwork/spookyomni/blob/main/src/components/TacticalEditor.tsx): `src/components/TacticalEditor.tsx`
- [Kraken terminal](https://github.com/spookynetwork/spookyomni/blob/main/src/components/KrakenTradingTerminal.tsx): `src/components/KrakenTradingTerminal.tsx`
- [Liquid terminal](https://github.com/spookynetwork/spookyomni/blob/main/src/components/LiquidTerminal.tsx): `src/components/LiquidTerminal.tsx`
- [Sovereign auth](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SovereignAuth.tsx): `src/components/SovereignAuth.tsx`
- [Corals dashboard](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SpookyCoralsDashboard.tsx): `src/components/SpookyCoralsDashboard.tsx`

### Swarm telemetry

- [Swarm telemetry view](https://github.com/spookynetwork/spookyomni/blob/main/src/components/SwarmTelemetry.tsx): `src/components/SwarmTelemetry.tsx`
- [Telemetry socket client](https://github.com/spookynetwork/spookyomni/blob/main/src/lib/SpookySocketClient.ts): `src/lib/SpookySocketClient.ts`
- [Telemetry contract](https://github.com/spookynetwork/spookyomni/blob/main/src/interfaces/SpookySocket.ts): `src/interfaces/SpookySocket.ts`

### Native runtime

- [Tauri command runtime](https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Desktop runtime entry](https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/main.rs): `src-tauri/src/main.rs`
- [Trade safety governor](https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/safety_governor.rs): `src-tauri/src/safety_governor.rs`
- [State snapshot writer](https://github.com/spookynetwork/spookyomni/blob/main/src-tauri/src/state_manager.rs): `src-tauri/src/state_manager.rs`

### Cinematic UI

- [Biolume layer](https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/BiolumeLayer.tsx): `src/components/cinematic/BiolumeLayer.tsx`
- [Bubble cursor](https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/BubbleCursor.tsx): `src/components/cinematic/BubbleCursor.tsx`
- [Cinematic panel](https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/CinematicPanel.tsx): `src/components/cinematic/CinematicPanel.tsx`
- [Glow stream](https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/GlowStream.tsx): `src/components/cinematic/GlowStream.tsx`
- [Visual theme tokens](https://github.com/spookynetwork/spookyomni/blob/main/src/components/cinematic/tokens.ts): `src/components/cinematic/tokens.ts`

### Other components

- **Desktop user**
- **Account API**
- **Telemetry service**
- **Notion API**
- **Host command shell**

## Connections

- Desktop user → React entry: opens (evidence: `src/main.tsx`)
- React entry → App navigation: renders (evidence: `src/main.tsx`)
- App navigation → API-key gate: wraps (evidence: `src/App.tsx`)
- Desktop user → API-key gate: submits key (evidence: `src/components/AuthGate.tsx`)
- API-key gate → Account API: fetches account (evidence: `src/components/AuthGate.tsx`)
- App navigation → Command dashboard: shows command (evidence: `src/App.tsx`)
- App navigation → Swarm telemetry view: shows swarm (evidence: `src/App.tsx`)
- Command dashboard → Status HUD: renders (evidence: `src/components/SovereignDashboard.tsx`)
- Command dashboard → Agent controls: renders (evidence: `src/components/SovereignDashboard.tsx`)
- Command dashboard → Task execution: renders (evidence: `src/components/SovereignDashboard.tsx`)
- Command dashboard → Memory viewer: renders (evidence: `src/components/SovereignDashboard.tsx`)
- Swarm telemetry view → API-key gate: reads auth (evidence: `src/components/SwarmTelemetry.tsx`)
- Swarm telemetry view → Telemetry socket client: uses (evidence: `src/components/SwarmTelemetry.tsx`)
- Telemetry socket client → Telemetry contract: implements (evidence: `src/lib/SpookySocketClient.ts`)
- Telemetry socket client → Telemetry service: receives frames (evidence: `src/lib/SpookySocketClient.ts`)
- Desktop runtime entry → Tauri command runtime: starts
- Tauri command runtime → Trade safety governor: registers command (evidence: `src-tauri/src/lib.rs`)
- Tauri command runtime → State snapshot writer: registers command (evidence: `src-tauri/src/lib.rs`)
- Tauri command runtime → Notion API: queries (evidence: `src-tauri/src/lib.rs`)
- Tauri command runtime → Host command shell: executes commands (evidence: `src-tauri/src/lib.rs`)
- Corals dashboard → Biolume layer: uses cinematic exports (evidence: `src/components/SpookyCoralsDashboard.tsx`)
- Cinematic panel → Visual theme tokens: reads theme (evidence: `src/components/cinematic/CinematicPanel.tsx`)
- Biolume layer → Visual theme tokens: reads theme (evidence: `src/components/cinematic/BiolumeLayer.tsx`)
- Glow stream → Visual theme tokens: reads theme (evidence: `src/components/cinematic/GlowStream.tsx`)
