Initial commit: Captain Claude Mobile App
- Flutter app with chat and terminal screens - WebSocket integration for real-time chat - xterm integration for screen sessions - Markdown rendering with code blocks - JWT authentication Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
108
README.md
Normal file
108
README.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Captain Claude Mobile
|
||||
|
||||
App Android para interactuar con Captain Claude via chat y acceder a sesiones screen.
|
||||
|
||||
## Características
|
||||
|
||||
- Chat en tiempo real con Captain Claude via WebSocket
|
||||
- Renderizado de Markdown con syntax highlighting
|
||||
- Terminal interactiva para sesiones screen
|
||||
- Autenticación JWT
|
||||
- Tema oscuro
|
||||
|
||||
## Requisitos
|
||||
|
||||
- Flutter SDK >= 3.0.0
|
||||
- Android SDK
|
||||
- Backend API corriendo en `captain.tzzrarchitect.me`
|
||||
|
||||
## Instalación
|
||||
|
||||
```bash
|
||||
# Clonar repo
|
||||
git clone https://git.tzzr.net/tzzr/captain-mobile.git
|
||||
cd captain-mobile
|
||||
|
||||
# Instalar dependencias
|
||||
flutter pub get
|
||||
|
||||
# Ejecutar en debug
|
||||
flutter run
|
||||
|
||||
# Build APK release
|
||||
flutter build apk --release
|
||||
```
|
||||
|
||||
## Estructura
|
||||
|
||||
```
|
||||
lib/
|
||||
├── main.dart # Entry point
|
||||
├── config/
|
||||
│ └── api_config.dart # Configuración API
|
||||
├── models/
|
||||
│ ├── message.dart # Modelo de mensaje
|
||||
│ ├── session.dart # Modelo de sesión screen
|
||||
│ └── user.dart # Modelo de usuario
|
||||
├── services/
|
||||
│ ├── api_service.dart # Llamadas REST
|
||||
│ ├── auth_service.dart # Autenticación
|
||||
│ ├── chat_service.dart # WebSocket chat
|
||||
│ └── terminal_service.dart # WebSocket terminal
|
||||
├── providers/
|
||||
│ ├── auth_provider.dart # Estado autenticación
|
||||
│ └── chat_provider.dart # Estado chat
|
||||
├── screens/
|
||||
│ ├── login_screen.dart # Pantalla login
|
||||
│ ├── chat_screen.dart # Pantalla chat principal
|
||||
│ ├── sessions_screen.dart # Lista sesiones screen
|
||||
│ └── terminal_screen.dart # Terminal interactiva
|
||||
└── widgets/
|
||||
├── message_bubble.dart # Burbuja de mensaje
|
||||
├── code_block.dart # Bloque de código
|
||||
└── markdown_viewer.dart # Visor markdown
|
||||
```
|
||||
|
||||
## Backend API
|
||||
|
||||
El backend está en `apps/captain-mobile/` del repo captain-claude:
|
||||
|
||||
- `captain_api.py` - FastAPI con WebSocket
|
||||
- Puerto: 3030
|
||||
- Endpoints:
|
||||
- `POST /auth/login` - Autenticación
|
||||
- `GET /sessions` - Listar sesiones screen
|
||||
- `GET /history` - Historial conversaciones
|
||||
- `WS /ws/chat` - Chat con Captain
|
||||
- `WS /ws/terminal/{session}` - Terminal
|
||||
|
||||
## Configuración
|
||||
|
||||
Editar `lib/config/api_config.dart` para cambiar la URL del servidor:
|
||||
|
||||
```dart
|
||||
static const String baseUrl = 'https://captain.tzzrarchitect.me';
|
||||
static const String wsUrl = 'wss://captain.tzzrarchitect.me';
|
||||
```
|
||||
|
||||
## Credenciales por defecto
|
||||
|
||||
- Usuario: `captain`
|
||||
- Password: `tzzr2025`
|
||||
|
||||
## Desarrollo
|
||||
|
||||
### Backend
|
||||
```bash
|
||||
cd apps/captain-mobile
|
||||
./venv/bin/uvicorn captain_api:app --reload --port 3030
|
||||
```
|
||||
|
||||
### App
|
||||
```bash
|
||||
flutter run -d <device_id>
|
||||
```
|
||||
|
||||
## Licencia
|
||||
|
||||
Propietario - TZZR
|
||||
Reference in New Issue
Block a user