Problem
Health data is easy to collect and hard to act on. Steps, workouts, sleep, meals, weight, hydration, and personal goals live in separate places, while the user still has to decide what to do today. Most tools either stop at tracking or produce advice without showing the evidence behind it.
What PrepAI Does
PrepAI is an iPhone-first wellness companion that combines Apple Health, manual records, goals, and a short check-in into one practical daily plan. It shows the source dates, personal baselines, strongest factors, confidence, and limitations behind its guidance. Users can adapt movement, log meals, plan a flexible week of food, track progress, and prepare a local summary for a clinician conversation.
PrepAI is for personal wellness planning. It does not diagnose, prescribe, provide injury clearance, or replace a qualified clinician.
Why This Matters
People should not have to surrender a sensitive health profile to get useful daily guidance. PrepAI keeps core records and reasoning on the device, works with incomplete data, and makes uncertainty visible. The result is a calmer path from "I have a lot of data" to "I know one realistic thing I can do today."
The Intelligence Loop
PrepAI is deliberately not a chat wrapper. Its daily plan travels through a bounded, inspectable pipeline:
- HealthKit and manual records are normalized into a versioned local SQLite database.
- TypeScript assembles a compact, bounded snapshot instead of exposing an unbounded health history to a model.
- An Expo Swift module serializes that snapshot across a C ABI into the Rust
prepai_health_coreengine. - Rust deterministically computes the readiness band, confidence, useful coverage, evidence factors, movement/meal/recovery actions, stable recommendation IDs, limitations, and safety notices.
- The result crosses back as schema-versioned JSON. TypeScript validates field types, ranges, dates, array sizes, and the requested mode before the UI may render it.
- If native execution or validation fails, PrepAI uses a deterministic TypeScript fallback. A broken model or bridge never gets to invent a health plan.
Optional local models sit after that authority boundary. An on-device Llama model may rewrite an already-approved structured result into natural language. Smart Scan combines local OCR and a local vision-language model to propose meal details from a camera or photo-library image, but the user must review the proposal before anything is saved.
Low-Level Engineering
- Rust through a real native boundary: Rust is packaged as an iOS static XCFramework with device and Apple-silicon simulator slices. Swift calls exported C functions with explicit pointer ownership; returned strings are released through the Rust
free_stringfunction. - Native inference, outside JavaScript: ExecuTorch is installed through JSI and runs behind Objective-C++/C++ host objects and native worker pools. Model bytes and large tensors stay out of Hermes. The checked artifacts prove XNNPACK for vision and OCR; PrepAI makes no unsupported GPU, Apple Neural Engine, or Core ML claim.
- Untrusted model bytes stay untrusted: Every remote model resource is pinned to an exact byte length and SHA-256 digest. A native file-integrity module streams the hash off the JavaScript thread before ExecuTorch can load the file.
- A defensive download state machine: Model acquisition requires explicit consent, an allowed network policy, and sufficient free storage. Concurrent requests for one resource are deduplicated; fresh resume state can be restored, expired signed-URL state is discarded, and failed integrity checks delete the artifact.
- Forward-only local persistence: SQLite migrations preserve durable records, enforce schema versions and foreign keys, and refuse to open a newer unsupported database rather than silently corrupting it.
- Privacy as a typed protocol: Optional diagnostics use a small exact-key event vocabulary. Unknown fields are rejected, batches are bounded, and health values, readiness, goals, free text, photos, prompts, routes, identity, and generated output are outside the protocol.
How We Used AI
PrepAI uses AI as a bounded specialist, not as the health authority. Models may perceive an image or explain an approved result; they cannot silently mutate health records, decide what counts as fact, or bypass deterministic safety logic. If a model is missing, declined, interrupted, or uncertain, PrepAI preserves the user's work and falls back to deterministic or manual paths.
Model downloads are consent-gated and integrity-checked. Health records, meal photos, prompts, and generated health content are not sent to PrepAI servers.
Where This Foundation Leads
The shipped product solves one daily decision. The architecture is designed to grow into a durable personal health graph that keeps observations, user-confirmed facts, inferences, recommendations, explanations, provenance, confidence, and corrections distinct. Over time, explicit feedback such as completed, adapted, helpful, ignored, or inappropriate can improve which evidence and actions fit the individual without turning a generative model into the source of truth. That longitudinal learning loop is the direction of the system, not a claim that online reinforcement learning ships in this submission.
How We Used Codex
Codex helped turn the product charter into a shippable release by tracing requirements through source, callers, tests, signed artifacts, provider state, physical-runtime evidence, and Store state as separate evidence lanes. It helped audit the TypeScript-to-Swift-to-C-to-Rust path, harden model download and integrity handling, repair shared data and navigation paths, add focused regression coverage, verify release identity, reconcile RevenueCat product and entitlement configuration, prepare App Store assets, and assemble the exact-source Shipaton demo and screenshot inventory. It also kept unsupported claims—such as unproven accelerator use, Android parity, traction, or shipped reinforcement learning—out of the submission.
Key Features
- Explainable Today Guidance with confidence, provenance, missing-data behavior, and one practical action.
- Movement plans with Start, Swap, Reduce, Complete, and clear non-medical limitations.
- Manual meal logging plus flexible seven-day meal, shopping, and prep planning.
- Smart Scan through camera or photo picker with local analysis and mandatory review.
- Progress tracking for meals, workouts, hydration, sleep, weight, and Apple Health data.
- Local Clinician Prep summaries with coverage, limitations, notes, and questions to discuss.
- Local export/import and deletion controls.
- A seven-day, no-payment local Plus trial that does not renew or charge automatically.
- A transparent $99.99 lifetime PrepAI Plus purchase and Restore flow powered by RevenueCat.
Architecture
- Expo SDK 57, React Native 0.86, Hermes, TypeScript, and Expo Router for the iPhone experience.
- SQLite for durable local records, forward migrations, and schema-versioned guidance persistence.
- HealthKit for permission-scoped Apple Health import and normalized local records.
- A Swift Expo module and C FFI boundary into the Rust deterministic guidance engine.
- JSI, Objective-C++, C++, and ExecuTorch for optional local Llama, vision-language, and OCR inference.
- A native streaming SHA-256 module plus a release manifest for model-asset integrity.
- RevenueCat for the
PrepAIProlifetime product,prepai Proentitlement,defaultoffering, and$rc_lifetimepackage. - A privacy-bounded Cloudflare Worker/D1 lane for explicitly consented sanitized diagnostics; health values, prompts, generated content, and photos are excluded.
Testing Instructions
- Install PrepAI from the public App Store link below on an iPhone running iOS 17 or later.
- Complete manual setup, or grant Apple Health access if you want to use your own Health data.
- Add a brief check-in and open Today to inspect the plan, confidence, factors, and limitations.
- Open Movement and try Start, Swap, and Reduce.
- Open Meals to log a meal or review the flexible seven-day planning surface.
- Open Plus in Settings. The local seven-day trial requires no payment and does not renew. The lifetime purchase uses RevenueCat; Restore is visible on the same screen.
- Open Clinician Prep to review what is included and the non-diagnostic limitation before export.
Judge access uses the no-payment local trial, so no promo code is required.
Public Demo Link
Public Repository Link
The production repository is private because the app contains proprietary safety, evaluation, and release infrastructure. A public repository is not required for the selected non-student categories.
App Store Link
https://apps.apple.com/us/app/prepai-health-tracker/id6782733134
Public version 1.0.0 was released on August 18, 2026. Version 1.0.1 Build 235 is separately waiting for App Review and is not required to install the public submission.
Built With
- cloudflare-workers
- d1
- executorch
- expo.io
- healthkit
- react-native
- revenuecat
- rust
- sqlite
- swift
- typescript


Log in or sign up for Devpost to join the conversation.