A clean, native iOS habit tracker built with SwiftUI. Track daily habits, build streaks, and visualize your progress with a custom design system.
- Add and track daily habits with custom icons
- Visual progress ring showing today's completion rate
- Streak tracking with a 28-day heatmap view
- Swipe to delete, haptic feedback on completion
- Local persistence (no account or backend required)
- Custom design system (
HabitKit) for consistent colors, spacing, typography, and motion
- SwiftUI — declarative UI framework
- Combine (
ObservableObject,@Published) — state management - Swift Package —
HabitKit, a local design-system package providing reusable UI tokens and components (HKColor,HKSpacing,HKFont,HKProgressRing,HKStreakHeatmap, etc.) - JSON persistence — habits are saved to the app's documents directory, no external database
HabitFlow/
├── HabitFlow.xcodeproj
├── HabitFlow/
│ ├── HabitFlowApp.swift
│ ├── Models/
│ │ ├── Habit.swift
│ │ └── HabitStore.swift
│ └── Views/
│ ├── HabitListView.swift
│ ├── AddHabitView.swift
│ └── HabitDetailView.swift
└── HabitKit/
├── Package.swift
└── Sources/HabitKit/
├── DesignTokens.swift
├── HKPillButton.swift
├── HKProgressRing.swift
├── HKSegmentedPicker.swift
├── HKStreakHeatmap.swift
└── HKToggleChip.swift
HabitKit is linked as a local Swift package, sitting right next to HabitFlow.xcodeproj — that's why the folder layout above matters; moving HabitKit elsewhere will break the package reference.
- Clone the repo:
git clone https://github.com/beanscrazyxd/HabitFlow.git- Open
HabitFlow.xcodeprojin Xcode (26+ required — the project uses recent Xcode project features; opening with an older version may fail) - In Signing & Capabilities, set your own Team (the bundle identifier is a placeholder —
com.yourname.HabitFlow— change it if you plan to run on a physical device; the Simulator doesn't require signing) - Select a simulator or your device
- Build and run (⌘R)
No API keys, no backend setup, no external dependencies to install — it just runs.
I wanted a small, focused project to practice building a real SwiftUI app the way I'd want it done in production — not just a single-view demo. HabitFlow let me work through a few things I cared about getting right:
- Separating a design system from the app itself.
HabitKitis a local Swift package with its own colors, spacing, typography, and reusable components, so the app layer only ever talks in semantic tokens (HKColor.accent,HKSpacing.md) instead of hardcoded values. It's a small-scale version of how larger iOS teams structure design systems. - State management with Combine.
HabitStoreis the single source of truth for the app, using@Publishedproperties andObservableObjectto keep the UI reactive without needing an external state management library. - Practicing polish, not just function. Getting the list screen to actually feel native took more iteration than the logic did — card layouts, swipe actions, empty states, and haptic feedback all mattered more than I expected going in.
It's intentionally simple in scope (no backend, no accounts) so the focus stays on UI craft and app architecture rather than infrastructure.
MIT