$ account productdevbook
PortKiller is a cross-platform desktop application for developers to monitor, manage, and kill processes listening on TCP ports. It provides a unified interface across macOS (SwiftUI), Windows (.NET 9 / WinUI 3), and Linux (Python GTK3 + Rust core) with features including real-time port scanning, process type detection, favorites and watched ports with notifications, two-stage process termination (SIGTERM → SIGKILL), Kubernetes port-forward management with auto-reconnect, and Cloudflare tunnel integration (quick and named tunnels). The application also includes an onboarding wizard, sponsor/contributor display, Sparkle-based auto-updates (macOS), and extensive keyboard shortcut support. The architecture is platform-native with shared patterns: each platform implements its own UI layer, port scanner, and process killer, while a Rust core library (`portkiller-core`) provides scanning and process termination for Linux. The macOS version uses an actor-based `PortScanner` and observable state management (`AppState`), the Windows version follows MVVM with a system tray mini-window, and the Linux version uses a GTK3 system tray indicator. All platforms share a common feature set but with varying completeness (macOS is the most feature-rich). External dependencies include `lsof`/`ss` (Linux), `kubectl`, `cloudflared`, `socat`, and system utilities for process enumeration. Key data flows: port scanning via platform-specific commands (lsof, ss, GetExtendedTcpTable) → parsing into `PortInfo` models → filtering/searching → display in tree/table views → user actions (kill, watch, favorite, forward, tunnel). Kubernetes port-forwards and Cloudflare tunnels are managed as subprocesses with monitoring loops for reconnection and log streaming. The application persists user preferences (favorites, watched ports, customizations) using platform-native storage (Defaults on macOS, JSON on Windows/Linux).