TradingAgents/TradingDummy
Cursor Agent f5e641fd1f Add SwiftData history tracking and parallel agent execution fixes
Co-authored-by: zjh08177 <zjh08177@gmail.com>
2025-07-04 00:06:47 +00:00
..
TradingDummy Add SwiftData history tracking and parallel agent execution fixes 2025-07-04 00:06:47 +00:00
TradingDummy.xcodeproj v0 iOS app 2025-07-01 23:10:44 -07:00
TradingDummyTests v0 iOS app 2025-07-01 23:10:44 -07:00
TradingDummyUITests v0 iOS app 2025-07-01 23:10:44 -07:00
README.md v0 iOS app 2025-07-01 23:10:44 -07:00

README.md

TradingDummy iOS App - Project Structure

Overview

The iOS app is now organized following MVVM architecture with clear separation of concerns.

Directory Structure

TradingDummy/
├── Configuration/
│   └── AppConfig.swift          # App-wide configuration (API URLs, timeouts)
├── Models/
│   └── AnalysisModels.swift     # Data models (Request/Response)
├── Services/
│   └── TradingAgentsService.swift # API service layer
├── ViewModels/
│   └── TradingAnalysisViewModel.swift # Business logic
├── Views/
│   ├── TradingAnalysisView.swift # Main view
│   ├── AnalysisResultView.swift  # Result display components
│   └── SupportingViews.swift     # Loading, Error, Welcome views
├── TradingDummyApp.swift         # App entry point
└── ContentView.swift             # Original demo view (can be removed)

Architecture

Models

  • AnalysisRequest: Request payload for API
  • AnalysisResponse: Response data structure with all analysis reports

Services

  • TradingAgentsService: Singleton service for API communication
  • APIError: Custom error types for better error handling

ViewModels

  • TradingAnalysisViewModel: Manages state and business logic
  • Uses @Published properties for SwiftUI binding
  • Handles async API calls with proper error handling

Views

  • TradingAnalysisView: Main screen with ticker input
  • AnalysisResultView: Displays analysis results with expandable cards
  • Supporting views for different states (loading, error, welcome)

Configuration

Development

  • API URL: http://localhost:8000
  • Timeout: 60 seconds

Production

  • Update AppConfig.swift with your production URL
  • Build with Release configuration

Usage

  1. Open TradingDummy.xcodeproj in Xcode
  2. Build and run (⌘+R)
  3. The app uses Xcode 16's file system synchronized groups - all Swift files are automatically included

Testing

  1. Ensure backend is running: cd backend && uv run python3 run_api.py
  2. Run the app in simulator
  3. Enter a ticker symbol and tap "Analyze"

Notes

  • All files in subdirectories are automatically included by Xcode 16
  • No need to manually add files to the project
  • The modular structure makes it easy to add new features or modify existing ones