Skip to content

leehomyc/OnlyYou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OnlyYou

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.

What OnlyYou Does

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

Key Features

  • 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

Screenshots


Dashboard
HealthKit metrics grouped into sections such as activity, heart, body, sleep, nutrition, and mindfulness, with an AI tip header and overall score.

AI Report
A structured AI health report with per-section scores, narrative analysis, and personalized recommendations.

Report Chat
Follow-up conversation on top of the current report, with suggested questions and provider-backed AI responses.

Scan & Log
A natural chat interface for logging meals, supplements, activities, symptoms, and other health context with confirmation before saving.

Food Photo Analysis
Food recognition with estimated nutrition and ingredient breakdown before the app proposes log updates.

Supplement Photo Analysis
Reads supplement names, dosage, and ingredient details from labels and can turn them into structured daily log entries.

Today's Log
A structured daily log that keeps confirmed entries visible and traceable, including nested food and nutrient details.

Quick Log
Frequently used shortcuts for rapid re-logging of common items and actions.

Theme and Personality
Theme color, dark mode, language, avatar, and conversation tone settings for the AI companion.

AI Provider Setup
Switch between Gemini, OpenAI, and Anthropic, and choose the model used by the app.

Personal Profile
Stores name, age, background, and durable user context so AI conversations stay grounded in who the user is.

Wellness Conversation
The AI can respond conversationally to stress, fatigue, or mood in addition to structured health logging.

Architecture Overview

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

Requirements

  • 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

Setup

  1. Open OnlyYou.xcodeproj in Xcode.
  2. Set your signing team and bundle identifier.
  3. Build and run on an iPhone or simulator.
  4. Grant HealthKit permissions when prompted.
  5. Open Settings and add an API key for Gemini, OpenAI, or Anthropic.
  6. Choose the active provider, model, language, avatar, and tone.

AI Providers

The app currently supports:

  • Gemini
  • OpenAI
  • Anthropic

Prompt logic is shared at the app layer, while transport and response parsing are provider-specific.

Data and Privacy

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

Product Notes

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

License

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.

About

A personal AI health companion for iOS. Features conversational meal scanning, sleep & activity tracking, proactive guidance, and empathetic emotional support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages