Update CLAUDE.md with export layer docs and future roadmap

- Document Export layer (PDFGenerator, asset services)
- Add iOS 26 API notes (deprecated CLGeocoder, Swift 6 patterns)
- Add Documentation section pointing to docs/
- Expand Future Phases with market research findings (bucket list, group coordination, fan community)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-08 13:30:49 -06:00
parent eb0b9bc341
commit 2281440bf8

View File

@@ -42,6 +42,14 @@ This is an iOS app for planning multi-stop sports road trips. It uses **Clean MV
- `Models/Local/` - SwiftData models for local persistence (SavedTrip, UserPreferences)
- `Services/` - CloudKitService (schedules), LocationService (geocoding/routing)
4. **Export Layer** (`Export/`):
- `PDFGenerator` - Generates PDF trip itineraries with maps, photos, and attractions
- `ExportService` - Orchestrates PDF export with asset prefetching
- `Services/MapSnapshotService` - Generates static map images via MKMapSnapshotter
- `Services/RemoteImageService` - Downloads/caches team logos and stadium photos
- `Services/POISearchService` - Finds nearby restaurants, attractions via MKLocalSearch
- `Services/PDFAssetPrefetcher` - Parallel prefetching of all PDF assets
### Data Storage Strategy
- **CloudKit Public DB**: Read-only schedules, stadiums, teams (shared across all users)
@@ -62,6 +70,18 @@ TripCreationView → TripCreationViewModel → PlanningRequest
- All planning engine components are `actor` types for thread safety
- Domain models are pure Codable structs; SwiftData models wrap them via encoded `Data` fields
- CloudKit container ID: `iCloud.com.sportstime.app`
- `PDFGenerator` and `ExportService` are `@MainActor final class` (not actors) because they access MainActor-isolated UI properties and use UIKit drawing
### iOS 26 API Notes
**Deprecated APIs** (use with `@available(iOS, deprecated: 26.0)` annotation):
- `CLGeocoder` → Use `MKLocalSearch` with `.address` result type instead
- `MKPlacemark` properties (locality, administrativeArea, etc.) → Still work but deprecated; use `MKMapItem` properties where possible
- `MKMapItem.location` is non-optional in iOS 26 (returns `CLLocation`, not `CLLocation?`)
**Swift 6 Concurrency**:
- Use `@retroactive` for protocol conformances on types you don't own (e.g., `CLLocationCoordinate2D: @retroactive Codable`)
- When capturing `var` in `async let`, create immutable copies first to avoid Swift 6 warnings
## Key View Components
@@ -97,6 +117,11 @@ Displays trip itinerary with conflict detection for same-day games in different
`Scripts/scrape_schedules.py` scrapes NBA/MLB/NHL schedules from multiple sources (Basketball-Reference, Baseball-Reference, Hockey-Reference, official APIs) for cross-validation. See `Scripts/DATA_SOURCES.md` for source URLs and rate limits.
## Documentation
The `docs/` directory contains project documentation:
- `MARKET_RESEARCH.md` - Competitive analysis and feature recommendations based on sports travel app market research (January 2026)
## Test Suites
- **TripPlanningEngineTests** (50 tests) - Routing logic, must-see games, required destinations, EV charging, edge cases
@@ -121,6 +146,8 @@ xcodebuild -project SportsTime.xcodeproj -scheme SportsTime -destination 'platfo
## Future Phases
See `docs/MARKET_RESEARCH.md` for full competitive analysis and feature prioritization.
### Phase 2: AI-Powered Trip Planning
**Natural Language Trip Planning**
@@ -143,6 +170,37 @@ xcodebuild -project SportsTime.xcodeproj -scheme SportsTime -destination 'platfo
- Implement graceful fallback for unsupported devices
- See `axiom:axiom-foundation-models` skill for patterns
### Phase 3: Stadium Bucket List
**Progress Tracking**
- Visual map showing visited vs. remaining stadiums per league
- Digital passport/stamps for each visited stadium
- Achievement badges (e.g., "All NL West", "Coast to Coast", "10 Stadiums")
- Shareable progress cards for social media
**Competitors**: Baseball Bucket List, Sports Venue Tracker, MLB BallPark Pass-Port (physical)
### Phase 4: Group Trip Coordination
**Collaborative Planning**
- Invite friends to collaborate on trip planning
- Polling/voting on game choices and destinations
- Expense splitting integration
- Shared itinerary with real-time sync
- Role delegation (lodging, tickets, restaurants)
**Competitors**: SquadTrip, Troupe, Howbout
### Phase 5: Fan Community
**Social Features**
- Stadium tips from locals (best food, parking, pre-game bars)
- Fan meetup coordination for away games
- Trip reviews and ratings
- Discussion forums for specific stadiums
**Competitor**: Fantrip (fan-to-fan stays and local tips)
## User Instruction
Do not commit code without prompting the user first.