Most fitness trackers focus purely on physical metrics like steps or calories. I was inspired to build FitMind AI because I realized that our emotional state is the biggest factor in workout consistency. If you’re feeling "alone" or "tired," a high-intensity interval training (HIIT) session might feel impossible, but a walk or a stretch could be exactly what you need to stay active. How I Built ItI developed this prototype using SwiftUI for a native iOS experience.Logic Engine: I created a custom analyzeFeeling() function that parses user input to map emotions to specific health recommendations.Data Visualization: I integrated the Swift Charts framework to transform raw mood scores into a visual history.Architecture: The app uses a structured MoodEntry model to ensure data consistency across the session. What I LearnedI gained deep insights into State Management in SwiftUI, specifically how to use @State to create a reactive UI that updates instantly when the "AI" provides a suggestion. I also learned how to implement BarMark charts to provide users with immediate, actionable feedback on their emotional trends. Challenges FacedThe primary challenge was creating a logic flow that felt "smart" despite being a prototype. I had to balance simple keyword matching with a scoring system to quantify abstract feelings. For example, I assigned numerical values to moods to calculate the "Mood Score" $S$ for the graph:$$S = \sum_{i=1}^{n} \text{mood_weight}_i$$Ensuring the ScrollView handled the dynamic growth of the chart without breaking the layout required careful use of VStack spacing and frame constraints.
Log in or sign up for Devpost to join the conversation.