Skip to content

GEM-312/ChefAcademy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pip the Chef Hedgehog

Pip's Kitchen Garden

A delightful iOS cooking game for kids aged 6+
Grow vegetables, cook recipes, and learn about nutrition with Pip the hedgehog!

Platform Swift SwiftUI SwiftData iOS Version


Meet Pip

Pip is your friendly hedgehog chef guide! With 8 adorable poses and walking/waving animations, Pip helps kids through every step of their cooking adventure.

Pip Got Idea    Pip Important    Pip Points Right    Pip Points Up Left    Pip Points Up Right    Pip Thinking    Pip Misses You    Pip Upset

Got Idea - Important - Points Right - Points Left - Points Up - Thinking - Misses You - Upset


Meet the Characters

Boy Chef Avatar      Girl Chef Avatar

Kids create their own chef character — 28 boy outfits + 15 girl outfits, with hijab, kippah, and turban options for inclusive representation


Game Loop

+-----------------------------------------------------------+
|                   PIP'S KITCHEN GARDEN                     |
|                                                            |
|    GROW           COOK            FEED                     |
|   ---------  ->  ---------  ->  ---------                  |
|   Garden         Kitchen        Body Buddy                 |
|   Mini-games     Mini-games     Nutrition Viz              |
|                                                            |
|                   REWARDS                                  |
|             Coins, Seeds, XP, Badges                       |
+-----------------------------------------------------------+

Features

Feature Description
Garden Plant, water, and harvest 27 types of vegetables with fun gestures
Kitchen Cook 17 recipes through 10 interactive mini-games (chop, stir, season, peel, crack eggs, and more!)
Farm Shop Buy pantry ingredients with earned coins
Body Buddy Track how food fuels your body with organ health rings
Play & Learn Mini-game hub with veggie match, nutrition quiz, and chop challenges
Seed Info Educational veggie pages with PencilKit coloring and fun facts
Multi-User Family system with up to 4 children per device, parent PIN protection
Sibling Visits Visit your sibling's garden, help with care, and gift veggies!
Game Center 4 leaderboards, 26 achievements, and real-time online multiplayer
Multiplayer Online Healthy Picks battle via Game Center matchmaking
Progression Earn coins, XP, badges, and unlock new recipes
Quests Daily challenges to keep kids engaged

Multi-User Family System

The app supports multiple players per device via a family profile system:

  • Family Setup - 8-step onboarding wizard for first launch
  • Profile Picker - "Who's playing today?" screen with child avatars
  • Parent PIN - Secure Keychain-stored PIN for parent access
  • Separate Progress - Each child has their own garden, recipes, coins, and stats
  • Parent Dashboard - View children's stats, play time, and manage profiles
  • Avatar Creator - Boy/girl character selection with head covering options

Sibling Garden Visits

Kids can visit each other's gardens from the Home screen:

  1. Tap a sibling's avatar on the Home screen
  2. View their profile (level, stats, harvested veggies, recipes cooked)
  3. Tap "Visit Garden" to see their real garden (read-only)
  4. Pip greets the visitor with a fun message
  5. Tap "Cool garden!" to leave a like that the garden owner collects

Cooking System

Multi-step cooking with 10 mini-game types:

Mini-Game Gesture Description
Chop Tap timing Chop veggies to the beat
Heat Pan Hold finger Heat the pan to the right temperature
Add to Pan Drag Drag ingredients into the pan
Stir Circular swipe Stir the pot with circular gestures
Season Tap sprinkle Season with taps
Peel Swipe down Peel veggies with swipe gestures
Cook Timer Green zone timing Stop the timer in the green zone
Wash Tap rapidly Wash veggies clean
Crack Egg Tap to crack Crack eggs into the bowl
Assemble Tap to plate Plate the final dish

Scoring: Each mini-game scores 0-100, averaged for star rating (85+ = 3 stars, 60-84 = 2 stars, <60 = 1 star).


Nutrition Integration

Inspired by Jessie Inchauste's ("Glucose Goddess") research:

  • 17 recipes across 4 categories: breakfast, lunch, dinner, snacks
  • Zero starch-centered meals - focused on veggie-forward nutrition
  • Glucose tips on recipes explaining blood sugar impact
  • Color-coded nutrition education in Seed Info (PencilKit coloring maps ink colors to nutrients)

