Files
timban c08fc277a9 Initial commit: NetworkCity — network traffic as a neon city
A native macOS network monitor that renders live traffic as a top-down
neon city: your Mac is downtown, remote orgs are glowing districts, and
traffic is cars of light driving the roads.

Architecture:
- NetworkCityCore: swappable data layer behind a ConnectionSource protocol
  (nettop-backed today), plus pure/tested logic — traffic diffing, org
  classification (reverse-DNS + CIDR), traffic classes, hub-and-spoke
  expansion policy, label anti-overlap, and latency→distance layout.
- NetworkCityApp: SwiftUI + SpriteKit city — auto-expanding districts,
  protocol-coloured cars, click-to-inspect panel, and latency-as-distance
  (districts glide to their measured RTT).
- nettop-probe: CLI proof of the data layer.

44 tests passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 08:43:32 -07:00

32 lines
1.1 KiB
Swift

// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "NetworkCity",
platforms: [.macOS(.v13)],
products: [
// The swappable data layer. The SpriteKit "city" will depend on this
// and never know whether the bytes came from nettop or libpcap.
.library(name: "NetworkCityCore", targets: ["NetworkCityCore"]),
// Phase-1 proof of concept: prints live per-connection traffic rates.
.executable(name: "nettop-probe", targets: ["nettop-probe"]),
// Phase-3: the SpriteKit city SwiftUI window, traffic as cars.
.executable(name: "NetworkCityApp", targets: ["NetworkCityApp"]),
],
targets: [
.target(name: "NetworkCityCore"),
.executableTarget(
name: "nettop-probe",
dependencies: ["NetworkCityCore"]
),
.executableTarget(
name: "NetworkCityApp",
dependencies: ["NetworkCityCore"]
),
.testTarget(
name: "NetworkCityCoreTests",
dependencies: ["NetworkCityCore"]
),
]
)