MacroScout is an iOS app for tracking daily calories and macros. Search foods from the USDA database, log what you eat, save favorites, and set personal nutrition goals, all in one place.
- Food Search: Search the USDA food database by name and view nutrition info
- Track Macros: Log food to track daily calories, protein, carbs, and fats
- Set Goals: Set daily targets for calories and each macro
- Favorites: Save foods for quick access and re-logging
- Custom Entry: Manually add a food with your own nutrition values
- Edit Foods: Update any saved food's name, values, or serving info
MacroScout/
Views/ # Screens (HomePage, FoodDBModal, FavoritesModal, etc.)
Components/ # Reusable UI pieces (NutrientCard, FoodItemCard, etc.)
Controller/ # State management (GoalsController, FoodController, etc.)
Models/ # SwiftData models (FoodItem, Goal, DailyProgress, Username)
Services/ # API and database logic (APIService, DatabaseService)
Configuration.swift # Environment-based config (API key, debug mode)
- SwiftUI: UI framework
- SwiftData: Local database
- USDA FoodData Central API: Food nutrition database
- Clone the repo and open the
.xcodeprojin Xcode - Add your USDA API key as an environment variable named
APIKeyin the scheme's Run settings - Build and run on a simulator or device running iOS 17+
Logging food Tap + on the home screen -> choose Custom Entry, Food Database, or Favorites -> add an item -> the home screen updates with your new totals.
Setting goals On first launch, a Goal Setup sheet appears automatically. Tap Edit Goal on the home screen anytime to update your targets.
Setting your name Tap the profile icon -> enter your name -> it appears as a greeting on the home screen.
Additional documentation is in the docs/ folder:
- Functions.md: Feature descriptions
- Interface.md: Screen-by-screen UI breakdown
- Interactions.md: User action -> app response map
- Scenarios.md: Step-by-step usage scenarios