Tab Structure

Tab Icon View Purpose
Home house.fill HomeView Main hub, sibling visits, quick actions
Garden leaf.fill GardenView Plant & harvest veggies (interactive map)
Shop cart.fill FarmTabView Pip walks to barn, then pantry shop
Kitchen fork.knife KitchenView Cook recipes (+ Recipe Book access)
Body figure.stand BodyBuddyView Organ health visualization
Play gamecontroller.fill PlayLearnView Mini-games hub

Style Guide

Color Palette

The visual style is inspired by vintage botanical watercolor illustrations with a warm, whimsical, handcrafted feel.

Primary Colors (Backgrounds)

Color Hex Usage
Cream #F5F0E1 Main backgrounds
Warm Cream #FAF6EB Lighter backgrounds
Parchment #EDE6D3 Cards, surfaces

Text Colors

Color Hex Usage
Dark Brown #5D4E37 Headlines, emphasis
Sepia #8B7355 Primary text
Light Sepia #A89880 Secondary text

Accent Colors

Color Hex Usage
Golden Wheat #C9A227 Buttons, highlights, rewards
Sage #6B7B5E Nature accents, success states
Soft Olive #8A9A7B Secondary accents
Terracotta #B87333 Warnings, heat indicators
Warm Khaki #C6BA8B Avatar styling, gradient accents

Typography

All fonts use SF Rounded (system) for a friendly, approachable feel.

Style Size Weight Usage
Large Title 34pt Bold Main screen titles
Title 28pt Semibold Section headers
Title 2 22pt Semibold Card titles
Headline 17pt Semibold Button text, emphasis
Body 17pt Regular Main content text
Caption 12pt Regular Labels, badges

