Back
Open Source Case Study

ProofHub Task Timer

SwiftSwiftDataProofHub APImacOS Menu Bar
ProofHub Task Timer hero poster

The Context Switch

Browser Friction

Time tracking in agency environments is inherently flawed. Developers and designers are forced to abandon their IDEs to hunt for a specific browser tab, navigate a clunky web UI, and click 'Start Timer'.

BROWSER UIHIGH FRICTION

Lost Billable Hours

This massive friction point leads to inaccurate timesheets. Users desperately needed a zero-friction, native utility that lives globally in the system menu bar.

-4.2 HRS

Instant State Swapping

The goal was to allow professionals to rapidly swap active contexts with a single click without ever breaking focus or waiting for a heavy DOM to render.

"I engineered this native macOS application strictly using Swift and SwiftUI, completely rejecting web wrappers to ensure the app consumes virtually zero CPU cycles in the background."

Sole Developer

Technical Architecture

InterfaceCoordinatorLocal data & securityExternal · networkContentViewMenu-bar rootProjectsTasksViewTask list · timersSettingsViewSubdomain · project configAppStateTimer engine · sync coordinatorShiftEnforcerConcurrent timer rulesSwiftData StoreOffline-first cachePaused timers · prefsKeychainAPI key · encryptedProofHub CloudBolt REST API
Control flowData & stateNetwork

AppState is the single source of truth for every running timer. SwiftData caches projects and tasks for instant browsing; nothing reaches ProofHub's Bolt API until a timer is explicitly saved.

The MenuBarExtra Lifecycle

SwiftUI & macOS Native

Building a reliable menu bar app is vastly different from a standard windowed app. Using SwiftUI's modern MenuBarExtra scene ensures the app launches silently on login without polluting the dock. To preserve battery, the UI aggressively halts rendering loops when dismissed, relying strictly on a low-priority background Timer publisher to compute elapsed seconds.

SwiftData Offline Caching

Local Persistence Layer

To eliminate network latency during project selection, I implemented a robust SwiftData schema. The app asynchronously pre-fetches the user's assigned projects and tasks, serializing the JSON into native @Model objects. The UI binds directly to this local database via @Query, guaranteeing instant 0ms responses even in airplane mode.

Concurrent State Engine

Combine & Actor Model

Handling multiple paused, running, and syncing timers required an iron-clad local engine. An AppState coordinator uses Swift's concurrency model (async/await and Actors) to prevent data races. When a user switches tasks, the engine logs the timestamp, triggers an optimistic UI update, and queues a background push with exponential backoff.

Have something worth building?

Tell me what you're building and where it's stuck. Every message reaches me directly, and I reply personally.

Available for freelance© 2026 Mustafa Patharia. All rights reserved.