# noah-nuebling/mac-mouse-fix architecture

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

- Interactive diagram: https://gitdiagram.com/noah-nuebling/mac-mouse-fix
- Repository: https://github.com/noah-nuebling/mac-mouse-fix

## Overview

Mac Mouse Fix is a macOS mouse-enhancement app. Users configure button remaps and pointer/scroll behavior in the app; a helper handles device input and applies those behaviors. The README highlights gestures, smooth scrolling, and customization, while the tree identifies separate button, pointer, scroll, and drag subsystems. The graph includes those capabilities, licensing/trial UI, and app/helper state. Some runtime wiring is shown only by the product description and tree, so those links are dashed; source-index relationships are cited where available.

Main entry points: [`Helper/Core/Coordinate/SwitchMaster.swift`](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Coordinate/SwitchMaster.swift) (Input Coordinator), [`App/UI/Main/Tabs/AboutTabController.swift`](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/AboutTabController.swift) (About and Trial UI), [`App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift`](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift) (Button Settings), [`App/MainAppState.swift`](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/MainAppState.swift) (App State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Settings"]
  node_appstate["App State<br/>[MainAppState.swift]"]
  node_tabview["Settings Tabs"]
  node_buttonui["Button Settings"]
  node_pointerui["Pointer Settings"]
  node_scrollui["Scroll Settings"]
  node_aboutui["About and Trial UI"]
  node_licenseui["License Sheet"]
end

subgraph group_runtime["Mouse Runtime"]
  node_buttonruntime["Button Remapping<br/>[Buttons.swift]"]
  node_remaps["Remap Rules<br/>[Remap.h]"]
  node_pointer["Pointer Speed<br/>[PointerSpeed.h]"]
  node_scroll["Scroll Processing<br/>[Scroll.h]"]
  node_drag["Drag Gestures<br/>[ModifiedDrag.h]"]
  node_switchmaster["Input Coordinator<br/>[SwitchMaster.swift]"]
  node_devices["Device Manager"]
end

subgraph group_state["Shared State"]
  node_config["Configuration"]
  node_messageport["App-Helper Messaging"]
end

subgraph group_license["Licensing"]
  node_licensecheck["License State"]
  node_licenseutility["Trial State"]
  node_trialmanager["Trial Presentation"]
  node_trialnotification["Trial Notifications"]
end

node_user(("Mouse User"))
node_mouse(("Mouse Device"))

node_user -.->|"configures"| node_buttonui
node_user -.->|"configures"| node_pointerui
node_user -.->|"configures"| node_scrollui
node_appstate -->|"opens"| node_tabview
node_appstate -->|"references"| node_buttonui
node_appstate -->|"references"| node_aboutui
node_buttonui -->|"sends commands"| node_messageport
node_buttonui -.->|"updates"| node_config
node_pointerui -.->|"updates"| node_config
node_scrollui -.->|"updates"| node_config
node_messageport -.->|"dispatches"| node_switchmaster
node_mouse -.->|"attaches"| node_devices
node_devices -->|"notifies"| node_switchmaster
node_switchmaster -.->|"coordinates"| node_buttonruntime
node_buttonruntime -.->|"applies"| node_remaps
node_switchmaster -.->|"coordinates"| node_pointer
node_switchmaster -.->|"coordinates"| node_scroll
node_switchmaster -.->|"coordinates"| node_drag
node_aboutui -->|"loads state"| node_licensecheck
node_aboutui -->|"loads trial data"| node_licenseutility
node_aboutui -->|"starts presentation"| node_trialmanager
node_licenseui -->|"checks license"| node_licensecheck
node_licenseui -->|"refreshes UI"| node_aboutui
node_trialnotification -->|"uses trial section"| node_trialmanager

click node_appstate "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/MainAppState.swift"
click node_tabview "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/TabViewController.swift"
click node_buttonui "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift"
click node_pointerui "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/PointerTabController.swift"
click node_scrollui "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/ScrollTabController.swift"
click node_aboutui "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/AboutTabController.swift"
click node_licenseui "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/LicenseSheet/LicenseSheetController.swift"
click node_buttonruntime "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Buttons/Buttons.swift"
click node_remaps "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Remap/Remap.h"
click node_pointer "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/PointerSpeed/PointerSpeed.h"
click node_scroll "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Scroll/Scroll.h"
click node_drag "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Drag/ModifiedDrag.h"
click node_switchmaster "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Coordinate/SwitchMaster.swift"
click node_devices "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/Devices/ReactiveDeviceManager.swift"
click node_config "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/Config/ReactiveConfig.swift"
click node_messageport "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/MessagePort/MessagePortUtility.swift"
click node_licensecheck "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/License/Retrieve/GetLicenseState.swift"
click node_licenseutility "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/License/LicenseUtility.swift"
click node_trialmanager "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/UI/TrialSection/TrialSectionManager.swift"
click node_trialnotification "https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/UI/TrialNotifications/TrialNotificationController.swift"

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_appstate,node_tabview,node_buttonui,node_pointerui,node_scrollui,node_aboutui,node_licenseui,node_user toneBlue
class node_buttonruntime,node_remaps,node_pointer,node_scroll,node_drag,node_switchmaster,node_devices toneAmber
class node_config,node_messageport toneMint
class node_licensecheck,node_licenseutility,node_trialmanager,node_trialnotification toneRose
class node_mouse toneIndigo
```

## Components

### App and Settings

- [App State](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/MainAppState.swift): `App/MainAppState.swift`
- [Settings Tabs](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/TabViewController.swift): `App/UI/Main/TabViewController.swift`
- [Button Settings](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift): `App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift`
- [Pointer Settings](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/PointerTabController.swift): `App/UI/Main/Tabs/PointerTabController.swift`
- [Scroll Settings](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/ScrollTabController.swift): `App/UI/Main/Tabs/ScrollTabController.swift`
- [About and Trial UI](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/Main/Tabs/AboutTabController.swift): `App/UI/Main/Tabs/AboutTabController.swift`
- [License Sheet](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/App/UI/LicenseSheet/LicenseSheetController.swift): `App/UI/LicenseSheet/LicenseSheetController.swift`

### Mouse Runtime

- [Button Remapping](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Buttons/Buttons.swift): `Helper/Core/Buttons/Buttons.swift`
- [Remap Rules](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Remap/Remap.h): `Helper/Core/Remap/Remap.h`
- [Pointer Speed](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/PointerSpeed/PointerSpeed.h): `Helper/Core/PointerSpeed/PointerSpeed.h`
- [Scroll Processing](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Scroll/Scroll.h): `Helper/Core/Scroll/Scroll.h`
- [Drag Gestures](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Drag/ModifiedDrag.h): `Helper/Core/Drag/ModifiedDrag.h`
- [Input Coordinator](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/Core/Coordinate/SwitchMaster.swift): `Helper/Core/Coordinate/SwitchMaster.swift`
- [Device Manager](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/Devices/ReactiveDeviceManager.swift): `Shared/Devices/ReactiveDeviceManager.swift`

### Shared State

- [Configuration](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/Config/ReactiveConfig.swift): `Shared/Config/ReactiveConfig.swift`
- [App-Helper Messaging](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/MessagePort/MessagePortUtility.swift): `Shared/MessagePort/MessagePortUtility.swift`

### Licensing

- [License State](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/License/Retrieve/GetLicenseState.swift): `Shared/License/Retrieve/GetLicenseState.swift`
- [Trial State](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/License/LicenseUtility.swift): `Shared/License/LicenseUtility.swift`
- [Trial Presentation](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Shared/UI/TrialSection/TrialSectionManager.swift): `Shared/UI/TrialSection/TrialSectionManager.swift`
- [Trial Notifications](https://github.com/noah-nuebling/mac-mouse-fix/blob/master/Helper/UI/TrialNotifications/TrialNotificationController.swift): `Helper/UI/TrialNotifications/TrialNotificationController.swift`

### Other components

- **Mouse User**
- **Mouse Device**

## Connections

- Mouse User → Button Settings: configures
- Mouse User → Pointer Settings: configures
- Mouse User → Scroll Settings: configures
- App State → Settings Tabs: opens (evidence: `App/MainAppState.swift`)
- App State → Button Settings: references (evidence: `App/MainAppState.swift`)
- App State → About and Trial UI: references (evidence: `App/MainAppState.swift`)
- Button Settings → App-Helper Messaging: sends commands (evidence: `App/UI/Main/Tabs/ButtonTab/ButtonTabController.swift`)
- Button Settings → Configuration: updates
- Pointer Settings → Configuration: updates
- Scroll Settings → Configuration: updates
- App-Helper Messaging → Input Coordinator: dispatches
- Mouse Device → Device Manager: attaches
- Device Manager → Input Coordinator: notifies (evidence: `Shared/Devices/ReactiveDeviceManager.swift`)
- Input Coordinator → Button Remapping: coordinates
- Button Remapping → Remap Rules: applies
- Input Coordinator → Pointer Speed: coordinates
- Input Coordinator → Scroll Processing: coordinates
- Input Coordinator → Drag Gestures: coordinates
- About and Trial UI → License State: loads state (evidence: `App/UI/Main/Tabs/AboutTabController.swift`)
- About and Trial UI → Trial State: loads trial data (evidence: `App/UI/Main/Tabs/AboutTabController.swift`)
- About and Trial UI → Trial Presentation: starts presentation (evidence: `App/UI/Main/Tabs/AboutTabController.swift`)
- License Sheet → License State: checks license (evidence: `App/UI/LicenseSheet/LicenseSheetController.swift`)
- License Sheet → About and Trial UI: refreshes UI (evidence: `App/UI/LicenseSheet/LicenseSheetController.swift`)
- Trial Notifications → Trial Presentation: uses trial section (evidence: `Helper/UI/TrialNotifications/TrialNotificationController.swift`)