Tech Stack

  • Language: Swift 5.9
  • UI Framework: SwiftUI
  • Persistence: SwiftData with iCloud CloudKit sync
  • Architecture: MVVM with ObservableObject + SwiftData @Model
  • Security: Keychain for parent PIN (iCloud Keychain sync)
  • Drawing: PencilKit (Seed Info coloring)
  • Voice: AVSpeechSynthesizer (Pip reads instructions aloud)
  • Nutrition API: USDA FoodData Central (real nutrient data with kid-friendly superpowers)
  • Weather: Apple WeatherKit (real weather affects garden growth)
  • AI Chat: Claude Haiku API (Pip answers kids' food questions)
  • Game Center: GameKit (leaderboards, achievements, real-time multiplayer)
  • Auth: Sign in with Apple (parent authentication)
  • Minimum iOS: 16.0
  • Target Devices: iPhone & iPad

Project Structure

ChefAcademy/
+-- ChefAcademyApp.swift        # App entry, MainTabView, HomeView, CustomTabBar
+-- GameState.swift              # Central game state, SwiftData load/save, auto-save
+-- AppTheme.swift               # Colors, fonts, spacing constants
|
+-- Models/
|   +-- PlayerData.swift         # @Model: coins, seeds, plots, pantry, health, likes
|   +-- UserProfile.swift        # @Model: name, role, gender, avatar, familyID
|   +-- FamilyProfile.swift      # @Model: familyID-based member queries
|   +-- SessionManager.swift     # Route state machine, profile CRUD, PIN, play time
|   +-- PINKeychain.swift        # Secure parent PIN via Keychain Services
|   +-- AvatarModel.swift        # Gender, outfit, head covering
|
+-- Garden/
|   +-- GardenView.swift         # Interactive garden map with plots + draggable Pip
|   +-- PlantingSheet.swift      # Seed selection sheet for planting
|   +-- SeedInfoView.swift       # Educational veggie pages + PencilKit coloring
|
+-- Kitchen/
|   +-- KitchenView.swift        # Interactive cooking scene + Recipe Book button
|   +-- CookingSessionView.swift # Multi-step cooking state machine
|   +-- CookingMiniGames.swift   # 9 mini-game views
|   +-- ChopMiniGame.swift       # Original chopping mini-game
|   +-- CookingCompletionView.swift # Post-cooking results
|
+-- Farm/
|   +-- FarmTabView.swift        # Walk transition -> shop
|   +-- FarmShopView.swift       # Grid shop for pantry items
|
+-- Recipes/
|   +-- RecipeCardExample.swift  # PantryItem enum, Recipe struct, GardenRecipes.all
|   +-- RecipeDetailView.swift   # Full-screen cookbook page
|
+-- Social/
|   +-- SiblingProfileView.swift # Sibling stats, visit garden, gift veggies
|   +-- SiblingGardenView.swift  # Garden visit with care help + rewards
|   +-- PipDialogView.swift      # Game-style dialog overlay with choices
|
+-- Multiplayer/
|   +-- MultiplayerManager.swift         # GameKit matchmaking, peer-to-peer messaging
|   +-- MultiplayerHealthyPicksView.swift # Online Healthy Picks battle
|   +-- GameCenterMatchmakerView.swift   # UIKit wrapper for GKMatchmakerViewController
|   +-- GameCenterService.swift          # Leaderboards, achievements, GKAccessPoint
|
+-- Body & Play/
|   +-- BodyBuddyView.swift      # Organ health rings visualization
|   +-- PlayLearnView.swift      # Mini-games hub (6 game cards)
|
+-- Family Setup/
|   +-- FamilySetupView.swift    # 8-step first-launch wizard
|   +-- ProfilePickerView.swift  # "Who's playing today?" screen
|   +-- AddChildFlowView.swift   # Add subsequent children
|   +-- ParentDashboardView.swift# Child stats, play time, manage profiles
|   +-- ParentPINEntryView.swift # PIN pad (setup + verify modes)
|   +-- ProfileView.swift        # Player profile stats and badges
|
+-- Onboarding/
|   +-- OnboardingView.swift     # Original onboarding flow
|   +-- AvatarCreatorView.swift  # Character creation (2 tabs: Outfit, Covering)
|
+-- Components/
|   +-- PipAnimations.swift      # Pip character poses + waving animation
|   +-- SceneEditor.swift        # Dev tool for positioning map items
|
+-- Assets.xcassets/
    +-- Pip/                     # Character images (6 poses + 15 walking frames)
    +-- AvatarCards/             # Boy (28 frames) + Girl (15 frames) animations
    +-- Backgrounds/             # Scene backgrounds (garden, kitchen, farm)
    +-- FarmItems/               # Pantry item images (farm_salt, farm_pepper, etc.)
    +-- Vegetables/              # 27 veggie/fruit/berry images

Getting Started

  1. Clone the repository

    git clone https://github.com/GEM-312/ChefAcademy.git
  2. Open in Xcode

    cd ChefAcademy
    open ChefAcademy.xcodeproj
  3. Build and run on simulator or device (iOS 16.0+)

    xcodebuild -scheme ChefAcademy -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build

Development Progress

Completed

  • Core game loop: Grow -> Cook -> Feed -> Rewards
  • Interactive garden with 27 plant types and plot management
  • Multi-step cooking system with 10 mini-game types
  • 17 veggie-forward recipes (breakfast, lunch, dinner, snacks)
  • Farm Shop with pantry items and coin economy
  • Multi-user family system with SwiftData + iCloud CloudKit prep
  • Parent PIN protection via Keychain
  • Avatar creator with gender + head covering options
  • Seed Info educational pages with PencilKit coloring
  • Sibling garden visits with Pip greeting and likes system
  • Body Buddy organ health visualization with animated rings
  • Play & Learn mini-games hub
  • Tab-based navigation (6 tabs: Home, Garden, Shop, Kitchen, Body, Play)
  • Landscape support with adaptive tab bar
  • PipDialogView game-style dialog system
  • Sign in with Apple (parent authentication)
  • Game Center integration with leaderboards and achievements
  • Real-time online multiplayer via GameKit
  • Veggie gifting between siblings

March 15, 2026 — New Features

  • PipVoice (AVSpeechSynthesizer) — Pip reads instructions aloud for age 6+ audience. SpeakerButton component on cooking steps, seed info, fun facts
  • USDA FoodData Central API — Real nutrition data for all 46 items. Kid-friendly superpowers ("Germ-fighting superpower!") and comparisons ("More Vitamin C than an orange!")
  • Plant Care System — Watering, weeding, and bug rescue states with random triggers. Care score affects harvest yield (+0 to +2 bonus)
  • Body Buddy Redesign — Big body figure with animated health orbs, cooked recipe cards, animated nutrient breakdown bars, USDA superpowers per organ
  • Recipe -> Body Buddy — Cooking recipes now updates organ health (Brain, Heart, Immune, Muscles, Bones, Energy, Eyes, Digestion, Skin)
  • Cooking Assets — Frying pan, empty plate, cracked egg images replace drawn shapes in mini-games
  • Style Consistency — Fixed 14 off-theme color violations across 11 files (all raw .red/.blue/.orange replaced with AppTheme)
  • WeatherKit Debug — Added comprehensive logging for JWT auth troubleshooting
  • Save/Load Logging — Replaced silent try? with do/catch for all SwiftData saves
  • Play Time Display — Shows days/hours/minutes on profile picker cards
  • Profile Refresh — ProfilePickerView now refreshes after adding a new child

April 5, 2026 — Game Center & Multiplayer

  • Game Center Service — Singleton with authentication, score reporting, achievement reporting, and GKAccessPoint (floating trophy bubble)
  • 4 Leaderboards — Healthy Picks High Score, Insulin Tetris High Score, Cooking Master (3-star count), Total Veggies Harvested
  • 26 Achievements — Harvest milestones (First Harvest → Master Gardener), Cooking (First Recipe → Master Chef), Healthy Picks, Insulin Tetris, Social (Helping Hand, Garden Angel, Generous Chef, Help Streak), Progression (Week/Month Streak, Coin Collector, Level 5/10), Garden (Full Garden, Plant Whisperer, Seed Scholar)
  • Real-Time Online Multiplayer — Game Center matchmaking for Healthy Picks battles between any players worldwide. Seeded RNG for deterministic food sequences, live opponent score bar, 3-2-1 countdown, VS lobby, win/lose/tie results
  • Multiplayer Connection Fix — Wait for expectedPlayerCount == 0 before data exchange (Apple's recommended pattern), safety timeout for unresponsive opponents
  • Veggie Gifting — Gift harvested veggies to siblings via GiftVeggieSheet, tracked with giftsGivenCount, triggers Generous Chef achievement
  • Sibling Help Achievements — Garden care actions (water/weed/debug) now report to Game Center (Helping Hand, Garden Angel, Help Streak)
  • ODR Image Fallback — Food bubbles fall back to emoji when On Demand Resources assets haven't downloaded yet

In Progress

  • Plant care interactions: watering can drag, weeding swipe, bug rescue tap
  • Singing to plants, composting, sunshade mechanics
  • HomeView player stats (veggies grown, recipes cooked)
  • Sibling kitchen visits
  • ElevenLabs custom Pip voice (real-time TTS via API)
  • TestFlight deployment (v2)

Architecture

┌─────────────────────────────────────────────┐
│                 SwiftUI Views                │
│  (HomeView, GardenView, KitchenView, etc.)  │
├─────────────────────────────────────────────┤
│              ViewModels / State               │
│  GameState    SessionManager    AvatarModel   │
├─────────────────────────────────────────────┤
│              Services Layer                   │
│  PipVoice  USDAFoodService  GardenWeather    │
│  PipAIService  CloudKeyManager               │
│  GameCenterService  MultiplayerManager       │
├─────────────────────────────────────────────┤
│           SwiftData + CloudKit                │
│  FamilyProfile  UserProfile  PlayerData      │
├─────────────────────────────────────────────┤
│           Apple Frameworks                    │
│  WeatherKit  PencilKit  AVFoundation         │
│  AuthenticationServices  GameKit             │
└─────────────────────────────────────────────┘

Key Technical Challenges Solved

Challenge Solution
SwiftData + CloudKit No @Relationship macros — UUID-based model linking, all properties with defaults
Codable backwards compatibility Custom init(from:) decoders so old saved data loads when new fields are added
USDA API response mismatch Unified accessors handle both flat (search) and nested (single-food) JSON formats
Silent data loss Replaced try? context.save() with do/catch logging to catch persistence failures
WeatherKit JWT auth Entitlements, provisioning profile regeneration, Apple server propagation handling
Kid-friendly nutrition USDA raw data (mg/IU) translated to superpowers ("Germ-fighting superpower!") via threshold logic
Game Center multiplayer Wait for expectedPlayerCount == 0 before data exchange; seeded RNG for deterministic gameplay; safety timeout for disconnected opponents
ODR image fallback Check UIImage(named:) at runtime and fall back to emoji when asset packs haven't downloaded

By the Numbers

Metric Count
Swift source files 84+
Lines of code ~20,000+
Image assets 285
Vegetables/fruits 27
Pantry items 19
Recipes 17
Mini-game types 10
API integrations 4 (USDA, Claude AI, WeatherKit, Game Center)
Game Center leaderboards 4
Game Center achievements 26
Body organ systems 9
Pip character poses 8 + walking + waving animations

Design Process

Phase 1: Research & Planning (January 2026)

  • Researched iOS Developer career requirements (Swift, SwiftUI, API integration, multi-user systems)
  • Studied nutritional science: Jessie Inchauste's "Glucose Goddess" methodology
  • Analyzed competitor apps: Cooking Mama, Toca Kitchen, Khan Academy Kids
  • Defined core loop: GROW → COOK → FEED → REWARDS

Phase 2: Core Build (February 2026)

  • Built garden system (8 plants → expanded to 27)
  • Created 10 cooking mini-games with gesture recognition
  • Implemented multi-user family system with SwiftData
  • Designed avatar creator with inclusive options (gender, head coverings)

Phase 3: Integration & Polish (March 2026)

  • Integrated 3 external APIs (USDA, Claude AI, WeatherKit)
  • Added plant care system (watering, weeding, bug rescue)
  • Redesigned Body Buddy with animated health visualization
  • Conducted and implemented external UX audit (shifted target age 8-12 → 6+)
  • Built PipVoice text-to-speech for accessibility
  • Enforced visual consistency via STYLES.md design system

Phase 4: Social & Multiplayer (March-April 2026)

  • Game Center integration: 4 leaderboards + 26 achievements with progressive tracking
  • Real-time online multiplayer Healthy Picks via GameKit peer-to-peer
  • Veggie gifting between siblings with achievement rewards
  • Sibling garden help (water, weed, debug) with coin/XP/seed rewards
  • Sandbox testing with dual-device Game Center matchmaking

Career Goal Alignment

My career goal is iOS Developer specializing in educational and family-focused apps. This project directly demonstrates:

Industry Requirement Project Evidence
SwiftUI proficiency 40+ views with complex state management, animations, gestures
API integration 3 production APIs with caching, error handling, and offline fallbacks
Data persistence SwiftData + CloudKit with multi-user architecture and schema migration
Security awareness Keychain PIN, API key protection, Sign in with Apple
UX / Accessibility Voice narration, inclusive design, UX audit implementation
Code quality Design system (STYLES.md), MVVM architecture, comprehensive documentation
Ship-ready mindset Real device testing, backwards compatibility, graceful error handling

Project Documentation

Document Purpose
CLAUDE.md Developer guide — architecture, conventions, key files
SKILLS.md Technical skills inventory + teacher-tutor learning mode
STYLES.md Visual consistency guide — colors, fonts, spacing, banned patterns
ASSETS.md Full asset inventory (285 images) + needed assets for new features
TEACHING.md iOS/Swift learning log — concepts explained through project code
UX_AUDIT_REPORT.md External UX evaluation and findings
UX_REDESIGN_PLAN.md Implementation plan for UX improvements

Credits

Developer: Marina Pollak Course: PROG-360A Project Studio, Columbia College Chicago Instructor: Janell Baxter Deadline: May 15, 2026

Nutrition Research:

  • Jessie Inchauste ("Glucose Goddess")
  • Glucose Revolution (2022)
  • The Glucose Goddess Method (2023)

AI Pair Programming: Claude Code (Anthropic) — used as a teaching tool and development accelerator


Pip Waving
Happy Cooking!

About

Pip's Kitchen Garden — A kid-friendly iOS game where children grow veggies, cook recipes through mini-games, and learn nutrition science with Pip the Hedgehog. Built with SwiftUI, SwiftData, CloudKit, WeatherKit, USDA FoodData Central API, and on-device AI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages