Where Is the Source Code for vorssaint-utils Located? A Complete Guide to the Swift Package Repository
All implementation code for vorssaint-utils lives in the Sources/ directory, with each module organized under its own subfolder following standard Swift Package Manager conventions.
The vorssaint-utils repository is a Swift-based utility suite for macOS, and its source code follows the standard Swift Package Manager layout. Whether you're auditing the code for security, planning a contribution, or integrating with the modules, knowing exactly where each component resides saves significant exploration time.
The Sources Directory Structure
The core of the project resides entirely within Sources/. As implemented in vorssaint/vorssaint-utils, this directory contains six distinct modules:
Sources/Vorssaint/– The main application module containing the entry point, UI components, and window servicesSources/NowPlayingAdapter/– macOS Now Playing integrationSources/HIDEventSystem/– Low-level HID event system bindingsSources/FanControlHelper/– MacBook fan control utilities
Each module is defined in Package.swift and can be imported independently in Swift code.
Main Application Entry Point
The primary entry point is Sources/Vorssaint/main.swift. This file handles application bootstrap, service registration, and UI launch:
// main.swift – entry point
import Vorssaint
import NowPlayingAdapter
import FanControlHelper
@main
struct VorssaintApp {
static func main() async throws {
// Initialise services
try await WindowServerSupport.shared.start()
try await NowPlayingAdapter.shared.start()
try await FanControlHelper.shared.start()
// Launch the UI
try await UI.run()
}
}
This pattern uses Swift's @main attribute with an async entry point, requiring Swift 5.5 or later.
UI Components: Sources/Vorssaint/UI/
All Swift UI views are located in Sources/Vorssaint/UI/. This includes:
- Window controls and traffic-light hit-testing overlays
- The application switcher interface
- Snippet library views
Key file: [WindowGestureControls.swift](https://github.com/vorssaint/vorssaint-utils/blob/main/Sources/Vorssaint/UI/WindowGestureControls.swift) handles gesture recognition for window manipulation.
Window Services: Sources/Vorssaint/Services/
Window server interactions live in Sources/Vorssaint/Services/. The WindowMaximizer.swift file contains the logic for maximizing windows:
// Example: Using the WindowMaximizer service
import Vorssaint
func maximizeCurrentWindow() async {
let maximizer = WindowMaximizer.shared
await maximizer.maximizeFrontmostWindow()
}
These services communicate directly with the macOS window server for traffic-light hit-testing and window state management.
NowPlayingAdapter Module
The Sources/NowPlayingAdapter/NowPlayingAdapter.swift file bridges the app with macOS system media information:
// Example: Accessing the Now‑Playing info
import NowPlayingAdapter
func printCurrentTrack() {
let nowPlaying = NowPlayingAdapter.shared
if let track = nowPlaying.currentTrack {
print("Now playing: \(track.title) – \(track.artist)")
} else {
print("No track currently playing.")
}
}
This module uses the private MediaRemote framework for system integration.
HIDEventSystem and FanControlHelper Modules
Sources/HIDEventSystem/– Contains low-level HID event system bindings for hardware input handlingSources/FanControlHelper/main.swift– Provides SMC-based utilities for reading and controlling MacBook fan speed
Supporting Files Outside Sources/
Beyond the Sources/ directory, the repository contains:
| Directory/File | Purpose |
|---|---|
Package.swift |
Swift Package manifest defining module targets and dependencies |
Tools/ |
Build, signing, and packaging scripts |
Resources/ |
Icons, localizations, and asset bundles |
README.md, CHANGELOG.md, LICENSE |
Project documentation |
Complete File Reference for vorssaint-utils Source Code
| File Path | Module | Purpose |
|---|---|---|
Sources/Vorssaint/main.swift |
Vorssaint | Application bootstrap |
Sources/Vorssaint/UI/WindowGestureControls.swift |
Vorssaint | Gesture handling |
Sources/Vorssaint/Services/WindowMaximizer.swift |
Vorssaint | Window maximization logic |
Sources/NowPlayingAdapter/NowPlayingAdapter.swift |
NowPlayingAdapter | macOS media integration |
Sources/FanControlHelper/main.swift |
FanControlHelper | Fan control utilities |
Sources/HIDEventSystem/ |
HIDEventSystem | HID event bindings |
Package.swift |
— | Package manifest |
All files are publicly accessible at https://github.com/vorssaint/vorssaint-utils.
Summary
- Primary location: All source code for vorssaint-utils is in the
Sources/directory - Entry point:
Sources/Vorssaint/main.swiftbootstraps the application - Module organization: Six distinct modules with clear separation of concerns (UI, services, hardware integration)
- Package definition:
Package.swiftat repository root defines targets and dependencies - Public repository: Full source available at
github.com/vorssaint/vorssaint-utils
Frequently Asked Questions
Does vorssaint-utils use the standard Swift Package Manager directory layout?
Yes. The repository follows Swift Package Manager conventions exactly: all implementation code in Sources/, with subdirectories matching module names defined in Package.swift. This is the canonical structure for Swift packages.
Can I import individual modules from vorssaint-utils without the full application?
Yes. Each module (Vorssaint, NowPlayingAdapter, FanControlHelper, HIDEventSystem) is a separate target in Package.swift. You can depend on specific modules in your own Package.swift and import only what you need.
Where is the build configuration for vorssaint-utils located?
Build configuration lives in two places: Package.swift (target definitions, dependencies, and Swift settings) and the Tools/ directory (scripts for signing, notarization, and packaging). The Package.swift file is the source of truth for compilation.
Is the NowPlayingAdapter using private Apple APIs?
Yes. According to the source code in Sources/NowPlayingAdapter/NowPlayingAdapter.swift, this module interfaces with MediaRemote.framework, which is a private framework. Usage requires appropriate entitlement handling and may affect App Store distribution.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →