S bd4a8b4397 Clean all watchOS references from scripts, docs, and source
Remove watchOS simulator targets, deploy functions, boot helpers,
icon generation, preflight checks, and test runner code from all
scripts. Update README, copilot instructions, and PlatformUi.swift.
Wear OS (Android) code is kept intact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 05:12:29 -06:00
2026-02-07 20:30:52 -06:00
2026-02-04 15:16:10 -06:00
2026-02-09 16:32:51 -06:00
2026-02-07 20:34:43 -06:00
2026-02-07 20:35:02 -06:00
2026-02-03 06:58:40 -06:00
2026-01-21 20:26:06 -06:00
2026-02-04 10:49:19 -06:00

IF Tracker

IF Tracker is a Kotlin Multiplatform Mobile (KMM) app for intermittent fasting tracking on Android (Jetpack Compose) and iOS (SwiftUI), with a companion app for Wear OS.

All user data is stored locally on-device (SQLite via SQLDelight). There is no backend.


Table of Contents

  1. Key Features
  2. Build & Run
  3. Testing
  4. Security Portfolio
  5. Development Guidelines
  6. Lessons Learned
  7. Specs, Scripts, Evidence
  8. License

Key Features

Tracking

  • Start/end fasts, notes
  • Edit history, pagination for large histories
  • Goals, streaks, analytics summaries

Import/Export

  • JSON backup export/import (with metadata)
  • Duplicate detection on restore/import (idempotent re-import)
  • Zero app import (JSON + ZIP)

Sync (local-only)

  • Local peer sync over LAN (NSD/Bonjour) using one-time codes

Notifications & Widgets

  • Daily + streak reminders and fast completion alarms
  • Android AppWidget + iOS WidgetKit widgets

Build & Run

Shared module

  • ./gradlew :shared:build

Android app

  • ./gradlew :androidApp:assembleDebug

Wear OS app

  • ./gradlew :wearApp:assembleDebug

iOS

  • Build/run from Xcode: iosApp/iosApp.xcodeproj

Deploy helpers


Testing

Single entry point

Evidence requirements

  • Never claim UI tests passed without real emulator/simulator execution.
  • Store outputs under test-logs/ with:
    • device/emulator identifier
    • pass/fail counts
    • (iOS) .xcresult artifacts when applicable

Preflight

  • Android/Wear: adb devices
  • iOS: xcrun simctl list devices | grep Booted

Security Portfolio

This project is local-only (no server, no accounts). Security focus is on local persistence, import/sync hardening, and safe logging.

Threat Model

  • Malicious or malformed import payloads (JSON/ZIP)
  • LAN adversary attempting sync-code guessing
  • Accidental data duplication on restore/re-import

Implemented Controls

Data at rest

  • SQLite stored locally with OS-level device encryption.

Local sync security

  • Encrypted payloads (AES-256-GCM)
  • Key derivation via PBKDF2-SHA256
  • One-time sync codes with rate limiting
  • Timing-safe comparisons for code checks

Import/export validation

  • Size limits and schema validation for JSON/ZIP
  • Duplicate detection using composite key (date, startTime, endTime)
  • Sanitized user-facing error messages

Logging

  • Avoid logging secrets / sync codes / sensitive payload fragments

Development Guidelines

Architecture

  • MVVM + Repository pattern
  • Result<T> for error handling
  • Validate all user inputs before persistence

Kotlin/Native to Swift Interop (Quick Reference)

Pattern Notes
Kotlin suspend Becomes completion handler in Swift (not async/await)
Kotlin Result<T> Opaque in Swift; extract via casting (as?) or bridge helpers
Kotlin class names Can appear with _ suffix in Swift (verify generated headers)
SQLDelight on iOS Ensure -lsqlite3 is linked

Import/Restore Duplicate Handling

Duplicate skipping uses a composite key derived from:

  • session date
  • start time
  • end time

This keeps imports idempotent (re-importing the same file should not endlessly duplicate history).


Lessons Learned

  • Large README changes should replace full intended ranges (avoid leaving duplicate sections).

  • Test status must be backed by emulator/simulator evidence in test-logs/.


Specs, Scripts, Evidence


License

Proprietary - All rights reserved.

Description
No description provided
Readme 19 MiB
Languages
Kotlin 67.7%
Swift 24.8%
Shell 6.9%
Python 0.4%
HTML 0.2%