This SwiftUI app features a chatbot that uses Apple HealthKit data
(steps, heart rate, energy, exercise, sleep) as context to answer health
questions using the DeepCoder 14B LLM via OpenRouter. A separate tab
displays clean charts with toggles to switch between metrics and weekly/monthly views.
Challenges & Solutions
Configuring Info.plist: Spent an hour trying to find the file... just for a 2-minute youtube video to call me stupid in 4 different languages
Swift & SwiftUI Basics: Learned concepts like struct, enum, and view files on the fly through youtube videos and chatgpt (lightwork)
Foundation vs. SwiftUI: Was confused on the difference between the two imports - realized a pattern and documentation confirmed it
Finding the Right LLM: I wanted a free LLM API (cuz why does everything cost money) so I searched until I landed on DeepCoder 14B which is free and reliable
Prompt Engineering: Wasn't getting the LLM responses I wanted until I designed prompts that included system behavior and health summaries
Chart Design: On the month toggle, was struggling to make the chart look nice and readable - performed a lot of trial and error changing up chart settings until I got it to look right
App Layout: Initially didn't understand how to configure the app - setting up an entry point and tabs - until I asked chatgpt to put everything into react terms (@main is like index.js)
Future Improvements
With more time, I’d expand the app by adding more tabs and features to make
it feel more complete. I’d also make insights proactive with notifications -
“Bro get up and go for a walk!” I’d explore using a more
advanced model with refined prompt engineering for smarter responses. Lastly,
adding metric summaries and a CSV export option would improve usability and let
users track their health data outside the app.