Skip to main content
TypeSteps is built using modern SwiftUI patterns with a clear separation between UI, business logic, and data management.

App Structure

The application follows SwiftUI’s declarative architecture with three core managers:
The main app structure uses:
  • MenuBarExtra for lightweight menu bar presence
  • Window for the dashboard interface
  • @StateObject to manage singleton instances

StateObject Pattern

TypeSteps uses the StateObject pattern to manage app-wide state through singleton managers:

StorageManager.shared

Manages all data persistence and statistics:
See StorageManager.swift:5-392

KeystrokeListener.shared

Handles global event monitoring:
See KeystrokeListener.swift:5-91

WakaTimeManager.shared

Integrates with WakaTime API:
See WakaTimeManager.swift:4-62

App Lifecycle

AppDelegate

The AppDelegate handles initialization and onboarding flow:
See TypeStepsApp.swift:5-29

Notification System

TypeSteps uses NotificationCenter for app-wide events:
See TypeStepsApp.swift:31-35

UI Architecture

The menu bar provides quick stats and controls:
See TypeStepsApp.swift:55-98

Dashboard Window

The main dashboard uses a tabbed interface showing:
  • Day view with hourly activity chart
  • Week view with daily breakdowns
  • Month view with historical data
See TypeStepsApp.swift:113-150

Theme System

TypeSteps includes 24 built-in themes (12 light, 12 dark):
Themes are stored using @AppStorage:
See Theme.swift:3-258

Data Models

ActivityPoint

Used for chart rendering:

AppCategory

Categorizes applications:
See Models.swift:1-28

Service Management

TypeSteps uses ServiceManagement for login item registration:
See TypeStepsApp.swift:164-176