Skip to content

About

limited version ML powered Gamified Habit Tracker for ssc 26

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Snabit - ML-Powered Habit Tracker

Snap the habit.

Built for the Apple Swift Student Challenge 2026.

Snabit is a gamified habit tracker that learns from your personal completion patterns to predict the best time to complete each habit, calculate streak risk in real time, and send smart notifications timed to when you're historically most likely to act.


Features

  • 🎯 Daily & Weekly Habits — Create habits with custom emoji, color, and goals
  • 🔥 Streak Tracking — Current and best streak with automatic calculation
  • 🎮 Gamification — Earn XP per completion with 7-day (+50 XP) and 30-day (+100 XP) streak bonuses
  • 🏆 Achievements — 6 unlockable milestone badges
  • 📊 Visual Analytics — GitHub-style yearly heatmap and weekly bar chart via Swift Charts
  • 🤖 ML Insights — On-device ML predictions for completion probability, best hour, streak risk, and weekly forecast
  • 🔔 Smart Notifications — Reminders timed to your personal completion history
  • 📝 Habit Notes — Journal entries with sentiment tracking per habit
  • ♿ Accessibility — VoiceOver support on core interactions and Dynamic Type via SwiftUI standard components
  • 🛡️ Local-First — Everything runs on device, no account required, no data leaves your phone

🤖 ML Approach

Snabit uses interpretable on-device statistical inference — no .mlmodel file, no network calls, no cold start problem:

  • Frequency Histogram — predicts your best completion hour from past patterns
  • Bayesian Inference with Laplace Smoothing — calculates daily completion probability per habit
  • Multi-Factor Risk Scoring — combines probability and time of day into a 0–3 streak risk level
  • Expected Value Calculation — forecasts weekly completions based on remaining days

🛠️ Tech Stack

Technology Usage
SwiftUI All UI
SwiftData On-device persistence
Swift Charts Heatmap and bar charts
UserNotifications Smart ML-timed reminders
Combine ObservableObject / @Published

📂 Project Structure

Snabit.swiftpm
├── SnabitApp.swift
├── Models/
│   ├── Habit.swift
│   └── Achievement.swift
├── Managers/
│   ├── GamificationManager.swift
│   ├── MLPredictionManager.swift
│   └── SmartNotificationManager.swift
└── Views/
    ├── Components/
    │   ├── HabitCardView.swift
    │   ├── HeatMapView.swift
    │   ├── ProgressChartView.swift
    │   └── ConfettiView.swift
    ├── HomeView.swift
    ├── StatsView.swift
    ├── AchievementsView.swift
    ├── ProfileView.swift
    ├── AddHabitView.swift
    ├── ManageHabitsView.swift
    ├── OnboardingView.swift
    └── ContentView.swift

🚀 Getting Started

  1. Clone the repo
  2. Open Snabit.swiftpm in Xcode 15+ or Swift Playgrounds 4.6+
  3. Run on an iOS 17+ simulator or device
  4. Follow the onboarding flow to create your first habit

📋 Requirements

  • iOS 17.0+
  • Xcode 15+ or Swift Playgrounds 4.6+

Built with ❤️ by Parth

About

limited version ML powered Gamified Habit Tracker for ssc 26

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages