Skip to content

waz162/RecipeBox

Repository files navigation

Recippy

A native SwiftUI iOS app (project name RecipeBox) for capturing, parsing, cooking, and organizing recipes. Storage is local SwiftData with automatic iCloud (CloudKit) sync; recipe parsing runs fully on-device via Apple Foundation Models.

Features

Import from anywhere

  • Web links — reads schema.org Recipe JSON-LD instantly when present, otherwise extracts readable page text and structures it with on-device AI.
  • YouTube — pulls title, description, and caption transcript.
  • TikTok — pulls the caption via oEmbed, plus the full description and spoken subtitle track from the page.
  • Instagram — pulls the post/reel caption from page metadata and embedded JSON.
  • Share Extension — share a page or video straight from Safari/YouTube/TikTok/Instagram; the link is waiting in the import flow next time Recippy opens.
  • recippy:// deep linksrecippy://import?url=… opens the app with the import form prefilled.
  • Paste text / from scratch — paste any transcript or messy recipe for the model to structure, or start with a blank editor.
  • Duplicate detection — warns before re-importing a link you've already saved.

On-device AI (private by default)

  • Parsing with Foundation Models @Generable guided generation — no network round-trips, no API keys. Gracefully degrades to a heuristic parser, then to a manual editor prefilled with the raw text, when Apple Intelligence is unavailable.
  • Auto-tagging — tags, cuisine, and difficulty on import (optional) or on demand.
  • Transforms — turn a saved recipe into a new variation: vegetarian, vegan, healthier, halve the sugar, double it, or simplify for beginners. The original stays untouched.

Cook & shop

  • Cook Mode — full-screen step-by-step with progress, per-step photos and timers, an ingredients sheet, and keep-screen-awake. Resumes at the step you left off.
  • Step timers — set per-step durations in the editor; running timers keep counting by wall clock and fire a local notification if you leave the app.
  • Ingredient scaling — ½× to 4× with fraction-aware math ("1 ½ cups" stays friendly). The scale persists per recipe.
  • Ingredient checklist — tick off ingredients as you go; checkmarks persist until you reset them.
  • Shopping list — add a recipe's ingredients (at the current scale) to a grouped, check-off-able grocery list, plus hand-added items.

Organize & share

  • Browse — search by title, summary, tag, or ingredient; filter by tag/cuisine chips; favorites filter; five sort orders.
  • Full editor — every field, plus add/delete/reorder ingredients and steps, per-step photos and durations, and a multi-photo gallery with cover selection.
  • Export — share any recipe as formatted text from the detail view.
  • iCloud sync — recipes and the shopping list sync across devices automatically, with a transparent fallback to a local-only store (Settings shows which one you're on).
  • Tip jar — an optional StoreKit 2 thank-you.

Requirements

  • Xcode 26+
  • iOS 26 deployment target (Foundation Models requires iOS 26 + an Apple Intelligence-capable device or simulator)
  • A signed-in iCloud account + iCloud capability for sync (optional — the app runs local-only without it)

Project layout

RecipeBox/
├─ RecipeBox.xcodeproj
├─ Info.plist                     # App URL scheme (recippy://), merged at build
├─ ShareExtension-Info.plist      # NSExtension config for the share extension
├─ Products.storekit              # Local StoreKit config for the tip jar
├─ RecipeBox/
│  ├─ RecipeBoxApp.swift          # App entry, ModelContainer wiring
│  ├─ RecipeBox.entitlements      # CloudKit + push + App Group
│  ├─ Assets.xcassets             # App icon + accent color
│  ├─ Models/                     # SwiftData @Model types, drafts, persistence, quantity math
│  ├─ Parsing/                    # Foundation Models schema, parser, transforms, shared engine
│  ├─ Extractors/                 # Web / YouTube / TikTok / Instagram extractors + importer
│  ├─ Views/                      # List, detail, editor, cook mode, shopping list, settings
│  └─ Settings/                   # Settings keys, tip store, shared-import inbox
├─ RecipeBoxShare/                # Share extension (drops URLs in the App Group inbox)
└─ RecipeBoxTests/                # Unit tests (Swift Testing)

Architecture

Share sheet / recippy:// ──► App Group inbox ─┐
                                              ▼
Add Recipe (URL / paste / scratch)
        │
        ▼
  SourceDetector ─► Web / YouTube / TikTok / Instagram extractor
        │                         │
        │                  SourceContent (text [+ prebuilt draft])
        │                         ▼
        │                  RecipeParser (FoundationModels @Generable)
        │                  └─ fallback: HeuristicRecipeParser → raw text
        │                         ▼
        └───────────────►   RecipeDraft  ─►  RecipeEditorView (review/edit)
                                                   ▼
                                       SwiftData @Model + CloudKit sync
                                                   ▼
                              RecipeListView / RecipeDetailView / CookModeView
                                                   ▼
                                            ShoppingListView

Building & running

Open RecipeBox.xcodeproj in Xcode and run on an iOS 26 simulator or device.

From the command line (simulator, no signing required):

xcodebuild -project RecipeBox.xcodeproj -scheme RecipeBox \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  CODE_SIGNING_ALLOWED=NO build

Run the unit tests:

xcodebuild -project RecipeBox.xcodeproj -scheme RecipeBox \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  CODE_SIGNING_ALLOWED=NO test

Running on a physical device / enabling iCloud sync

  1. Open the project in Xcode → select the RecipeBox target → Signing & Capabilities.
  2. Choose your Team; Xcode will register the bundle id com.recipebox.app (change it if needed). Do the same for the RecipeBoxShare target (com.recipebox.app.share).
  3. Ensure the iCloud capability is enabled with CloudKit and a container such as iCloud.com.recipebox.app, and that both targets share the App Group group.com.recipebox.app.
  4. Build & run on a device signed into iCloud.

Foundation Models parsing requires a device/simulator with Apple Intelligence enabled. When it isn't available, importing still works: a built-in heuristic parser structures labeled captions, and otherwise the raw extracted text is dropped into the editor for you to shape by hand.

Notes / out of scope

  • Audio download + speech-to-text for videos lacking captions (relies on captions/description + manual paste).
  • Meal planning and recipe collections.

About

Recippy: Cookbook and Recipe Manager — SwiftUI + SwiftData with on-device AI import

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages