Overview of CodeAgents Mobile Architecture
mainCodeAgents is an iOS application designed to provide a mobile-optimized development experience by connecting to remote servers via SSH and integrating with the Claude Code CLI by Anthropic®.
Technology Stack
- Language: Swift 5.9+ (modern concurrency)
- UI Framework: SwiftUI with
@Observablemacro - Data Persistence: SwiftData (requires iOS 17+)
- SSH Library: SwiftNIO SSH
- Authentication: iOS Keychain Services
- Minimum iOS Version: iOS 17.0
- Architecture Pattern: MVVM with Protocol-Oriented Programming
High-Level Architecture
The app is organized into several distinct layers:
- UI Layer (SwiftUI): The visual interface.
- ViewModels (@Observable): Manages state and logic for the UI.
- Services Layer: Contains core logic for
SSHService,ClaudeService,FileService, andAuthService. - Data Layer (SwiftData): Handles persistence of projects, servers, messages, and keys.
- Security Layer (Keychain Services): Manages sensitive credentials.