A native iOS app for tracking contact lens replacement schedules. Stay on top of when to change your lenses with timers, reminders, and compliance stats.
- Circular progress indicator showing days remaining until lens replacement
- Color-coded status: blue (normal), orange (≤3 days), red (overdue)
- Quick actions to change or reset lenses
- Shortcut buttons for switching lens types (Daily, Bi-Weekly, Monthly)
- Store contact lens prescriptions with full optometry fields per eye (OD/OS)
- Sphere, Cylinder, Axis, Base Curve, Diameter, Add power
- Doctor/clinic info and expiration tracking
- Formatted display matching standard optometry notation
- Chronological log of all lens pairs worn
- Duration tracking with compliance color coding
- Active lens indicator
- Total pairs used
- Average wear duration
- On-time replacement rate
- Best consecutive compliance streak
- Day-before reminder
- Due-date alert
- Overdue warning
- Small widget with circular timer dial
- Medium widget with timer, type, and date info
- Lock screen widgets (circular, rectangular, and inline)
| Layer | Technology |
|---|---|
| UI | SwiftUI |
| Data | SwiftData |
| Architecture | MVVM with @Observable |
| Notifications | UserNotifications |
| Widgets | WidgetKit |
| Widget Sync | App Groups + UserDefaults |
No third-party dependencies — built entirely with Apple frameworks.
LensTracker/
├── LensTrackerApp.swift # App entry point
├── ContentView.swift # Main TabView
├── Models/
│ ├── LensRecord.swift # Lens wear data model
│ └── Prescription.swift # Prescription data model
├── ViewModels/
│ └── LensViewModel.swift # Core state management
├── Views/
│ ├── TimerView.swift # Active lens timer
│ ├── PrescriptionView.swift # Prescription list & add
│ ├── PrescriptionDetailView.swift
│ ├── HistoryView.swift # Past lens pairs
│ └── StatsView.swift # Usage statistics
├── Services/
│ ├── NotificationManager.swift # Push notifications
│ └── SharedDataManager.swift # Widget data sync
LensTrackerWidget/
├── LensTrackerWidget.swift # Widget definitions
└── LensTrackerWidgetBundle.swift # Widget bundle entry
- iOS 17.0+
- Xcode 15.0+
- Clone the repository
- Open
LensTracker.xcodeprojin Xcode - Build and run on a simulator or device
This project is for personal use.