# seoheejung/what-the-port-win architecture

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

- Interactive diagram: https://gitdiagram.com/seoheejung/what-the-port-win
- Repository: https://github.com/seoheejung/what-the-port-win

## Overview

What the Port for Windows is a local Windows tray app for finding development servers, monitoring their process-tree resources, and safely reviewing or stopping idle servers. The principal flow is tray launch → periodic scan and aggregation → panel views, history and alerts → optional cleanup or user-triggered project actions; a companion CLI lists servers and registers project links. The README documents cleanup, settings, alerts, localization, session/preview links and CLI capabilities. Edges are limited to calls shown in excerpts or relationships explicit in the README; unsampled storage and some UI routes are represented without speculative links.

Main entry points: [`src/App/Panel.cs`](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Panel.cs) (Panel and workflows), [`src/Core/Scanner.cs`](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Scanner.cs) (Server scanner), [`src/App/Program.cs`](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Program.cs) (App startup), [`src/Cli/Program.cs`](https://github.com/seoheejung/what-the-port-win/blob/main/src/Cli/Program.cs) (Command-line interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App runtime"]
  node_tray["Windows tray<br/>[TrayIcon.cs]"]
  node_activation["Instance activation"]
  node_app["App startup<br/>[Program.cs]"]
end

subgraph group_detection["Server detection"]
  node_scanner["Server scanner<br/>[Scanner.cs]"]
  node_native["Windows process APIs<br/>[Native.cs]"]
  node_policy["Safety and warnings<br/>[Policy.cs]"]
  node_models["Server models<br/>[Models.cs]"]
end

subgraph group_experience["Panel experience"]
  node_panel["Panel and workflows<br/>[Panel.cs]"]
  node_chart["Resource charts<br/>[Chart.cs]"]
  node_placement["Panel placement<br/>[PanelPlacement.cs]"]
  node_strings["Localization<br/>[Strings.cs]"]
  node_tooltip["Tooltip conversion"]
end

subgraph group_actions["User actions"]
  node_storage[("Local settings and links<br/>[Storage.cs]")]
  node_launchers["Project launch actions<br/>[Launchers.cs]"]
  node_shell["Windows shell"]
end

subgraph group_interfaces["User interfaces"]
  node_cli["Command-line interface<br/>[Program.cs]"]
  node_demo["Demo snapshots<br/>[Demo.cs]"]
end

node_user(("User"))

node_user -->|"clicks or invokes"| node_tray
node_tray -.->|"signals activation"| node_app
node_app -->|"checks instance"| node_activation
node_app -->|"creates and starts"| node_panel
node_app -->|"creates demo data"| node_demo
node_panel -->|"uses tray controls"| node_tray
node_panel -->|"scans servers"| node_scanner
node_scanner -->|"reads process data"| node_native
node_scanner -->|"applies process rules"| node_policy
node_scanner -.->|"produces snapshots"| node_models
node_panel -->|"selects cleanup targets"| node_policy
node_panel -.->|"loads and saves"| node_storage
node_panel -.->|"shows resource history"| node_chart
node_panel -.->|"positions window"| node_placement
node_panel -->|"translates interface"| node_strings
node_panel -->|"formats tooltips"| node_tooltip
node_panel -.->|"invokes project actions"| node_launchers
node_launchers -->|"opens URL or terminal"| node_shell
node_user -->|"runs commands"| node_cli
node_cli -->|"scans for list"| node_scanner
node_cli -->|"reads settings and saves links"| node_storage
node_cli -->|"opens app"| node_shell

click node_tray "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/TrayIcon.cs"
click node_activation "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/InstanceActivation.cs"
click node_app "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Program.cs"
click node_scanner "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Scanner.cs"
click node_native "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Native.cs"
click node_policy "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Policy.cs"
click node_models "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Models.cs"
click node_panel "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Panel.cs"
click node_chart "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Chart.cs"
click node_placement "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/PanelPlacement.cs"
click node_strings "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Strings.cs"
click node_tooltip "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/ToolTipTextConverter.cs"
click node_storage "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Storage.cs"
click node_launchers "https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Launchers.cs"
click node_cli "https://github.com/seoheejung/what-the-port-win/blob/main/src/Cli/Program.cs"
click node_demo "https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Demo.cs"

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_tray,node_activation,node_app,node_user toneBlue
class node_scanner,node_native,node_policy,node_models toneAmber
class node_panel,node_chart,node_placement,node_strings,node_tooltip toneMint
class node_storage,node_launchers,node_shell toneRose
class node_cli,node_demo toneIndigo
```

## Components

### App runtime

- [Windows tray](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/TrayIcon.cs): `src/App/TrayIcon.cs`
- [Instance activation](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/InstanceActivation.cs): `src/App/InstanceActivation.cs`
- [App startup](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Program.cs): `src/App/Program.cs`

### Server detection

- [Server scanner](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Scanner.cs): `src/Core/Scanner.cs`
- [Windows process APIs](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Native.cs): `src/Core/Native.cs`
- [Safety and warnings](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Policy.cs): `src/Core/Policy.cs`
- [Server models](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Models.cs): `src/Core/Models.cs`

### Panel experience

- [Panel and workflows](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Panel.cs): `src/App/Panel.cs`
- [Resource charts](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Chart.cs): `src/App/Chart.cs`
- [Panel placement](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/PanelPlacement.cs): `src/App/PanelPlacement.cs`
- [Localization](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Strings.cs): `src/App/Strings.cs`
- [Tooltip conversion](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/ToolTipTextConverter.cs): `src/App/ToolTipTextConverter.cs`

### User actions

- [Local settings and links](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Storage.cs): `src/Core/Storage.cs`
- [Project launch actions](https://github.com/seoheejung/what-the-port-win/blob/main/src/Core/Launchers.cs): `src/Core/Launchers.cs`
- **Windows shell**

### User interfaces

- [Command-line interface](https://github.com/seoheejung/what-the-port-win/blob/main/src/Cli/Program.cs): `src/Cli/Program.cs`
- [Demo snapshots](https://github.com/seoheejung/what-the-port-win/blob/main/src/App/Demo.cs): `src/App/Demo.cs`

### Other components

- **User**

## Connections

- User → Windows tray: clicks or invokes (evidence: `README.md`)
- Windows tray → App startup: signals activation
- App startup → Instance activation: checks instance (evidence: `src/App/Program.cs`)
- App startup → Panel and workflows: creates and starts (evidence: `src/App/Program.cs`)
- App startup → Demo snapshots: creates demo data (evidence: `src/App/Program.cs`)
- Panel and workflows → Windows tray: uses tray controls (evidence: `src/App/Panel.cs`)
- Panel and workflows → Server scanner: scans servers (evidence: `src/App/Panel.cs`)
- Server scanner → Windows process APIs: reads process data (evidence: `src/Core/Scanner.cs`)
- Server scanner → Safety and warnings: applies process rules (evidence: `src/Core/Scanner.cs`)
- Server scanner → Server models: produces snapshots
- Panel and workflows → Safety and warnings: selects cleanup targets (evidence: `src/App/Panel.cs`)
- Panel and workflows → Local settings and links: loads and saves
- Panel and workflows → Resource charts: shows resource history (evidence: `src/App/Panel.cs`)
- Panel and workflows → Panel placement: positions window (evidence: `src/App/Panel.cs`)
- Panel and workflows → Localization: translates interface (evidence: `src/App/Panel.cs`)
- Panel and workflows → Tooltip conversion: formats tooltips (evidence: `src/App/Panel.cs`)
- Panel and workflows → Project launch actions: invokes project actions (evidence: `src/App/Panel.cs`)
- Project launch actions → Windows shell: opens URL or terminal (evidence: `src/Core/Launchers.cs`)
- User → Command-line interface: runs commands (evidence: `README.md`)
- Command-line interface → Server scanner: scans for list (evidence: `src/Cli/Program.cs`)
- Command-line interface → Local settings and links: reads settings and saves links (evidence: `src/Cli/Program.cs`)
- Command-line interface → Windows shell: opens app (evidence: `src/Cli/Program.cs`)
