← Back to work

Founder / Product Engineer

Habit AI

Private, on-device habit tracker and coach powered by Apple Intelligence.

iOSSwiftUIApple IntelligencePrivacy

Problem

Habit products usually fail in two places. First, streak systems punish imperfect days, so people quit after one miss. Second, "AI coach" features often mean your private routines leave the phone for a cloud model. Apple's own Foundation Models guidance is clear: for health, journaling, and personal patterns, on-device is the default, not an upsell. I wanted a Cognitain product I would keep using: honest progress, offline-first storage, and coaching that can truthfully say the prompt never left the device.

Approach

Habit AI is a SwiftUI iOS app. Tracking covers binary, quantity, timer, and scale habits. Streaks keep partial-progress credit (any logged value > 0 keeps the day alive), and consistency uses fractional completion against targets. That design matches how people actually live, not how leaderboards want them to behave. The Today surface combines a mood-aware mascot, daily score, streak tiles, optional supplements checklist, body measurements, and charts (ranking, weekly/monthly completion, heat maps, category balance). AI paths use Apple's Foundation Models framework: coaching summaries, natural-language habit creation via guided generation (@Generable), and activity-log summaries. Every AI call site gates on SystemLanguageModel availability and falls back to a rule-based InsightsGenerator when Apple Intelligence is off or unsupported. There is no server-side LLM path in the HabitTracker AI services. Auth is Sign in with Apple or Google for optional Firebase backup. Guest mode works without an account. StoreKit purchases require sign-in so entitlements stay linked. Marketing, privacy, subscription, and account-deletion pages live at https://www.cognitain.in/habit-ai so App Store Connect URLs match real product behavior.

Stack

SwiftUI · MVVM · Apple Foundation Models (on-device) · Firebase Auth + RTDB (optional sync) · StoreKit · WidgetKit · HealthKit (read-only where enabled) · Cognitain web (Next.js)

Outcome

A shippable privacy-first habit product with public marketing and legal surfaces, on-device AI that matches Apple's Foundation Models story, and an architecture where cloud is backup, not the brain.