Skip to main content

ProAct

AI-powered migraine prediction that learns your patterns

ProAct screen 1
ProAct screen 2
ProAct screen 3
The Problem

ProAct

ProAct analyzes your biometric data — HRV, sleep, heart rate, environmental factors — and predicts migraine risk before symptoms start. Apple Intelligence runs on-device for newer iPhones; Claude handles predictions server-side for older devices.

iOS

Platform

Solo Developer

Role

My Role
iOS DevelopmentAI IntegrationBackend APIProduct Design
Process

From Idea to App Store

01

Research & Architecture

Designed a modular architecture to support 30+ features without tangling. Chose TCA for testability. Set up 8 Swift packages with strict dependency rules.

02

Health Data Pipeline

Built HealthKit integration for HRV, sleep, heart rate, and activity data. Implemented background sync for daily risk analysis even when the app isn't open.

03

Dual AI System

Built a prediction engine routing between Apple Intelligence (on-device for A17+ chips) and Claude (via Next.js backend) as fallback. Both share a unified system prompt with versioning.

04

Polish & Ship

Built subscription system with RevenueCat, added PostHog analytics, Sentry crash monitoring, and a demo mode. Shipped with 25+ API endpoints, JWT auth, and push notifications.

Key Features

Intelligence Meets Simplicity

01

AI-Powered Migraine Prediction

Analyzes your biometric data and generates a risk score for the next 48 hours. Apple Intelligence processes everything on-device for newer iPhones — zero data leaves your phone. Claude handles predictions server-side for older devices. Each prediction includes confidence score, contributing factors, and personalized recommendations.

AI-Powered Migraine Prediction
02

Daily Check-In & Attack Logging

A structured daily questionnaire that feeds the prediction model. Users log symptoms, triggers, medications, and relief methods after each migraine event. The system tracks patterns over time — which triggers correlate with attacks, which interventions actually work.

Daily Check-In & Attack Logging
03

Intervention Protocols

A curated library of evidence-based migraine intervention protocols. When the app detects elevated risk, it surfaces relevant protocols — hydration reminders, stress reduction techniques, medication timing suggestions. Practical steps to reduce the likelihood or severity of an attack before it hits.

Intervention Protocols
Technical Deep Dive

Under the Hood

Built With
SwiftUITCAHealthKitApple IntelligenceClaude APINext.jsSupabaseRevenueCatPostHogSentry
AppCoreMLCloudKit

Key Technical Decisions

Dual AI Architecture

Apple Intelligence runs entirely on-device for A17+ chips — zero network calls, complete privacy. Older devices fall back to Claude via Next.js. Both share a unified system prompt with version control, caching, and bundled fallback. The pipeline is model-agnostic.

TCA at Scale (31 Modules)

Chose TCA over MVVM for predictable state management across 31 feature modules. Each module maintains its own state, composing via parent reducers. ViewAction pattern provides compile-time safety. Steeper learning curve — worth it at this codebase size.

Anonymous Auth & Privacy

Three-layer auth — App Secret, Device JWT (30-day expiry), and CRON Secret. No email, no password, no personal identifiers. Supabase Row-Level Security isolates per device. HealthKit data processed locally — only anonymized summaries reach the prediction API.

Learnings

What I Learned

AI Prompts Are Product Decisions

The system prompt driving predictions isn't a technical artifact — it's the product. Small wording changes dramatically affect prediction confidence and user trust. I built a version-controlled prompt system in Supabase with rollback because iterating on prompts needs the same rigor as feature development.

Modular Architecture Pays Compound Interest

Setting up 8 Swift packages with strict dependency rules felt like overkill in week one. By month two, I was adding features in isolation without breaking anything. The investment paid for itself many times over — not just in code quality, but in development speed.

Health Data Is Messy, Users Are Messier

HealthKit provides clean APIs but dirty data. HRV varies between devices, sleep data has gaps, and users don't always wear their Watch. I built a data completeness scoring system that adjusts prediction confidence based on available data.

Next ProjectSee more projects →
FamilyQuest

FamilyQuest

Gamified family task management that kids actually want to use