|
| 1 | +--- |
| 2 | +title: CycleSyncAI | Personalized Health Plans Powered by Sonar API |
| 3 | +description: iOS app that delivers personalized diet and workout recommendations for women, powered by Apple HealthKit and Perplexity's Sonar Pro API. |
| 4 | +sidebar_position: 7 |
| 5 | +keywords: [CycleSyncAI, Sonar API, Perplexity, HealthKit, iOS, menstrual cycle, fitness, nutrition, LLM, AI, wellness, personalized, app] |
| 6 | +--- |
| 7 | + |
| 8 | +**CycleSyncAI** is an iOS app designed to provide personalized **diet and workout recommendations** tailored to a woman's **menstrual cycle phase**. |
| 9 | + |
| 10 | +By integrating menstrual data from Apple **HealthKit** and optional user profile inputs (age, weight, height, medical conditions, dietary restrictions, goals, and preferences), the app generates dynamic, phase-aware suggestions to support holistic wellness. |
| 11 | + |
| 12 | +Unlike static wellness tools, **CycleSyncAI** leverages **Perplexity's Sonar Pro API** to deliver **expert-informed**, LLM-generated guidance — including a daily grocery list and motivational feedback — customized to the user's cycle and lifestyle. |
| 13 | + |
| 14 | +## Problem & Solution |
| 15 | + |
| 16 | +> **Why it matters:** |
| 17 | +Most apps overlook the hormonal changes that affect women's fitness and nutrition needs across their cycle, leaving users with generic advice. |
| 18 | + |
| 19 | +**CycleSyncAI** bridges this gap by combining Apple HealthKit data with Sonar Pro's LLM to generate **adaptive, cycle-aware recommendations** for better health outcomes. |
| 20 | + |
| 21 | +## Features |
| 22 | + |
| 23 | +* **Personalized diet & workout suggestions** per cycle phase |
| 24 | +* Syncs with Apple HealthKit for real-time cycle tracking |
| 25 | +* User profile inputs for advanced personalization (age, goals, restrictions, etc.) |
| 26 | +* **Auto-generated daily grocery list** |
| 27 | +* Smooth, modern UI with gradients and subtle animations |
| 28 | +* **Motivational AI feedback** tailored to user preferences |
| 29 | +* Local data storage and private processing |
| 30 | + |
| 31 | +## Motivation |
| 32 | + |
| 33 | +> "I wanted a tailored regime for myself and couldn't find it all in one place." |
| 34 | +
|
| 35 | +**CycleSyncAI** was born from the need for a science-backed, easy-to-use app that adapts wellness guidance to women's natural hormonal rhythms, something missing in most mainstream fitness and nutrition platforms. |
| 36 | + |
| 37 | +## Repository Structure |
| 38 | + |
| 39 | +``` |
| 40 | +CycleSyncAI.xcodeproj → Xcode project file |
| 41 | +CycleSyncAI/ → Source code |
| 42 | +├── EatPlanViewController.swift → Diet plan generation & display |
| 43 | +├── WorkoutPlanViewController.swift → Workout plan generation & display |
| 44 | +├── HomepageViewController.swift → Navigation & main screen |
| 45 | +├── UserProfileViewController.swift → Input & storage of user data |
| 46 | +├── HealthManager.swift → Apple HealthKit menstrual data |
| 47 | +├── UserProfile.swift → Local profile model |
| 48 | +Main.storyboard → App UI & layout |
| 49 | +Assets.xcassets → Images & app icons |
| 50 | +Info.plist → Permissions & configurations |
| 51 | +``` |
| 52 | + |
| 53 | +## Setup Instructions |
| 54 | + |
| 55 | +1. Clone the repo |
| 56 | +2. Open in **Xcode** |
| 57 | +3. Ensure Apple HealthKit is enabled on your device |
| 58 | +4. Insert your **Sonar Pro API key** |
| 59 | +5. Run the app on a physical device (recommended) |
| 60 | + |
| 61 | +## Sonar API Usage |
| 62 | + |
| 63 | +The app sends structured prompts to the **Sonar Pro API** including: |
| 64 | + |
| 65 | +* Cycle phase (from HealthKit) |
| 66 | +* User profile info (age, weight, goals, etc.) |
| 67 | +* Meal preferences & restrictions |
| 68 | + |
| 69 | +In return, it receives: |
| 70 | + |
| 71 | +* **Personalized diet plan** |
| 72 | +* **Custom workout plan** |
| 73 | +* **Daily grocery list** |
| 74 | +* **Motivational feedback** |
| 75 | + |
| 76 | +These are parsed and rendered as styled HTML inside the app using WebViews. |
| 77 | + |
| 78 | +## Demo Video |
| 79 | + |
| 80 | +Watch the full app walkthrough here: https://www.youtube.com/watch?v=R558uRLNvUM&t=2s. |
| 81 | + |
| 82 | +> *Note: The LLM takes ~30–60 seconds per request. This wait time was trimmed in the video for brevity.* |
| 83 | +
|
| 84 | +## Impact |
| 85 | + |
| 86 | +**CycleSyncAI** empowers women to make informed, body-aware decisions in daily life. The app supports better: |
| 87 | + |
| 88 | +* Energy management |
| 89 | +* Fitness results |
| 90 | +* Mental well-being |
| 91 | +* Motivation and confidence |
| 92 | + |
| 93 | +It also reduces decision fatigue with automatically prepared grocery lists and uplifting guidance. |
| 94 | + |
| 95 | +## Links |
| 96 | + |
| 97 | +* [GitHub Repository](https://github.com/medhini98/cyclesyncai-api-cookbook) |
0 commit comments