OnlyYou is a SwiftUI iPhone app for health tracking, AI-assisted analysis, and conversational logging. It combines HealthKit data, a structured daily log, photo and text capture, personalized AI chat, and multi-provider model support into one personal health companion.
This repository is source-available for noncommercial use. See LICENSE.
- Dashboard
- Reads HealthKit data into a compact, section-based health dashboard.
- Shows AI-generated daily tips informed by current metrics, time, and weather.
- Tracks overall and section health scores with history views.
- AI Report
- Generates a structured health report with section-level scoring and narrative analysis.
- Supports follow-up report chat grounded in the current report and the latest user context.
- Scan & Log
- Lets you describe meals, supplements, symptoms, activities, emotions, or events in natural language.
- Supports photo input for food, supplements, labels, and other health-related images.
- Proposes structured log changes with confirmation before saving.
- Keeps day-specific logs separate from longer-term personal context.
- Personalization
- Supports English and Simplified Chinese.
- Supports different AI avatars, conversation tones, themes, and AI providers.
- Persists user profile details and durable context for future chats.
- HealthKit-backed dashboard with collapsible sections
- AI-generated daily tips and reminders
- AI health report with follow-up chat
- Conversational Scan & Log with image support
- Nested daily logging for meals, foods, supplements, and nutrients
- Quick Log shortcuts for repeated items
- Trend and score history views
- User profile, persistent AI memory, and customizable AI tone
- Gemini, OpenAI, and Anthropic model support
OnlyYou/OnlyYouApp.swift- App entry point and tab wiring.
OnlyYou/ContentView.swift- Main health dashboard.
OnlyYou/HealthDashboardViewModel.swift- Dashboard orchestration and refresh flow.
OnlyYou/HealthKitService.swift- HealthKit reads and metric mapping.
OnlyYou/ReportView.swift- AI report UI and report chat.
OnlyYou/ReportViewModel.swift- Report generation, caching, and follow-up chat state.
OnlyYou/PhotoAnalysisView.swift- Scan & Log chat UI.
OnlyYou/PhotoAnalysisViewModel.swift- Scan & Log conversation, confirmation, and mutation logic.
OnlyYou/GeminiService.swift- Shared prompt building, provider transport, parsing, and structured AI output handling.
OnlyYou/CustomHealthStore.swift- Storage for user-created and AI-created log entries.
OnlyYou/DailyChatStore.swift- Daily log persistence and prompt-ready formatting.
OnlyYou/HealthMemoryStore.swift- Historical health snapshots for longitudinal context.
OnlyYou/HealthScoreStore.swift- Overall and section score history.
OnlyYou/UserProfile.swift- User profile and persistent personal context.
OnlyYou/SettingsView.swift- Theme, language, provider, model, profile, avatar, and tone settings.
- Xcode 15 or later
- iOS 17.0 deployment target
- iPhone or iOS Simulator
- HealthKit access for dashboard metrics
- At least one supported AI provider API key for AI features
- Open
OnlyYou.xcodeprojin Xcode. - Set your signing team and bundle identifier.
- Build and run on an iPhone or simulator.
- Grant HealthKit permissions when prompted.
- Open Settings and add an API key for Gemini, OpenAI, or Anthropic.
- Choose the active provider, model, language, avatar, and tone.
The app currently supports:
- Gemini
- OpenAI
- Anthropic
Prompt logic is shared at the app layer, while transport and response parsing are provider-specific.
- HealthKit data is read only after user authorization.
- Daily logs, profile data, and app preferences are stored locally on device.
- AI provider API keys are stored locally in the iOS keychain.
- Depending on the feature, prompts may include:
- current dashboard metrics
- today's log
- recent health history
- persistent user context
- current local time and weather
If you plan to ship this app or adapt it for real users, review the prompt payloads, retention behavior, and privacy posture for your own compliance requirements.
- OnlyYou is not a medical device.
- It is not a substitute for professional medical advice, diagnosis, or treatment.
- AI-generated suggestions and analyses should be treated as informational only.
This repository is available under a noncommercial source-available license. Commercial use is not permitted without separate written permission from the copyright holder.
See LICENSE for the full terms.