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