Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
aceeb72
feat(memory): UI Memoria + servicios fishermen/memory e integración e…
Cheewye Sep 29, 2025
861d848
feat(fishermen): UI y servicio geo + docs API completa (#3)
Cheewye Sep 29, 2025
9f53098
fix(deploy): build en react-app y rsync sin script (#4)
Cheewye Sep 29, 2025
4df2929
feat: App Pescadores con streaming+voz y backend AI (#7)
Cheewye Oct 15, 2025
ac40850
feat(hormigas): integración APIs reales + voz premium (#8)
Cheewye Oct 16, 2025
efc1cd2
fix(tts): usar stream=True en ElevenLabs según Codex P1
Cheewye Oct 16, 2025
bf9cd43
feat: primera versión de la app React (Pescadores stream + voz) (#6) …
Cheewye Oct 16, 2025
3d615e6
ci: add GitHub Actions for React build and FastAPI tests (#9)
Cheewye Oct 16, 2025
0e4d14e
chore/ci-fixes
Cheewye Oct 17, 2025
da9b186
feat: data integrations + GeoTIFF + CI (#11)
Cheewye Oct 20, 2025
c983e55
fix: consolidar workflow CI eliminando duplicados
Cheewye Oct 20, 2025
51892bb
fix: limpiar requirements.txt y agregar dependencias del sistema para…
Cheewye Oct 20, 2025
9762835
fix: corregir errores de TypeScript en frontend y consolidar workflow…
Cheewye Oct 20, 2025
4a87b51
fix: corregir llamadas a handleSend y handleSendMessage (eliminar seg…
Cheewye Oct 20, 2025
ddf16a8
fix: agregar dependencias de testing al frontend y corregir sintaxis …
Cheewye Oct 20, 2025
78e8236
feat: agregar gráficos y visualizaciones al dashboard de iURi Pescadores
Cheewye Oct 20, 2025
28e55e5
feat: integrar SQLite con dashboard de iURi Pescadores
Cheewye Oct 20, 2025
ab6bdaa
feat: integrar APIs reales (OpenWeather, NOAA, MarineTraffic, INMET, …
Cheewye Oct 20, 2025
ca85500
fix: corregir nombre de campo catch_kg en catch-history
Cheewye Oct 20, 2025
6126972
fix: actualizar package-lock.json con dependencias de testing
Cheewye Oct 20, 2025
69ec19a
fix: corregir interface CatchHistory para usar catch_kg
Cheewye Oct 20, 2025
6fc662d
chore: desactivar workflow de deploy temporalmente (no hay servidor c…
Cheewye Oct 20, 2025
d787f39
docs: agregar documentación y script de verificación para API keys
Cheewye Oct 20, 2025
e259ec5
feat: optimización e integración de módulos con SWARM
Cheewye Oct 20, 2025
f813de9
fix: corregir layout del dashboard - eliminar espacio vacío
Cheewye Oct 21, 2025
3dfaf73
feat: implementar visualización de timestamps en dashboard
Cheewye Oct 21, 2025
ac19987
feat: implementar sistema completo de logs de usuario
Cheewye Oct 21, 2025
b321a92
feat: implementar sistema completo de memoria del usuario
Cheewye Oct 21, 2025
1094d49
feat: agregar script de sincronización con M16
Cheewye Oct 21, 2025
0b6c57e
fix: corregir usuario en script de sincronización M16
Cheewye Oct 21, 2025
0b1f86b
fix: usar clave SSH iuri_m16_ed25519 para M16
Cheewye Oct 21, 2025
dd16742
feat: agregar script de actualización para M16
Cheewye Oct 21, 2025
34354c4
feat: completar tab de preferencias en memoria del usuario
Cheewye Oct 21, 2025
316e964
mensaje
Cheewye Oct 21, 2025
11e9621
feat: implementar sistema completo de autenticación
Cheewye Oct 21, 2025
1a35de3
feat: integrar user_id real y validaciones de seguridad
Cheewye Oct 21, 2025
cb1f7ce
feat: configuración centralizada de API y backend en M16
Cheewye Oct 21, 2025
db783f2
SECURITY: Remove leaked API keys and update .gitignore
Cheewye Oct 21, 2025
64dfafd
Update services to use centralized API config
Cheewye Oct 21, 2025
69ad537
test
Cheewye Oct 21, 2025
bc2d6be
chore: remove sensitive and temporary files from git tracking
Cheewye Oct 21, 2025
e5ed7b2
feat: Integración de APIs marinas reales (Open-Meteo, StormGlass, GFW…
Cheewye Oct 21, 2025
453160d
Merge branch 'main' of github.com:Cheewye/iuri-react-codex
Cheewye Oct 21, 2025
1dae62e
feat: Restaurar autocompletado de ubicaciones en Pesca Inteligente
Cheewye Oct 21, 2025
bf2dbcd
feat: ✅ Integración COMPLETA de APIs marinas REALES
Cheewye Oct 21, 2025
018b31c
feat: Restaurar autocompletado de ubicaciones en Pesca Inteligente
Cheewye Oct 21, 2025
853b3e0
feat: Pesca Inteligente con APIs oceanográficas reales + mapa interac…
Cheewye Oct 21, 2025
af910c0
docs: Investigación completa de GFW APIs + tests del cliente oficial
Cheewye Oct 21, 2025
7e9daf3
feat: Chat General - IA conversacional multi-modelo
Cheewye Oct 21, 2025
1aca9a9
feat: Reconocimiento de especies por cámara + Chat General
Cheewye Oct 21, 2025
995ea6f
fix: API URL automática para producción + deploy dual script
Cheewye Oct 21, 2025
a83f2d9
feat: PWA completa - instalable en celular
Cheewye Oct 21, 2025
2036213
feat: Modelo ML para reconocimiento de especies
Cheewye Oct 21, 2025
594e474
feat: Modelo ONNX entrenado y funcionando!
Cheewye Oct 21, 2025
2b51149
docs: Guía completa de entrenamiento ML + test image
Cheewye Oct 21, 2025
6a17e78
docs: Análisis del Editor 3D para reconocimiento de especies
Cheewye Oct 21, 2025
77a7070
docs: Resumen épico del día - TODO completado! 🎉
Cheewye Oct 21, 2025
acad0c7
feat: Preparación para integración del Editor 3D
Cheewye Oct 21, 2025
58d92d0
feat: Superficies paramétricas del Editor 3D integradas!
Cheewye Oct 21, 2025
a452701
feat: Integración completa de superficies paramétricas en ML!
Cheewye Oct 21, 2025
ce642e8
docs: Integración completa documentada - Sistema híbrido funcionando!
Cheewye Oct 21, 2025
bb53c0f
feat: ASCII ART CELEBRATION! 🎉
Cheewye Oct 21, 2025
67b87b7
feat: Integración completa Species 3D + GFW + Restauración APIs
Cheewye Oct 22, 2025
172a842
Rescue/sidebar (#12)
Cheewye Oct 22, 2025
7db7ed1
chore: remove node_modules from index, resolve .gitignore conflict, a…
Cheewye Oct 22, 2025
0d34563
docs: resumen completo del rescate quirúrgico exitoso
Cheewye Oct 22, 2025
d1e3f23
feat: GFW APIs completas (Vessels, Events, 4Wings) + Fishing API + Da…
Cheewye Oct 22, 2025
e9e22f0
docs: resumen completo del sistema operativo
Cheewye Oct 22, 2025
15afd54
feat: Security Pack completo - Guardian + Hardening + Hooks
Cheewye Oct 22, 2025
4066ba3
docs: resumen de seguridad implementada
Cheewye Oct 22, 2025
ad64142
feat: Rate Limiting + Nginx Production Config + DNS Setup
Cheewye Oct 22, 2025
5ab951f
docs: DNS setup guide + resumen sesión rescate
Cheewye Oct 22, 2025
f9d9601
feat: Production deployment ready - www.iuriapp.com + api.iuriapp.com
Cheewye Oct 23, 2025
6ed87b2
feat: Script de deploy simplificado
Cheewye Oct 23, 2025
6816f1b
feat: DNS monitor + DNS propagado ✅
Cheewye Oct 23, 2025
2f24101
docs: Mensaje de bienvenida - DNS listo 🎉
Cheewye Oct 23, 2025
a3332c9
feat: Deployment exitoso HTTP ✅
Cheewye Oct 23, 2025
fde87aa
feat: SSL/HTTPS activado ✅ - Sistema 100% operativo
Cheewye Oct 23, 2025
2056040
docs: Documentación completa + Login funcionando ✅ - Sesión épica cer…
Cheewye Oct 23, 2025
cb51993
feat: i18n 15 idiomas + Forensics Module (Marinha+GFW) v2.1.0
Cheewye Oct 24, 2025
08446a8
feat: i18n 15 idiomas + Forensics Module (Marinha+GFW) v2.1.0
Cheewye Oct 24, 2025
f046d89
feat: i18n completo (15 idiomas) + Tracking en tiempo real (AIS Strea…
Cheewye Oct 25, 2025
7334a5f
fix(ci): remover gfw-api-python-client incompatible con Python 3.10
Cheewye Oct 25, 2025
2afda96
fix(vessels): simplificar AIS Stream para siempre devolver barcos sim…
Cheewye Oct 25, 2025
15d97d6
feat(ais): activar WebSocket real de AIS Stream para tracking en tiem…
Cheewye Oct 25, 2025
e248623
fix(ais): corregir startup event (usar print en lugar de logger)
Cheewye Oct 25, 2025
eedce57
feat(ais): ACTIVAR WebSocket REAL de AIS Stream
Cheewye Oct 25, 2025
d5d7296
fix(ais): usar lifespan en lugar de on_event (FIX DEFINITIVO)
Cheewye Oct 25, 2025
8d51810
feat(ais): agregar logs detallados para debugging WebSocket
Cheewye Oct 25, 2025
b7b380c
fix(ais): parseo correcto según ejemplo oficial de AIS Stream
Cheewye Oct 25, 2025
b678db5
feat(ais): endpoint de status + logs mejorados para debugging
Cheewye Oct 25, 2025
722e72a
test(ais): agregar tests completos para AIS Stream
Cheewye Oct 25, 2025
8860636
feat(ais): script de verificación manual en vivo
Cheewye Oct 25, 2025
330079f
docs(ais): documentación completa de implementación y troubleshooting
Cheewye Oct 25, 2025
43afe63
docs: actualizar resumen de sesión con AIS Stream funcionando
Cheewye Oct 25, 2025
0568a6c
docs: agregar guía 'CUANDO_VUELVAS' para el usuario
Cheewye Oct 25, 2025
7c14040
fix(gfw): agregar función get_gfw_client faltante
Cheewye Oct 25, 2025
5d57cbe
chore(ci): remove pip cache on setup-python when no dependency file (…
Cheewye Oct 25, 2025
426227f
feat(maps): aumentar radio por defecto de 500km a 2000km
Cheewye Oct 26, 2025
b8e7479
feat: agregar script de inicio backend local y documentación PMAP-RJ
Cheewye Oct 26, 2025
0f6fcd3
docs: agregar guía de backend local
Cheewye Oct 26, 2025
4c077b3
docs: agregar documentación completa de integración BNDO/CHM
Cheewye Oct 26, 2025
6cc7f54
feat: implementar integración PNBOIA completa
Cheewye Oct 26, 2025
4954629
docs: agregar resumen completo de sesión PNBOIA/CHM
Cheewye Oct 26, 2025
f923d64
feat(frontend): agregar componente PnboiaLayer para mostrar boyas en …
Cheewye Oct 26, 2025
52eee9a
feat(maps): integrar boyas PNBOIA en mapa principal
Cheewye Oct 26, 2025
2007d8e
docs: documentar opciones para integración PNBOIA con datos reales
Cheewye Oct 26, 2025
20d090a
feat: integrar NOAA/Open-Meteo para datos reales en PNBOIA
Cheewye Oct 26, 2025
b32096e
fix: corregir integración Ollama en Chat General
Cheewye Oct 26, 2025
52e0bd5
feat: agregar API Ollama completa para LocalAIChat
Cheewye Oct 26, 2025
771c674
feat: agregar Unified AI API para IA Unificada
Cheewye Oct 26, 2025
bd95463
docs: agregar documentación completa del Sidebar para GPT/DeepSeek
Cheewye Oct 26, 2025
fa8fb51
feat: agregar SidebarEnhanced (versión híbrida GPT+DeepSeek)
Cheewye Oct 26, 2025
a311670
test: habilitar SidebarEnhanced en localhost para testing
Cheewye Oct 26, 2025
7d1365d
feat: agregar SidebarResponsivePWA - versión mobile-friendly
Cheewye Oct 26, 2025
da5e46f
test: habilitar SidebarResponsivePWA para testing en móvil
Cheewye Oct 26, 2025
f98dcd3
fix: cambiar a SidebarEnhanced (secciones colapsables funcionando)
Cheewye Oct 26, 2025
79f7833
fix(sidebar): responsive sidebar with mobile drawer pattern
Cheewye Oct 26, 2025
ff82f38
fix(sidebar): add mobile header to prevent content overlap
Cheewye Oct 26, 2025
8006e69
fix(pwa): update service worker cache version to v2
Cheewye Oct 26, 2025
f0905f5
feat(header): add user controls to mobile header
Cheewye Oct 26, 2025
eec5242
fix(header): prevent horizontal scroll in mobile header
Cheewye Oct 26, 2025
8835af0
feat(header): replace app name with fish icon in mobile header
Cheewye Oct 26, 2025
40ca204
refactor(header): move branding from sidebar to headers
Cheewye Oct 26, 2025
cc5f6c7
feat(header): add app name with i18n to mobile header
Cheewye Oct 26, 2025
76ce13f
fix(header): align user controls to the right in mobile header
Cheewye Oct 26, 2025
65b2d46
fix(layout): restore desktop header by fixing mobile breakpoint
Cheewye Oct 26, 2025
9a89ebb
feat(ui): implement comprehensive device detection system
Cheewye Oct 26, 2025
c9bfc31
feat(ui): add device detection indicator in development mode
Cheewye Oct 26, 2025
c37914a
fix(layout): restore desktop layout functionality
Cheewye Oct 26, 2025
81ddf8b
docs: add comprehensive device detection architecture documentation
Cheewye Oct 26, 2025
854e772
fix(header): reduce desktop header height and make it more compact
Cheewye Oct 26, 2025
8f13049
fix(pwa): update service worker to v3 to force cache refresh
Cheewye Oct 26, 2025
e122158
fix(ui): hide device indicator in production
Cheewye Oct 26, 2025
24d0df9
fix(header): use flex auto-height instead of fixed height
Cheewye Oct 26, 2025
c49f1f4
fix(header): force auto height with inline styles
Cheewye Oct 26, 2025
6e57f3a
docs: add comprehensive problem description for DeepSeek
Cheewye Oct 26, 2025
1c7a6a5
fix: implement compact header solution from DeepSeek
Cheewye Oct 26, 2025
5ab6000
docs: add solution applied summary for compact header
Cheewye Oct 26, 2025
60be3fd
fix: hide PNBOIA errors when endpoint returns 404
Cheewye Oct 26, 2025
2038cf0
fix: implement aggressive header compact solution
Cheewye Oct 26, 2025
256e852
fix: implement extreme header compact solution v5
Cheewye Oct 26, 2025
30b431c
fix: remove duplicate mobile header causing extra height
Cheewye Oct 26, 2025
4001264
refactor(layout): separate mobile and desktop layouts to prevent inte…
Cheewye Oct 26, 2025
eb951f1
fix: restore header compact solution - space issue resolved
Cheewye Oct 26, 2025
48c937e
fix: restore MainLayout to clean version without Device Indicator or …
Cheewye Oct 26, 2025
6e29ea2
feat: implement unified typography system and compact header
Cheewye Oct 26, 2025
73ad4ef
feat: implement GitHub-style typography system (14px + 16px only)
Cheewye Oct 26, 2025
447082a
fix: typography system v6 - force cache clear
Cheewye Oct 26, 2025
d957593
feat: unify icon sizes across application
Cheewye Oct 26, 2025
5c13a57
chore: bump Service Worker to v7 for cache clear
Cheewye Oct 26, 2025
282347f
fix: unify Dashboard icon sizes to h-4 w-4 (16px)
Cheewye Oct 26, 2025
d5b4adb
feat: complete modular device routing architecture - ready for iURi M…
Cheewye Oct 26, 2025
5dde4c1
feat: implement iURi Marine Gateway with WebSocket and NMEA support
Cheewye Oct 26, 2025
3c918ef
feat: implement complete TabletLayout with portrait/landscape detection
Cheewye Oct 26, 2025
a16d8a1
feat: complete iURi Marine Gateway frontend components
Cheewye Oct 26, 2025
98e5517
feat: add complete hardware integration for iURi Marine Gateway
Cheewye Oct 26, 2025
b178738
fix: restore working mobile layout version
Cheewye Oct 26, 2025
c646d2c
fix: show user icon in mobile header
Cheewye Oct 26, 2025
df00458
fix: show user name in mobile header with truncation
Cheewye Oct 26, 2025
bcc51f1
style: increase app name size and make bold across all components
Cheewye Oct 26, 2025
787218e
feat: increase header size and brand prominence
Cheewye Oct 26, 2025
9753e9a
feat: force cache reload with visible changes
Cheewye Oct 26, 2025
5b153e8
chore: bump service worker to v10 for cache reload
Cheewye Oct 26, 2025
1e48b76
test: add red color to app name for visibility test
Cheewye Oct 26, 2025
8715c04
fix: use h1 with inline styles to match Panel de Control exactly
Cheewye Oct 26, 2025
72f00f5
fix: match app name height to fish icon (24px)
Cheewye Oct 26, 2025
aa029c6
revert: remove test red color and simplify app name styling
Cheewye Oct 26, 2025
94ef180
fix: improve geolocation settings for mobile compatibility
Cheewye Oct 26, 2025
31172be
fix: add geolocation permissions to manifest and improve logging
Cheewye Oct 26, 2025
846a3b8
feat: add visible error feedback for geolocation on mobile
Cheewye Oct 26, 2025
3a5f16d
✨ Mejorar touch sensitivity y claridad de datos en mapa - Aumentar ár…
Cheewye Oct 26, 2025
beba03c
🔧 Corregir detección de datos reales vs simulados AIS Stream - Lógica…
Cheewye Oct 26, 2025
6da689c
📋 Agregar descripciones detalladas en leyenda del mapa - Descripcione…
Cheewye Oct 26, 2025
31bd906
📚 Documentar estado actual de integración de IA
Cheewye Oct 26, 2025
90b222b
✨ Snapshot antes de COMBO ÉPICO (A+B+C) - Estado: 15 idiomas + Mobile…
Cheewye Oct 27, 2025
866d6cc
🚀 COMBO ÉPICO v2.0: Animaciones + PWA + Performance
Cheewye Oct 27, 2025
050d793
🔧 Fix: Eliminar scroll innecesario en sidebar
Cheewye Oct 27, 2025
df21fec
🎯 Preparación: Voice Cloning + Analytics + AI Memory
Cheewye Oct 27, 2025
77340af
🎉 v2.2: Voice Cloning + Analytics + AI Memory
Cheewye Oct 27, 2025
4aad551
⚡ v2.3: STREAMING RESPONSES como ChatGPT
Cheewye Oct 27, 2025
425ea78
fix: Corregir errores 404 del Dashboard y unificar 4 chats de IA en C…
Cheewye Oct 28, 2025
e3c2ca9
fix: Corregir imports de IA y agregar soporte multiidioma a Ollama
Cheewye Oct 28, 2025
a889e04
fix: Resolver errores TypeScript para build exitoso
Cheewye Oct 28, 2025
8a2727b
fix: Corregir rutas de dashboard API (remove /api/v1 prefix)
Cheewye Oct 28, 2025
0b92b87
fix: Remover API key hardcodeada de documentación (GitGuardian)
Cheewye Oct 29, 2025
5df509e
Map: UI fixes and enhancements\n- Move Leaflet zoom control to top-ri…
Cheewye Oct 29, 2025
64c6e7d
Fix: TypeScript build errors\n- Change export const to const for Reac…
Cheewye Oct 29, 2025
b043256
Fix: Complete TypeScript build fixes\n- All components now use proper…
Cheewye Oct 29, 2025
0ff4652
Map: UI fixes and enhancements\n- Move Leaflet zoom control to top-ri…
Cheewye Oct 29, 2025
578cb6f
Merge PR #14: Map UI fixes, VoiceChat input, i18n, header/notifications
Cheewye Oct 29, 2025
085123e
VoiceChat: mejorar STT\n- Detección dinámica de códecs para MediaReco…
Cheewye Oct 30, 2025
3230fa8
iuri-mar-panel (#15)
Cheewye Oct 30, 2025
fb37c05
perf: gate WebSocket, lazy-load map/3D, optimize build chunks
Cheewye Oct 30, 2025
b5dee38
Fase 2: Swarm ping-pong & RedisSaver (#17)
Cheewye Nov 3, 2025
81b40f6
yes Feature/swarm phase3 cognition (#18)
Cheewye Nov 3, 2025
054eea4
feat(persistence): 4.1 base — cognition checkpoints (SQLite), MQTT→SQ…
Cheewye Nov 4, 2025
790cc0d
feat(persistence): add persistence metrics card component
Cheewye Nov 4, 2025
a289520
feat(persistence): wire PersistenceMetricsCard with /symbiotic route …
Cheewye Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
148 changes: 148 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# 🚫 REGLAS ESTRICTAS - iURi Pescadores

## ⚠️ ARCHIVOS PROHIBIDOS (NUNCA TOCAR)

### Frontend - UI Core (PROTEGIDA)
```
frontend/src/router*
frontend/src/layouts/**
frontend/src/components/Sidebar*
frontend/src/pages/**
```

**Razón:** Estos archivos controlan la estructura principal de la aplicación (rutas, layout, navegación, páginas). Cualquier cambio aquí rompe el flujo completo de la app.

---

## ✅ UBICACIONES CORRECTAS POR MÓDULO

### Species Recognition
```
frontend/src/components/species/**
```
- `SpeciesRecognition.tsx`
- `Fish3DViewer.tsx`
- `GeometricAnalysis.tsx`
- `SpeciesComparison.tsx`
- etc.

### Otros Módulos (futuros)
```
frontend/src/components/fishing/** → Pesca Inteligente
frontend/src/components/safety/** → Seguridad
frontend/src/components/maps/** → Mapas
frontend/src/components/ai/** → IA
frontend/src/components/chat/** → Chat
```

---

## 🔧 REGLAS DE DESARROLLO

### Framework y Tooling
- **Frontend:** React + Vite (NO cambiar)
- **Backend:** FastAPI + Python 3.10+
- **Base de datos:** SQLite (migración futura a PostgreSQL)
- **3D:** React Three Fiber + Drei
- **Estilos:** TailwindCSS

### Git Workflow
- ❌ **NO hacer push directo a `main`**
- ✅ **Crear PRs** para cualquier cambio
- ✅ Trabajar en ramas feature/fix/chore
- ✅ Commits descriptivos

### Arquitectura de Nuevas Features
1. **Backend primero:** Crear API en `backend/api/`, servicio en `backend/services/`
2. **Frontend después:** Crear componentes en `frontend/src/components/[modulo]/`
3. **NO tocar rutas/layout:** Usar las páginas existentes o pedir permiso explícito
4. **Integración:** Las nuevas features se AGREGAN, no REEMPLAZAN las existentes

---

## 📋 RECORDATORIOS

### ¿Qué es iURi Pescadores?
**iURi NO ES:**
- ❌ Una app de reconocimiento de especies
- ❌ Una app de tracking de barcos
- ❌ Una app solo de chat/IA

**iURi ES:**
✅ **PLATAFORMA COMPLETA** con múltiples módulos integrados:
- Gestión de flota
- Pesca inteligente
- Seguridad marítima
- IA multi-propósito
- Reconocimiento de especies (UNO de los módulos)
- Tracking en tiempo real
- Chat asistencial
- Dashboard con métricas
- Y más...

### Antes de Hacer Cambios
1. **¿Toco archivos prohibidos?** → NO proceder
2. **¿Cambio el framework?** → NO proceder
3. **¿Reemplazo funcionalidad existente?** → NO, solo agregar
4. **¿Push directo a main?** → NO, hacer PR
5. **¿Está claro el módulo/ubicación?** → Sí, proceder

---

## 🎯 FLUJO CORRECTO DE ENTRADA

```
Usuario → localhost:5173
/login (LoginPage)
Autenticación (Auth API)
/dashboard (Dashboard con Sidebar completo)
Navega por Sidebar a cualquier módulo:
- /fishing (Pesca Inteligente)
- /species (Identificar Especie)
- /chat (Chat Geral)
- /safety (Segurança)
- /map (Mapa en Tiempo Real)
- /ai (IA Preditiva)
- /ai-unificada (IA Unificada)
- /ai-local (IA Local)
- /settings (Configurações)
```

**Punto de entrada:** `/login` → NO `/species` ni otro módulo específico

---

## 🚨 SI SE ROMPE ALGO

1. **NO hacer push** si algo no funciona
2. **Verificar que no tocaste archivos prohibidos:**
```bash
git diff --name-only | grep -E '^(frontend/src/router|frontend/src/layouts|frontend/src/components/Sidebar|frontend/src/pages/)'
```
3. **Si tocaste archivos prohibidos:**
```bash
git restore frontend/src/router*
git restore frontend/src/layouts/
git restore frontend/src/components/Sidebar*
git restore frontend/src/pages/
```
4. **Reportar el error** y esperar instrucciones

---

## 📚 DOCUMENTACIÓN DE REFERENCIA

- `ARQUITECTURA_COMPLETA_IURI.md` → Visión general del sistema
- `INTEGRACION_GFW_SPECIES.md` → Integración GFW
- `backend/README.md` → Documentación del backend
- `/docs` → Documentación adicional

---

**Última actualización:** 22 Octubre 2025
**Versión:** 1.0.0

76 changes: 76 additions & 0 deletions .cursorrules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 🛡️ Reglas Estrictas para Cursor/Codex - iURi

## ❌ PROHIBIDO (bloqueo automático)

1. **NO borrar/renombrar** `src/components/marine/*`
2. **NO introducir** `react-leaflet` (usar MapLibre GL JS o Leaflet directo)
3. **NO usar** WebSocket `:8000` sin gate de `VITE_USE_IURI_WS`
4. **NO cambiar nombres** de envs críticas:
- `VITE_SIGNALK_WS`
- `VITE_MQTT_WS`
- `VITE_VESSEL_ID`
5. **NO tocar** archivos protegidos salvo que sea el objetivo del PR:
- `src/router*`
- `src/layouts/`
- `src/components/Sidebar*`
- `src/pages/`

## ✅ ANTES DE MERGEAR (obligatorio)

1. Ejecutar `frontend/scripts/premerge_guard.sh`
2. Ejecutar `frontend/scripts/llm_diff_review.sh` (Ollama local)
3. Adjuntar salida de ambos en descripción del PR
4. Si hay cambios en marine/: ejecutar `frontend/scripts/sanity_stack.sh`
5. Capturas de pantalla del módulo afectado

## 📋 COMMITS ATÓMICOS

- 1 objetivo por PR (ejemplos válidos):
- ✅ `feat(marine): add wind widget`
- ✅ `fix(i18n): sync missing keys pt/es`
- ✅ `chore(marine): gate WS behind VITE_USE_IURI_WS`

- Ejemplos **NO** válidos (muy amplios):
- ❌ `feat: marine panel + i18n + lazy load + fixes`
- ❌ `refactor: everything`

## 🧠 USO DE IA LOCAL (Ollama)

Antes de proponer código que toque:
- `src/components/marine/`
- `src/hooks/use*Marine*`
- `src/hooks/useSignalK.ts`
- `src/hooks/useMQTT.ts`
- `docker-compose.marine.yml`

**EJECUTAR:**
```bash
cd frontend
MODEL=llama3.2 bash scripts/llm_diff_review.sh
```

Y **ADJUNTAR** la salida al mensaje/PR.

## 📚 DOCUMENTACIÓN DE REFERENCIA

- `gateway/README.md` → Stack marino completo
- `.env.example` → Variables obligatorias
- `ARQUITECTURA_COMPLETA_IURI.md` → Visión del sistema

## 🚨 SI ALGO SE ROMPE

1. **NO hacer push** si `/dashboard` no carga
2. **Verificar** que no tocaste archivos prohibidos:
```bash
git diff --name-only origin/main | grep -E '^(frontend/src/router|frontend/src/layouts|frontend/src/components/Sidebar|frontend/src/pages/)'
```
3. Si tocaste archivos prohibidos, **revertir**:
```bash
git restore frontend/src/router* frontend/src/layouts/ frontend/src/components/Sidebar* frontend/src/pages/
```

---

**Última actualización:** 30 Octubre 2025
**Versión:** 2.0 (con guardián IA local)

42 changes: 42 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
__pycache__/
*.pyc
*.pyo
*.pyd
*.log
*.db
*.sqlite
*.sqlite3
.env
.env.*
.git/
.gitignore
node_modules/
frontend/node_modules/
frontend/dist/
frontend/build/
.cache/
.idea/
.vscode/
*.md
docs/
logs/
logs_24_7/
temp_files/
venv/
venv_*/
.DS_Store
*.swp
*.swo
*~
archive/
backup/
recovered_code/
iuri_v2/
iuri_sd_webui/
prototipado/
tests/
*.test.py
test_*.py
*.zip
*.tar.gz

98 changes: 98 additions & 0 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/usr/bin/env bash
# .git-hooks/pre-commit — Hook automático de protección
# Se ejecuta ANTES de cada commit para crear snapshot de seguridad

set -e

echo ""
echo "🛡️ Hook de protección activado..."

# Verificar archivos críticos (reglas del repo)
CRITICAL_FILES=(
"backend/main.py"
"frontend/src/App.tsx"
"frontend/src/components/asistente/AsistenteIuri.tsx"
"docker-compose.full.yml"
"nginx/conf.d/iuriapp.conf"
)

echo "🔍 Verificando archivos críticos..."

for file in "${CRITICAL_FILES[@]}"; do
if [ ! -f "$file" ]; then
echo "❌ ERROR: Archivo crítico faltante o borrado: $file"
echo " ABORTANDO commit para proteger tu código"
echo ""
echo "💡 Si querés borrar este archivo, primero:"
echo " 1. Crea un snapshot manual: ./scripts/commit-snapshot.sh"
echo " 2. Agrega el archivo a .gitignore si no lo necesitas"
echo ""
exit 1
fi
done

echo "✅ Todos los archivos críticos presentes"

# Verificar que no se toquen archivos prohibidos (de las reglas del repo)
PROTECTED_PATTERNS=(
"frontend/src/router"
"frontend/src/layouts/"
"frontend/src/components/Sidebar"
"frontend/src/pages/"
)

echo "🔍 Verificando archivos protegidos..."

CHANGED_FILES=$(git diff --cached --name-only)

for pattern in "${PROTECTED_PATTERNS[@]}"; do
if echo "$CHANGED_FILES" | grep -q "^${pattern}"; then
echo "⚠️ ADVERTENCIA: Intentás modificar archivos protegidos:"
echo "$CHANGED_FILES" | grep "^${pattern}"
echo ""
echo "📋 Según las reglas del repo, estos archivos están PROTEGIDOS:"
echo " • frontend/src/router*"
echo " • frontend/src/layouts/**"
echo " • frontend/src/components/Sidebar*"
echo " • frontend/src/pages/**"
echo ""
echo "💡 Si REALMENTE necesitas cambiarlos:"
echo " 1. Revisa las reglas en el archivo de reglas del repo"
echo " 2. Crea snapshot: ./scripts/commit-snapshot.sh"
echo " 3. Documenta por qué es necesario"
echo ""
echo "❓ ¿Continuar de todas formas? (s/N): "
read -r response
if [[ ! "$response" =~ ^[Ss]$ ]]; then
echo "❌ Commit abortado por protección"
exit 1
fi
fi
done

echo "✅ No se tocan archivos protegidos"

# Crear snapshot automático en commits grandes
CHANGES_COUNT=$(echo "$CHANGED_FILES" | wc -l)

if [ "$CHANGES_COUNT" -gt 10 ]; then
echo ""
echo "📸 Cambios grandes detectados ($CHANGES_COUNT archivos)"
echo " Creando snapshot de seguridad automático..."

DATE=$(date +"%Y%m%d-%H%M%S")
BACKUP_BRANCH="auto-backup-$DATE"

# Crear branch de backup (sin ejecutar commit-snapshot.sh para evitar loop)
git branch "$BACKUP_BRANCH" 2>/dev/null || true

echo "✅ Snapshot automático: $BACKUP_BRANCH"
echo " Para volver: git checkout $BACKUP_BRANCH"
fi

echo ""
echo "✅ Pre-commit hook completado - commit permitido"
echo ""

exit 0

Loading