AllTime - Focus Tracker

A beautifully crafted iOS app that helps you understand how you spend your focused time across tasks — with rich, animated charts, intuitive period navigation, and polished UI details.

Highlights

  • Built with SwiftUI, SwiftData, and Swift Charts
  • Elegant design system with light/dark mode support
  • Animated, glanceable stats for day, week, month, and year
  • Task-level breakdown with proportional progress visuals
  • Smooth interactions, subtle transitions, and accessibility considerations

Features

Time Period Insights

  • Switch between periods: Daily, Weekly, Monthly, Yearly
  • Inline period selector with animated selection state
  • Context-aware header: "This Week's Focus", "This Month's Focus", etc.
  • Date range navigation with disabled forward navigation when at present

Interactive Charts

  • Adaptive chart granularity by period:
    • Daily: 4 blocks — 00–06, 06–12, 12–18, 18–24
    • Weekly: 7 days starting at week's beginning
    • Monthly: 4 labeled weeks (W1–W4)
    • Yearly: 12 months (Jan–Dec)
  • Smooth animations when period or date changes
  • Trailing Y-axis labels with minutes (e.g., "45m")
  • Subtle styling responsive to light/dark mode

Task Breakdown

  • Sorted task list for the selected period with:
    • Total focus/break times per task
    • Proportional pill progress bar relative to period total
    • Crisp gradient fills using each task's color
    • Subtle shine effect and rounded masks for visual polish
  • Sort options:
    • Highest/Lowest Focus
    • Most/Fewest Breaks
    • Alphabetical
  • Staggered list animations for delightful entrance

Polished UI & UX

  • Uses a cohesive Design System for typography, colors, and surfaces
  • Large navigation title and card-style sections
  • Gentle transitions and content transitions for numeric text
  • Reduced visual noise with focused affordances

Accessibility

  • Cards are accessible with descriptive labels (task name, focus, break)
  • Clear color contrast in both light and dark mode
  • Motion is tasteful and avoids excessive distraction

Screens / Sections

Stats

  • Header shows total focus time for the current period (e.g., "3h 20m")
  • Period selector: D / W / M / Y
  • Date range navigation with chevrons and dynamic label
  • Chart area: bar chart tuned to period granularity
  • Sort menu and task list with animated stat cards

Technical Details

Technologies

  • SwiftUI for UI and navigation
  • SwiftData for persistence and model queries
  • Swift Charts for data visualization
  • Design System abstraction for consistent styling

Notable Components

  • StatsView: The main screen for analytics and period navigation
  • TaskStatCard: A custom, animated card showing per-task focus/break time
  • ChartDataPoint: Lightweight model for chart rendering

Data & Queries

  • Uses @Query to fetch:
    • tasks: [Task]
    • sessions: [FocusSession] sorted by date descending
  • Filters sessions to the selected period using calendar logic
  • Aggregates focus time (and break time) per task and per period

Period & Date Logic

  • Daily: compares by day
  • Weekly: computes start of week; includes 7-day window
  • Monthly: compares by month granularity
  • Yearly: compares by year granularity
  • Helpers compute minutes across ranges/days/weeks/months

Animations & Transitions

  • Content transitions for numeric values
  • Ease-in/out animations when changing periods or offsets
  • Staggered animations for task list entrance
  • Smooth gradient and mask effects for the progress pillRetryClaude can make mistakes. Please double-check responses.