# sarosch/horus-eye architecture

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

- Interactive diagram: https://gitdiagram.com/sarosch/horus-eye
- Repository: https://github.com/sarosch/horus-eye

## Overview

Horus Eye is a Java Swing desktop application for LAN peer discovery and network settings. Its startup workflow loads or initializes broadcast address and port in a MySQL settings table, starts UDP discovery, and builds a window for navigating the main and settings views. The settings view edits network configuration; the main view offers card-based panels. RDP appears as an unfinished implementation with no demonstrated connection to startup or the UI. Edges reflect shown calls and documented references; unsampled behavior is not inferred.

Main entry points: [`src/main/java/CJP/Server/Main.java`](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Main.java) (Startup), [`src/main/java/CJP/Server/Activity/ActivitySetting.java`](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivitySetting.java) (Settings view), [`src/main/java/CJP/Server/Activity/ActivityMain.java`](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityMain.java) (Main view), [`src/main/java/CJP/Server/Suporte/Databank.java`](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Databank.java) (Settings persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application startup"]
  node_main["Startup<br/>[Main.java]"]
end

subgraph group_interface["Desktop interface"]
  node_frame["Window navigation<br/>[Frame.java]"]
  node_activity_contract["Activity contract<br/>[Activity.java]"]
  node_main_view["Main view<br/>[ActivityMain.java]"]
  node_settings_view["Settings view"]
  node_default_panel["Default panel"]
  node_yellow_panel["Yellow panel<br/>[Yellow.java]"]
end

subgraph group_configuration["Network configuration"]
  node_network_settings["Network settings panel<br/>[ActivityNet.java]"]
  node_databank["Settings persistence<br/>[Databank.java]"]
end

subgraph group_discovery["Peer discovery"]
  node_broadcast["UDP broadcast<br/>[BroadCast.java]"]
  node_rdp["RDP placeholder<br/>[RDP.java]"]
end

node_user(("Desktop user"))
node_mysql[("MySQL database")]
node_peers(("LAN peers"))

node_user -->|"launches"| node_main
node_main -->|"initializes settings"| node_databank
node_main -->|"configures JDBC"| node_mysql
node_databank -->|"executes SQL"| node_mysql
node_main -->|"starts and sends"| node_broadcast
node_broadcast -->|"sends and receives"| node_peers
node_main -->|"creates window"| node_frame
node_main -->|"registers view"| node_main_view
node_main -->|"registers view"| node_settings_view
node_frame -->|"lays out activity"| node_activity_contract
node_main_view -->|"implements"| node_activity_contract
node_settings_view -->|"implements"| node_activity_contract
node_main_view -->|"creates card"| node_yellow_panel
node_main_view -->|"creates card"| node_default_panel
node_settings_view -->|"creates category"| node_network_settings
node_settings_view -->|"creates category"| node_default_panel
node_settings_view -->|"creates category"| node_yellow_panel
node_network_settings -->|"reads and updates"| node_databank

click node_main "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Main.java"
click node_frame "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Frame.java"
click node_activity_contract "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Activity.java"
click node_main_view "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityMain.java"
click node_settings_view "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivitySetting.java"
click node_network_settings "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityNet.java"
click node_default_panel "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityDefault.java"
click node_yellow_panel "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/Yellow.java"
click node_databank "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Databank.java"
click node_broadcast "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/BroadCast.java"
click node_rdp "https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/RDP.java"

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_main,node_user toneBlue
class node_frame,node_activity_contract,node_main_view,node_settings_view,node_default_panel,node_yellow_panel,node_mysql toneAmber
class node_network_settings,node_databank toneMint
class node_broadcast,node_rdp toneRose
class node_peers toneIndigo
```

## Components

### Application startup

- [Startup](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Main.java): `src/main/java/CJP/Server/Main.java`

### Desktop interface

- [Window navigation](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Frame.java): `src/main/java/CJP/Server/Suporte/Frame.java`
- [Activity contract](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Activity.java): `src/main/java/CJP/Server/Suporte/Activity.java`
- [Main view](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityMain.java): `src/main/java/CJP/Server/Activity/ActivityMain.java`
- [Settings view](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivitySetting.java): `src/main/java/CJP/Server/Activity/ActivitySetting.java`
- [Default panel](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityDefault.java): `src/main/java/CJP/Server/Activity/ActivityDefault.java`
- [Yellow panel](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/Yellow.java): `src/main/java/CJP/Server/Activity/Yellow.java`

### Network configuration

- [Network settings panel](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Activity/ActivityNet.java): `src/main/java/CJP/Server/Activity/ActivityNet.java`
- [Settings persistence](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/Databank.java): `src/main/java/CJP/Server/Suporte/Databank.java`

### Peer discovery

- [UDP broadcast](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/BroadCast.java): `src/main/java/CJP/Server/Suporte/BroadCast.java`
- [RDP placeholder](https://github.com/sarosch/horus-eye/blob/master/src/main/java/CJP/Server/Suporte/RDP.java): `src/main/java/CJP/Server/Suporte/RDP.java`

### Other components

- **Desktop user**
- **MySQL database**
- **LAN peers**

## Connections

- Desktop user → Startup: launches
- Startup → Settings persistence: initializes settings (evidence: `src/main/java/CJP/Server/Main.java`)
- Startup → MySQL database: configures JDBC (evidence: `src/main/java/CJP/Server/Main.java`)
- Settings persistence → MySQL database: executes SQL (evidence: `src/main/java/CJP/Server/Suporte/Databank.java`)
- Startup → UDP broadcast: starts and sends (evidence: `src/main/java/CJP/Server/Main.java`)
- UDP broadcast → LAN peers: sends and receives (evidence: `src/main/java/CJP/Server/Suporte/BroadCast.java`)
- Startup → Window navigation: creates window (evidence: `src/main/java/CJP/Server/Main.java`)
- Startup → Main view: registers view (evidence: `src/main/java/CJP/Server/Main.java`)
- Startup → Settings view: registers view (evidence: `src/main/java/CJP/Server/Main.java`)
- Window navigation → Activity contract: lays out activity (evidence: `src/main/java/CJP/Server/Suporte/Frame.java`)
- Main view → Activity contract: implements (evidence: `src/main/java/CJP/Server/Activity/ActivityMain.java`)
- Settings view → Activity contract: implements (evidence: `src/main/java/CJP/Server/Activity/ActivitySetting.java`)
- Main view → Yellow panel: creates card (evidence: `src/main/java/CJP/Server/Activity/ActivityMain.java`)
- Main view → Default panel: creates card (evidence: `src/main/java/CJP/Server/Activity/ActivityMain.java`)
- Settings view → Network settings panel: creates category (evidence: `src/main/java/CJP/Server/Activity/ActivitySetting.java`)
- Settings view → Default panel: creates category (evidence: `src/main/java/CJP/Server/Activity/ActivitySetting.java`)
- Settings view → Yellow panel: creates category (evidence: `src/main/java/CJP/Server/Activity/ActivitySetting.java`)
- Network settings panel → Settings persistence: reads and updates (evidence: `src/main/java/CJP/Server/Activity/ActivityNet.java`)
