Skip to content

Latest commit

Β 

History

History
151 lines (121 loc) Β· 6.92 KB

File metadata and controls

151 lines (121 loc) Β· 6.92 KB

πŸš€ TaskFlow

TaskFlow is an iOS task and habit tracker built with SwiftUI, MVVM, and SwiftData. Single-user, offline-first - all data stays on the device.

Built with Cursor AI only. This projectβ€”from idea creation to the full codebaseβ€”was built entirely using Cursor AI; no manual coding was used. See CURSOR_AI_BUILD.md for the end-to-end workflow and prompts used so you can replicate the approach.

Requirements

  • Xcode 15+
  • iOS 17+
  • Swift 5.9+

πŸ“± Screen Shots:

✨ Features

βœ… Tasks

  • Add/Edit: Title (required), notes, due date/time, priority (Low / Medium / High), category, optional reminder (at due time or 5/15/30 min or 1 hr before), multiple tags
  • Filters: All, Today, Overdue, Completed; filter by category (toolbar menu)
  • Actions: Tap to view/edit, mark complete, delete; Save / Delete in edit screen
  • Reminders: Local notifications with snooze (15 min, 1 hour, tomorrow 9am)

πŸ“… Habits

  • Daily habits with β€œdone today” check-in and streak count
  • Repeat schedule: Choose which weekdays (e.g. Mon, Wed, Fri) or every day
  • Reminders: Optional daily reminder at a set time on scheduled days
  • Edit/Delete: Context menu on each habit row

πŸ—‚ Categories

  • Create, edit, delete (e.g. Work, Personal, Health)
  • Color and SF Symbol icon per category
  • One category per task

🏷 Tags

  • Optional tags on tasks (e.g. #urgent, #waiting); many-to-many, multi-select in task edit
  • Create new tags from the tag picker

πŸ“Š Insights

  • Today: Completed today, overdue, due today
  • This week: Completed count
  • Completed per day: Chart (last 14 days) via Swift Charts
  • By category: Productivity / completion rate per category

βš™οΈ Settings

  • Appearance: System / Light / Dark (persisted, app-wide)
  • About: App name, version, short description

πŸ–Œ UI

  • Tab bar: Tasks | Habits | Insights | Categories | Settings
  • Dark-style cards, FAB for new task, filter chips, category badges
  • Follows Apple HIG; theme in TaskFlowTheme

πŸ”€ UI flow (high level)

  • Tasks: Filter chips + category menu β†’ grouped list (Today β†’ Overdue β†’ Upcoming β†’ Completed) β†’ FAB + or tap row β†’ Task Edit (Title, Notes, Due, Category, Priority, Reminder, Tags β†’ Save/Delete).
  • Habits: List + + β†’ Add/Edit habit (name, weekday picker, reminder); context menu Edit/Delete on rows.
  • Insights: Today cards, week summary, completed-per-day chart, by-category list.
  • Categories: List + + β†’ Add/Edit (name, color, icon).
  • Settings: Appearance (System/Light/Dark), About.

For a visual mockup of all screens, open docs/TaskFlow_Mockup.html in a browser.

πŸ— Project structure

TaskFlow/
β”œβ”€β”€ TaskFlowApp.swift          # App entry, SwiftData container, RootView, AppDelegate
β”œβ”€β”€ ContentView.swift          # Tab view (Tasks, Habits, Insights, Categories, Settings)
β”œβ”€β”€ App/
β”‚   └── NotificationDelegate.swift   # Foreground presentation, snooze action handling
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ Task.swift
β”‚   β”œβ”€β”€ Category.swift
β”‚   β”œβ”€β”€ Priority.swift
β”‚   β”œβ”€β”€ Tag.swift
β”‚   β”œβ”€β”€ Habit.swift             # + HabitCheckIn
β”‚   └── HabitStreak.swift       # Streak / isDoneToday helpers
β”œβ”€β”€ ViewModels/
β”‚   β”œβ”€β”€ TaskFilter.swift
β”‚   β”œβ”€β”€ TaskListViewModel.swift
β”‚   β”œβ”€β”€ TaskEditViewModel.swift
β”‚   β”œβ”€β”€ CategoryListViewModel.swift
β”‚   β”œβ”€β”€ HabitListViewModel.swift
β”œβ”€β”€ Views/
β”‚   β”œβ”€β”€ TaskListView.swift
β”‚   β”œβ”€β”€ TaskRowView.swift
β”‚   β”œβ”€β”€ TaskEditView.swift
β”‚   β”œβ”€β”€ CategoryListView.swift
β”‚   β”œβ”€β”€ HabitListView.swift
β”‚   β”œβ”€β”€ HabitRowView.swift
β”‚   β”œβ”€β”€ HabitWeekdayPicker.swift
β”‚   β”œβ”€β”€ InsightsView.swift
β”‚   β”œβ”€β”€ SettingsView.swift
β”‚   └── TagsMultiSelectView.swift
β”œβ”€β”€ UI/
β”‚   β”œβ”€β”€ TaskFlowTheme.swift    # Colors, category badges, preset hexes
β”‚   └── FlowLayout.swift       # Wrapping layout for tag chips
β”œβ”€β”€ Services/
β”‚   └── NotificationService.swift   # Task/habit reminders, snooze, categories
β”œβ”€β”€ Assets.xcassets/
└── Info.plist

TaskFlowTests/
β”œβ”€β”€ TaskFlowTests.swift
└── TaskModelTests.swift

πŸš€ Build & run (simulator)

  1. Open TaskFlow.xcodeproj in Xcode.
  2. Select an iOS Simulator (e.g. iPhone 16 Pro).
  3. Choose the TaskFlow scheme.
  4. Press Run (⌘R).

Or use XcodeBuild MCP: set session defaults (project path TaskFlow.xcodeproj, scheme TaskFlow, simulator e.g. iPhone 16 Pro), then run build_run_sim.

πŸ§ͺ Tests

  • TaskFlowTests: Priority and TaskFilter unit tests.
  • TaskModelTests: Task isOverdue / isDueToday with in-memory SwiftData.

Run in Xcode: Product β†’ Test (⌘U).

πŸ“ Conventions

  • One type per file: One primary type per Swift file; filename matches type name (see .cursor/rules/one-type-per-file.mdc).
  • MARK comments: Sections use // MARK: - for navigation in the jump bar (Properties, Body, Subviews, Public Methods, etc.).
  • SwiftData: Task, Category, Tag, Habit, HabitCheckIn; task reminders and habit reminders scheduled via NotificationService.

πŸ“¦ Version

  • Version: 1.0
  • Bundle ID: com.taskflow.app