lib/
├── core/
│ ├── constants/
│ │ └── app_constants.dart
│ ├── di/
│ │ └── injection_container.dart
│ ├── errors/
│ │ ├── exceptions.dart
│ │ └── failures.dart
│ └── theme/
│ └── app_theme.dart
├── data/
│ ├── datasources/
│ │ ├── api/
│ │ │ └── anthropic_api_client.dart
│ │ ├── local/
│ │ │ ├── database_helper.dart
│ │ │ ├── local_storage_service.dart
│ │ │ └── secure_storage_service.dart
│ │ └── ssh/
│ │ └── ssh_client_impl.dart
│ ├── repositories/
│ │ ├── provider_repository_impl.dart
│ │ ├── session_repository_impl.dart
│ │ ├── ssh_repository_impl.dart
│ │ └── tool_repository_impl.dart
│ └── tools/
│ ├── bash_tool.dart
│ ├── file_edit_tool.dart
│ ├── file_read_tool.dart
│ ├── file_write_tool.dart
│ ├── glob_tool.dart
│ └── grep_tool.dart
├── domain/
│ ├── entities/
│ │ ├── message.dart
│ │ ├── provider_config.dart
│ │ ├── session.dart
│ │ ├── ssh_config.dart
│ │ └── tool.dart
│ ├── repositories/
│ │ ├── provider_repository.dart
│ │ ├── session_repository.dart
│ │ ├── ssh_repository.dart
│ │ └── tool_repository.dart
│ └── usecases/
│ ├── provider/
│ │ ├── add_provider.dart
│ │ └── get_providers.dart
│ ├── session/
│ │ ├── create_session.dart
│ │ ├── load_session.dart
│ │ └── save_message.dart
│ ├── ssh/
│ │ ├── connect_ssh.dart
│ │ ├── disconnect_ssh.dart
│ │ └── execute_command.dart
│ └── tool/
│ └── execute_tool.dart
├── presentation/
│ ├── blocs/
│ │ ├── chat/
│ │ │ ├── chat_bloc.dart
│ │ │ ├── chat_event.dart
│ │ │ └── chat_state.dart
│ │ ├── connection/
│ │ │ ├── connection_bloc.dart
│ │ │ ├── connection_event.dart
│ │ │ └── connection_state.dart
│ │ └── provider/
│ │ ├── provider_bloc.dart
│ │ ├── provider_event.dart
│ │ └── provider_state.dart
│ ├── screens/
│ │ ├── chat/
│ │ │ └── chat_screen.dart
│ │ └── home/
│ │ └── home_screen.dart
│ └── widgets/
│ ├── chat_input.dart
│ ├── message_bubble.dart
│ └── tool_execution_indicator.dart
└── main.dart
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputsThis will generate:
*.freezed.dartfiles for immutable data classes*.g.dartfiles for JSON serialization
mkdir -p assets/images
mkdir -p assets/icons# Check for any issues
flutter analyze
# Run tests
flutter test
# Build for Android
flutter build apk --debug
# Build for iOS (macOS only)
flutter build ios --debug --no-codesign# Add your GitHub repository as remote
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
# Push to GitHub
git push -u origin mainThe workflow is already configured in .github/workflows/build.yml. It will:
- Run on push to
mainordevelopbranches - Install Flutter and dependencies
- Run code generation
- Run tests and analysis
- Build Android APK and AAB
- Build iOS app (no codesign)
- Upload artifacts
- ✅ Clean Architecture with 3 layers (Domain, Data, Presentation)
- ✅ BLoC pattern for state management
- ✅ Dependency injection with GetIt
- ✅ Repository pattern
- ✅ Use case pattern
- ✅ Entities: Message, Session, SSHConfig, ProviderConfig, Tool
- ✅ Repository interfaces
- ✅ Use cases for SSH, Session, Provider, Tool operations
- ✅ SSH client implementation with dartssh2
- ✅ SQLite database for sessions and messages
- ✅ Secure storage for credentials
- ✅ Local storage for settings
- ✅ Anthropic API client
- ✅ 6 core tools: Read, Write, Edit, Bash, Grep, Glob
- ✅ Modern dark theme (GitHub-inspired)
- ✅ Home screen with connection status
- ✅ Chat screen with message bubbles
- ✅ Tool execution indicators
- ✅ Chat input with send button
- ✅ BLoCs for Chat, Connection, Provider
- ✅ GitHub Actions workflow
- ✅ Automated builds for Android and iOS
- ✅ Test and analysis automation
- API Integration: Connect chat to Anthropic API for real responses
- SSH Connection Dialog: UI for entering SSH credentials
- Provider Management: Add/edit/delete AI providers
- Session List: Display and manage multiple sessions
- Tool Result Display: Better visualization of tool outputs
- File Browser: Browse remote file system
- Syntax Highlighting: Code blocks in messages
- Copy Code: Copy button for code blocks
- Session Search: Search through messages
- Settings Screen: App configuration
- Voice Input: Speech-to-text
- Export Sessions: Export as JSON/Markdown
- Themes: Light theme option
- Notifications: Background notifications
- Offline Mode: Queue messages when offline
- Code Generation Required: Run
flutter pub run build_runner buildbefore first run - API Integration Pending: Chat responses are simulated
- SSH Connection UI: Connection dialog not implemented yet
- Session Persistence: Session list not loading from database yet
- Zero installation on remote servers
- Direct command execution
- Full control over operations
- No server-side dependencies
- Separation of concerns
- Testability
- Maintainability
- Scalability
- Predictable state management
- Easy testing
- Clear separation of business logic
- Flutter community standard
- Immutable data classes
- Copy with functionality
- Union types
- Code generation reduces boilerplate
- SSH Connection Pooling: Reuse connections
- Message Pagination: Load messages in batches
- Tool Result Caching: Cache file reads
- Database Indexing: Indexes on session_id and timestamp
- Lazy Loading: Load sessions on demand
- Secure Storage: API keys and SSH credentials encrypted
- Shell Escaping: All SSH commands properly escaped
- Input Validation: Validate all user inputs
- Connection Timeout: Prevent hanging connections
- Error Handling: Don't expose sensitive info in errors
- Unit Tests: Test use cases and repositories
- Widget Tests: Test UI components
- Integration Tests: Test complete flows
- BLoC Tests: Test state transitions
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and analysis
- Submit a pull request
MIT License