How dweep-desai/facegate-mac works
FaceGate is a native macOS app locker. Its main flow monitors app launches, gates locked apps with an authentication overlay, then records a per-app unlock session. Face authentication uses a camera-to-recognition pipeline; Touch ID and password are fallbacks. The README also documents scheduling, sleep locking, liveness checks, and other controls. Connections reflect source-index references, shown calls, or README statements; some documented capabilities are not represented by sampled implementation details.
Main entry points: AppDelegate.swift App lifecycle · FaceAuthManager.swift Face auth pipeline · SettingsView.swift Settings · LockedAppsManager.swift Locked app list
Components 28
App runtime
- App lifecycle
FaceGate/App/AppDelegate.swift - Menu bar app
FaceGate/App/FaceGateApp.swift
App locking
- Launch monitor
FaceGate/Core/AppMonitor.swift - Lock enforcement
FaceGate/Core/AppLocker.swift - Unlock sessions
FaceGate/Core/SessionManager.swift - Locked app list
FaceGate/Core/LockedAppsManager.swift - Lock schedules
FaceGate/Core/AppScheduleManager.swift
Face recognition
- Face enrollment
FaceGate/FaceAuth/FaceEnrollmentManager.swift - Enrollment UI
FaceGate/UI/FaceEnrollmentView.swift - Camera capture
FaceGate/FaceAuth/CameraManager.swift - Face auth pipeline
FaceGate/FaceAuth/FaceAuthManager.swift - Face detector
FaceGate/FaceAuth/FaceDetector.swift - Face embedder
FaceGate/FaceAuth/FaceEmbedder.swift - Face matcher
FaceGate/FaceAuth/FaceMatcher.swift - Encrypted face data
FaceGate/FaceAuth/FaceDataStore.swift
Authentication
- Authentication overlay
FaceGate/UI/AuthOverlayView.swift - Auth coordinator
FaceGate/Auth/AuthenticationManager.swift - Touch ID
FaceGate/Auth/TouchIDAuth.swift - Password auth
FaceGate/Auth/PasswordAuth.swift - Sensitive-action auth
FaceGate/UI/ActionAuthWindow.swift
User controls
- Settings
FaceGate/UI/SettingsView.swift - Initial setup
FaceGate/UI/SetupView.swift - App picker
FaceGate/UI/AppPickerView.swift - Installed app scanner
FaceGate/Utilities/InstalledAppsScanner.swift - Emergency hotkey
FaceGate/Core/GlobalHotkeyManager.swift
Other components
- User
- macOS apps
- Camera
Connections 42
- User → Menu bar app: uses
FaceGate/App/FaceGateApp.swift - Menu bar app → App lifecycle: starts
FaceGate/App/FaceGateApp.swift - App lifecycle → Launch monitor: starts monitoring
FaceGate/App/AppDelegate.swift - macOS apps → Launch monitor: reports launches
README.md - Launch monitor → Locked app list: checks lock list
FaceGate/Core/AppMonitor.swift - Launch monitor → Unlock sessions: checks sessions
FaceGate/Core/AppMonitor.swift - Launch monitor → Lock enforcement: enforces locks
FaceGate/Core/AppLocker.swift - Lock enforcement → Authentication overlay: shows gate
FaceGate/Core/AppLocker.swift - Lock enforcement → Unlock sessions: checks session
FaceGate/Core/AppLocker.swift - Lock enforcement → Locked app list: checks app state
FaceGate/Core/AppLocker.swift - Authentication overlay → Auth coordinator: requests authentication
FaceGate/UI/AuthOverlayView.swift - Auth coordinator → Face auth pipeline: starts face check
FaceGate/Auth/AuthenticationManager.swift - Auth coordinator → Touch ID: requests Touch ID
FaceGate/Auth/AuthenticationManager.swift - Auth coordinator → Password auth: verifies password
FaceGate/Auth/AuthenticationManager.swift - Authentication overlay → Unlock sessions: records unlock
- Face auth pipeline → Camera capture: starts capture
FaceGate/FaceAuth/FaceAuthManager.swift - Camera → Camera capture: provides frames
FaceGate/FaceAuth/CameraManager.swift - Face auth pipeline → Face detector: detects faces
FaceGate/FaceAuth/FaceAuthManager.swift - Face auth pipeline → Face embedder: generates embeddings
FaceGate/FaceAuth/FaceAuthManager.swift - Face auth pipeline → Face matcher: matches faces
FaceGate/FaceAuth/FaceAuthManager.swift - Face auth pipeline → Encrypted face data: loads enrollment
FaceGate/FaceAuth/FaceAuthManager.swift - Enrollment UI → Face enrollment: controls enrollment
FaceGate/UI/FaceEnrollmentView.swift - Face enrollment → Camera capture: captures frames
FaceGate/FaceAuth/FaceEnrollmentManager.swift - Face enrollment → Face detector: checks quality
FaceGate/FaceAuth/FaceEnrollmentManager.swift - Face enrollment → Face embedder: creates embeddings
FaceGate/FaceAuth/FaceEnrollmentManager.swift - Face enrollment → Encrypted face data: stores enrollment
FaceGate/FaceAuth/FaceEnrollmentManager.swift - Lock schedules → Locked app list: reads locked apps
FaceGate/Core/AppScheduleManager.swift - Lock schedules → Unlock sessions: creates sessions
FaceGate/Core/AppScheduleManager.swift - Locked app list → Lock schedules: records overrides
FaceGate/Core/LockedAppsManager.swift - User → Settings: configures
FaceGate/UI/SettingsView.swift - Settings → Locked app list: manages app locks
FaceGate/UI/SettingsView.swift - Settings → Lock schedules: configures schedules
FaceGate/UI/SettingsView.swift - Settings → Unlock sessions: configures timers
FaceGate/UI/SettingsView.swift - Settings → Encrypted face data: manages enrollment data
FaceGate/UI/SettingsView.swift - Initial setup → Enrollment UI: offers enrollment
FaceGate/UI/SetupView.swift - Initial setup → App picker: selects apps
FaceGate/UI/SetupView.swift - App picker → Locked app list: sets locked apps
FaceGate/UI/AppPickerView.swift - App picker → Installed app scanner: scans installed apps
FaceGate/UI/AppPickerView.swift - App lifecycle → Emergency hotkey: configures hotkey
FaceGate/App/AppDelegate.swift - App lifecycle → Sensitive-action auth: opens protected actions
FaceGate/App/AppDelegate.swift - App lifecycle → Settings: opens settings
FaceGate/App/AppDelegate.swift - App lifecycle → Initial setup: opens setup
FaceGate/App/AppDelegate.swift