Skip to content

Add CycleSyncAI to Showcase: Personalized Wellness App Using Sonar API + HealthKit #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions docs/showcase/cycle-sync-ai.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: CycleSyncAI | Personalized Health Plans Powered by Sonar API
description: iOS app that delivers personalized diet and workout recommendations for women, powered by Apple HealthKit and Perplexity's Sonar Pro API.
sidebar_position: 7
keywords: [CycleSyncAI, Sonar API, Perplexity, HealthKit, iOS, menstrual cycle, fitness, nutrition, LLM, AI, wellness, personalized, app]
---

**CycleSyncAI** is an iOS app designed to provide personalized **diet and workout recommendations** tailored to a woman's **menstrual cycle phase**.

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.

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.

## Problem & Solution

> **Why it matters:**
Most apps overlook the hormonal changes that affect women's fitness and nutrition needs across their cycle, leaving users with generic advice.

**CycleSyncAI** bridges this gap by combining Apple HealthKit data with Sonar Pro's LLM to generate **adaptive, cycle-aware recommendations** for better health outcomes.

## Features

* **Personalized diet & workout suggestions** per cycle phase
* Syncs with Apple HealthKit for real-time cycle tracking
* User profile inputs for advanced personalization (age, goals, restrictions, etc.)
* **Auto-generated daily grocery list**
* Smooth, modern UI with gradients and subtle animations
* **Motivational AI feedback** tailored to user preferences
* Local data storage and private processing

## Motivation

> "I wanted a tailored regime for myself and couldn't find it all in one place."

**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.

## Repository Structure

```
CycleSyncAI.xcodeproj β†’ Xcode project file
CycleSyncAI/ β†’ Source code
β”œβ”€β”€ EatPlanViewController.swift β†’ Diet plan generation & display
β”œβ”€β”€ WorkoutPlanViewController.swift β†’ Workout plan generation & display
β”œβ”€β”€ HomepageViewController.swift β†’ Navigation & main screen
β”œβ”€β”€ UserProfileViewController.swift β†’ Input & storage of user data
β”œβ”€β”€ HealthManager.swift β†’ Apple HealthKit menstrual data
β”œβ”€β”€ UserProfile.swift β†’ Local profile model
Main.storyboard β†’ App UI & layout
Assets.xcassets β†’ Images & app icons
Info.plist β†’ Permissions & configurations
```

## Setup Instructions

1. Clone the repo
2. Open in **Xcode**
3. Ensure Apple HealthKit is enabled on your device
4. Insert your **Sonar Pro API key**
5. Run the app on a physical device (recommended)

## Sonar API Usage

The app sends structured prompts to the **Sonar Pro API** including:

* Cycle phase (from HealthKit)
* User profile info (age, weight, goals, etc.)
* Meal preferences & restrictions

In return, it receives:

* **Personalized diet plan**
* **Custom workout plan**
* **Daily grocery list**
* **Motivational feedback**

These are parsed and rendered as styled HTML inside the app using WebViews.

## Demo Video

Watch the full app walkthrough here: https://www.youtube.com/watch?v=R558uRLNvUM&t=2s.

> *Note: The LLM takes ~30–60 seconds per request. This wait time was trimmed in the video for brevity.*

## Impact

**CycleSyncAI** empowers women to make informed, body-aware decisions in daily life. The app supports better:

* Energy management
* Fitness results
* Mental well-being
* Motivation and confidence

It also reduces decision fatigue with automatically prepared grocery lists and uplifting guidance.

## Links

* [GitHub Repository](https://github.com/medhini98/cyclesyncai-api-cookbook)