Home
About
Projects
Blog

TimeLog

A minimalist macOS application for freelance developers to track time, log tasks and generate invoices.

SwiftSwiftUICore DataPDFKitXcodemacOS

A macOS application designed for freelance developers to streamline time tracking, task logging, and invoicing. Built with Swift and SwiftUI in Xcode, this app prioritises a minimalist, aesthetic interface while providing essential tools for managing freelance work efficiently.

Features

  • Background Timer: Runs seamlessly in the background or as a menubar app, allowing uninterrupted tracking during coding or client calls.
  • Time Logging & Categorisation: Automatically logs time by project or client, with customisable tags for easy organisation.
  • Invoicing: Generates professional PDF invoices based on logged hours and client-specific rates, exportable via macOS share sheet.
  • Dashboard & Analytics: Displays total hours, earnings, and basic productivity insights in a clean, visual format using Swift Charts.
  • Offline Functionality: Fully operational without internet, with local storage for logs and invoices.
  • Aesthetic Design: Minimalist UI with dark/light mode support, frosted glass effects and native macOS styling.
  • Security: Encrypts sensitive data (e.g., client details) using Apple’s Keychain and Core Data encryption.
  • Notifications: Subtle alerts for starting/stopping the timer or reaching time milestones.

Implementation

The app is built using Swift and SwiftUI in Xcode, leveraging Apple’s native frameworks for a lightweight and performant experience. Core Data handles local storage of time logs, projects and client data, ensuring offline functionality. PDFKit generates clean, minimalist invoice PDFs. A menubar interface, implemented with NSStatusItem, provides quick access to timer controls and logs.

The timer uses a DispatchSourceTimer for precise, low-resource time tracking, persisted across app launches via Core Data. The dashboard uses SwiftUI’s Charts framework (macOS 14+) for simple visualisations. Security is enforced with Keychain Services for API tokens and Core Data encryption for sensitive data. Notifications are managed with UNUserNotificationCenter for non-intrusive alerts.

Challenges

  • Timer Accuracy: Ensured precise tracking during system sleep or app termination using DispatchSourceTimer and state restoration in Core Data.
  • Menubar Integration: Configured NSStatusItem to balance accessibility with a non-intrusive, minimalist design.
  • PDF Styling: Customised PDFKit output to match the app’s aesthetic while ensuring professional invoice layouts.
  • Accessibility: Added VoiceOver support and keyboard navigation, requiring careful SwiftUI configuration for full compliance.

Feasibility Testing Goals

  • Validate accurate time tracking across app launches and system sleep modes for 1–2 weeks.
  • Test offline functionality with 500+ log entries over 2–4 weeks.
  • Ensure UI remains responsive and aesthetic on macOS 13–15.

Scaling Up

  • Add iCloud syncing for cross-device access (e.g., iOS companion app).
  • Integrate with Google Calendar for task import via OAuth APIs.
  • Enhance analytics with machine learning to predict productivity trends or optimal work hours.
  • Support multiple simultaneous timers for concurrent projects.
  • Explore App Store distribution for broader reach.

Considerations for Scalability

  • Real-time syncing with external tools via Calendar APIs
  • Advanced analytics with Swift Charts or third-party tools like Grafana.
  • Automated backups to iCloud or Dropbox.

Implementation Details

The app uses SwiftUI for a declarative, responsive UI, with Core Data for persistent storage of logs, projects and clients. The menubar interface leverages NSStatusItem for quick access, while PDFKit handles invoice generation. Notifications are implemented with UNUserNotificationCenter for actionable alerts (e.g., “Stop Timer”).

Challenges Addressed

  • Ensured timer reliability during system sleep with persistent storage and state restoration logic.
  • Balanced minimalist design with functional depth by hiding advanced features in a settings panel.
  • Supported macOS accessibility features using SwiftUI’s accessibility modifiers.
  • Managed Core Data schema for efficient storage and future updates.

Share this project

Share: