# Feels - Claude Code Context ## Project Summary Feels is an iOS mood tracking app. Users rate their day on a 5-point scale (Horrible → Great) and view patterns via Day, Month, and Year views. ## Architecture - **Pattern**: MVVM with SwiftUI - **Data**: Core Data with CloudKit sync - **Monetization**: StoreKit 2 subscriptions (30-day trial, monthly/yearly plans) ## Key Directories ``` Shared/ # Core app code (Models, Views, Persistence) FeelsWidget2/ # Widget extension Feels Watch App/ # watchOS companion docs/ # ASO and competitive analysis ``` ## Data Layer Core Data operations are split across files in `Shared/Persistence/`: - `Persistence.swift` - Core Data stack setup - `PersistenceGET.swift` - Fetch operations - `PersistenceADD.swift` - Create entries - `PersistenceUPDATE.swift` - Update operations - `PersistenceDELETE.swift` - Delete operations ## App Groups - **Production**: `group.com.88oakapps.ifeel` - **Debug**: `group.com.88oakapps.ifeelDebug` ## Build & Run ```bash # Build the app xcodebuild -project Feels.xcodeproj -scheme "Feels (iOS)" -destination 'platform=iOS Simulator,name=iPhone 16 Pro' build # Run tests xcodebuild -project Feels.xcodeproj -scheme "Feels (iOS)" -destination 'platform=iOS Simulator,name=iPhone 16 Pro' test ``` ## Mood Values ```swift enum Mood: Int { case horrible = 0 case bad = 1 case average = 2 case good = 3 case great = 4 case missing = 5 // Unfilled day case placeholder = 6 // System-generated } ``` ## Localization - English: `en.lproj/Localizable.strings` - Spanish: `es.lproj/Localizable.strings` ## Important Patterns 1. **Widgets** update via `WidgetCenter.shared.reloadAllTimelines()` 2. **Missing dates** are auto-filled by background task (`BGTask.swift`) 3. **Entry types** distinguish user entries from system-generated ones 4. **Customization** uses protocols: `Themeable`, `MoodTintable`, `MoodImagable`, `PersonalityPackable`