# π¨ Torii GUI Vision
## Overview
Torii GUI serΓ‘ la interfaz visual para todas las funcionalidades del CLI, construida con **Tauri** para mΓ‘xima portabilidad y rendimiento.
## π Plataformas Soportadas
- **Desktop**: Windows, macOS, Linux
- **Mobile**: iOS, Android
- **Web**: Progressive Web App (PWA)
## π‘ Ventajas del Enfoque CLI-First
### β
Ya Tenemos Todo Implementado
El CLI ya tiene **todas** las funcionalidades core:
- β
GestiΓ³n multi-plataforma de repositorios
- β
Operaciones batch en mΓΊltiples plataformas
- β
Snapshots locales
- β
Mirroring automΓ‘tico
- β
Workflows personalizados
- β
Reescritura de historial
- β
IntegraciΓ³n con SSH
### π― El GUI Solo Necesita
1. **Llamar a los comandos CLI** - Ya funcionan perfectamente
2. **Mostrar resultados** - Parsear output JSON/texto
3. **Proveer UX visual** - Botones, formularios, grΓ‘ficos
4. **AΓ±adir visualizaciones** - Grafos de commits, timelines, etc.
## π¨ Mockups de Funcionalidades Clave
### 1. Dashboard Principal
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Torii [user@email.com] βοΈ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π Repositories Overview β
β ββββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ β
β β GitHub β GitLab β Codeberg β Gitea β β
β β 12 β 8 β 5 β 3 β β
β ββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ β
β β
β π Recent Activity β
β β’ my-project pushed to GitHub, GitLab β
β β’ snapshot created: pre-refactor β
β β’ mirror synced: backup-server β
β β
β β‘ Quick Actions β
β [+ New Repo] [πΈ Snapshot] [π Sync All] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### 2. Multi-Platform Repo Creation
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Create Repository on Multiple Platforms β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Repository Name: [my-awesome-project ] β
β Description: [An amazing tool for... ] β
β β
β π Select Platforms: β
β β GitHub β GitLab β Codeberg β
β β Gitea β Forgejo β Custom β
β β
β π Visibility: βͺ Public β« Private β
β β
β β Push code after creation β
β β Add as mirrors for auto-sync β
β β
β [Cancel] [Create on 3 βΌ] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### 3. Batch Operations Progress
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Creating 'my-project' on 3 platforms... β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π¦ GitHub β
Created β
β ββ https://github.com/user/my-project β
β β
β π¦ GitLab β³ Creating... β
β ββ [ββββββββββ] 80% β
β β
β π¦ Codeberg βΈοΈ Waiting... β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββ β
β Progress: 1/3 completed β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### 4. Visual Snapshot Manager
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β πΈ Snapshots [+ Create] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Timeline View: β
β β
β 2026-04-11 βββββββββββββ β
β β β ββ post-refactor β
β β ββββββββ pre-refactor β
β ββββββββββββββ initial-setup β
β β
β Selected: pre-refactor β
β βββββββββββββββββββββββββββββββββββββββββββββββ β
β β Created: 2026-04-11 10:30 β β
β β Files: 42 changed, 1,234 insertions β β
β β Message: "Before major refactoring" β β
β β β β
β β [Restore] [Compare] [Delete] β β
β βββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### 5. Mirror Sync Dashboard
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Mirrors & Sync Status β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Master: github.com/user/torii β
β β
β Mirrors: β
β ββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
GitLab Last sync: 2 min ago β β
β β β
Codeberg Last sync: 5 min ago β β
β β β οΈ Gitea Last sync: 2 hours ago β β
β β β Custom Failed: connection timeout β β
β ββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Auto-sync: β Enabled Interval: [30] minutes β
β β
β [Sync Now] [Add Mirror] [Configure] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### 6. Commit Graph Visualizer
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Commit History β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β main βββββββββββββββββ HEAD β
β \ \ β
β feature βββββββββ (merged) β
β β
β Filters: [All Branches βΌ] [Last 30 days βΌ] β
β β
β Recent Commits: β
β β Add multi-platform support 2 hours ago β
β β Fix compilation errors 3 hours ago β
β β Implement batch operations 5 hours ago β
β β
β [Rewrite History] [Clean] [Export] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
## π― Funcionalidades EspecΓficas del GUI
### Desktop
- **Drag & Drop** - Arrastrar archivos para commit
- **System Tray** - Notificaciones de sync
- **Keyboard Shortcuts** - Workflow rΓ‘pido
- **Multi-window** - MΓΊltiples repos abiertos
- **Terminal integrada** - Acceso directo al CLI
### Mobile
- **Quick Actions** - Crear repo, ver status
- **Push Notifications** - Alertas de sync/mirrors
- **QR Code** - Compartir repos fΓ‘cilmente
- **Offline Mode** - Ver snapshots sin conexiΓ³n
- **Biometric Auth** - Seguridad para tokens
## π οΈ Stack TecnolΓ³gico
### Frontend
- **Framework**: React + TypeScript
- **UI Library**: shadcn/ui + Tailwind CSS
- **Icons**: Lucide React
- **Charts**: Recharts / D3.js
- **State**: Zustand / Jotai
### Backend (Tauri)
- **Core**: Rust (ya tenemos todo el CLI)
- **IPC**: Tauri Commands
- **Storage**: SQLite para cache local
- **Updates**: Tauri Updater
## π± Ventajas del Enfoque
### 1. **Desarrollo RΓ‘pido**
```rust
// El CLI ya hace todo el trabajo pesado
#[tauri::command]
fn create_repo_multi_platform(name: String, platforms: Vec<String>) -> Result<String> {
// Simplemente llamamos al CLI existente
Command::new("torii")
.args(&["repo", &name, "--create", "--platforms", &platforms.join(",")])
.output()
}
```
### 2. **Consistencia Total**
- CLI y GUI usan **exactamente** la misma lΓ³gica
- Bugs arreglados en uno se arreglan en ambos
- Features nuevas disponibles inmediatamente
### 3. **Testing Simplificado**
- CLI ya estΓ‘ testeado
- GUI solo testea la capa visual
- E2E tests reutilizan comandos CLI
### 4. **Performance**
- Tauri es **extremadamente** ligero (~3MB)
- Rust backend = velocidad nativa
- Sin Electron = menos RAM
## π¨ Temas y PersonalizaciΓ³n
```typescript
// Tema oscuro/claro
const themes = {
light: {
primary: '#6366f1',
background: '#ffffff',
text: '#1f2937'
},
dark: {
primary: '#818cf8',
background: '#111827',
text: '#f9fafb'
},
torii: {
// Tema personalizado japonΓ©s
primary: '#dc2626',
accent: '#fbbf24',
background: '#0f172a'
}
}
```
## π Roadmap GUI
### Phase 1: MVP Desktop (Q2 2026)
- [ ] Dashboard principal
- [ ] GestiΓ³n bΓ‘sica de repos
- [ ] Operaciones multi-plataforma
- [ ] Snapshots visuales
### Phase 2: Advanced Features (Q3 2026)
- [ ] Commit graph visualizer
- [ ] Mirror sync dashboard
- [ ] Custom workflows editor
- [ ] Settings & preferences
### Phase 3: Mobile (Q4 2026)
- [ ] iOS app
- [ ] Android app
- [ ] Sync con desktop
- [ ] Push notifications
### Phase 4: Collaboration (Q1 2027)
- [ ] Team features
- [ ] Shared snapshots
- [ ] Real-time sync status
- [ ] Activity feed
## π‘ Killer Features del GUI
1. **Visual Multi-Platform Manager**
- Ver todos tus repos en todas las plataformas
- Crear/eliminar en batch con clicks
- Drag & drop para configurar mirrors
2. **Snapshot Timeline**
- LΓnea de tiempo visual de snapshots
- Preview de cambios antes de restaurar
- ComparaciΓ³n visual entre snapshots
3. **Smart Notifications**
- Alertas cuando mirrors se desincronicen
- Recordatorios de snapshots automΓ‘ticos
- Notificaciones de updates disponibles
4. **One-Click Workflows**
- Templates predefinidos
- Workflows personalizados visuales
- AutomatizaciΓ³n con GUI builder
## π― ConclusiΓ³n
El GUI de Torii serΓ‘ **increΓblemente fΓ‘cil de desarrollar** porque:
β
**Todo el backend ya existe** (CLI completo)
β
**Solo necesitamos la capa visual**
β
**Tauri hace el resto** (empaquetado, updates, etc.)
β
**Cross-platform automΓ‘tico**
β
**Performance nativo**
**EstimaciΓ³n**: Con el CLI ya completo, el MVP del GUI desktop se puede tener en **2-3 meses** de desarrollo. El mobile en otros **2-3 meses**.
---
*"CLI-first approach = GUI development on easy mode"* π