How aaronroberson/datesnap-ios works
DateSnap is an iOS app for turning event-flyer screenshots into reviewed calendar events and reminders. The main workflow runs from the scan UI through photo/OCR and event understanding, then into event review and an explicit save to Apple Calendar, Reminders, and local notifications. Other product areas include saved-event/history management, subscription entitlements, and settings. The graph reflects documented wiring and source-index references; where unsampled code leaves a runtime handoff unclear, it omits that edge rather than assuming a pipeline.
Main entry points: ServiceContainer.swift Service container · ContentView.swift App shell · EventReviewViewModel.swift Review coordinator · DateSnap.swift DateSnap app
Components 26
App and screens
- DateSnap app
Sources/DateSnap/DateSnap.swift - App shell
Sources/DateSnap/ContentView.swift - Home and scan UI
Sources/DateSnap/Views/HomeEmptyStateView.swift - Event review UI
Sources/DateSnap/Views/EventReviewEditView.swift - History and saved events
Sources/DateSnap/Views/HistoryArchiveView.swift - Settings and help
Sources/DateSnap/Views/SettingsHubView.swift
Scanning and understanding
- Scan coordinator
Sources/DateSnap/ViewModels/ScanViewModel.swift - Home state
Sources/DateSnap/ViewModels/HomeViewModel.swift - Photo library
Sources/DateSnap/Services/PhotoLibraryService.swift - Image OCR
Sources/DateSnap/Services/OCRService.swift - Event extraction
Sources/DateSnap/Services/EventExtractionService.swift - Understanding pipeline
Sources/DateSnap/Services/Intelligence/EventUnderstandingPipeline.swift - Rule-based analysis
Sources/DateSnap/Services/Intelligence/RuleBasedEventAnalyzer.swift - Duration policy
Sources/DateSnap/Services/Intelligence/EventDurationPolicy.swift - On-device interpreter
Sources/DateSnap/Services/Intelligence/AppleFoundationModelInterpreter.swift
Event review and actions
- Review coordinator
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - Duplicate suggestions
Sources/DateSnap/Services/Advisors/EventSimilarityService.swift
Platform services and state
- Apple Calendar
Sources/DateSnap/Services/CalendarService.swift - Apple Reminders
Sources/DateSnap/Services/ReminderService.swift - Local notifications
Sources/DateSnap/Services/NotificationService.swift - Saved event store
Sources/DateSnap/Persistence/SwiftDataEntities.swift - App state
Sources/DateSnap/Models/AppState.swift - Service container
Sources/DateSnap/Services/ServiceContainer.swift
Plans and entitlements
- Subscriptions
Sources/DateSnap/Services/SubscriptionService.swift - Plan purchase UI
Sources/DateSnap/ViewModels/PurchaseViewModel.swift
Other components
- App user
Connections 36
- App user → App shell: uses
Sources/DateSnap/ContentView.swift - DateSnap app → App shell: shows
Sources/DateSnap/DateSnap.swift - DateSnap app → Service container: creates
Sources/DateSnap/DateSnap.swift - DateSnap app → Saved event store: configures
Sources/DateSnap/DateSnap.swift - App shell → Home and scan UI: shows
Sources/DateSnap/ContentView.swift - App shell → History and saved events: routes to
Sources/DateSnap/ContentView.swift - App shell → Settings and help: routes to
Sources/DateSnap/ContentView.swift - App shell → Home state: provides
Sources/DateSnap/ContentView.swift - App shell → Scan coordinator: provides
Sources/DateSnap/ContentView.swift - App shell → App state: shares
Sources/DateSnap/ContentView.swift - Home and scan UI → Scan coordinator: uses
Sources/DateSnap/Views/HomeEmptyStateView.swift - Home and scan UI → Home state: uses
Sources/DateSnap/Views/HomeEmptyStateView.swift - Scan coordinator → Service container: uses
Sources/DateSnap/ViewModels/ScanViewModel.swift - Home state → Service container: uses
Sources/DateSnap/ViewModels/HomeViewModel.swift - Service container → Photo library: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Image OCR: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Event extraction: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Understanding pipeline: configures
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Apple Calendar: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Apple Reminders: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Local notifications: constructs
Sources/DateSnap/Services/ServiceContainer.swift - Service container → Subscriptions: uses
Sources/DateSnap/Services/ServiceContainer.swift - Understanding pipeline → Rule-based analysis: analyzes with
Sources/DateSnap/Services/Intelligence/EventUnderstandingPipeline.swift - Understanding pipeline → On-device interpreter: may invoke
- Event extraction → Duration policy: uses
Sources/DateSnap/Services/EventExtractionService.swift - Rule-based analysis → Duration policy: uses
Sources/DateSnap/Services/Intelligence/RuleBasedEventAnalyzer.swift - Event review UI → Review coordinator: edits through
Sources/DateSnap/Views/EventReviewEditView.swift - Event review UI → Saved event store: reads and writes
Sources/DateSnap/Views/EventReviewEditView.swift - Review coordinator → Apple Calendar: commits to
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - Review coordinator → Apple Reminders: updates
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - Review coordinator → Local notifications: schedules
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - Review coordinator → Duplicate suggestions: finds duplicates
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - Review coordinator → Saved event store: saves drafts
Sources/DateSnap/ViewModels/EventReviewViewModel.swift - App shell → Event review UI: presents
Sources/DateSnap/ContentView.swift - App state → Subscriptions: binds tier
Sources/DateSnap/Models/AppState.swift - Plan purchase UI → Subscriptions: purchases