# Pymetory — Contexto Completo para NotebookLM # Proyecto de Grado: Gestión de Inventarios con LLM # Universidad del Valle — Germán David Murillas Mondragón # Profesor: Héctor Fabio Ocampo # Rama definitiva: main @ f00f108 (desplegado en Titan) # Fecha consolidación: 2026-06-10 --- ## 🌐 URLs de Producción (todas activas) ### Pymetory App (Tesis) | URL | Descripción | Auth | |---|---|---| | https://app.pymetory.com | App principal | — | | https://app.pymetory.com/login | Login | <REDACTED> / <REDACTED> | | https://app.pymetory.com/dashboard | Tablero KPIs + FEFO + RAG | requiere login | | https://app.pymetory.com/nicho | Hub 14 oportunidades con IA | <REDACTED> | | https://app.pymetory.com/indice | Mapa de enlaces protegido | <REDACTED> | | https://app.pymetory.com/settings-page | Settings CRUD | requiere login admin | | https://app.pymetory.com/kanban | Kanban v2 dnd-kit | requiere login | | https://app.pymetory.com/inventario | Inventario FEFO | requiere login | ### Reuniones con Director de Tesis | URL | Descripción | |---|---| | https://reuniones.pymetory.com/ | Índice de reuniones | | https://reuniones.pymetory.com/reunion9/ | Reunión 9 — Plan de pruebas | | https://reuniones.pymetory.com/reunion10/ | Reunión 10 — Avances | | https://reuniones.pymetory.com/reunion11/ | Reunión 11 — Auditoría 15 módulos, RAG, 500 fix | | https://reuniones.pymetory.com/reunion11/benchmark.html | Benchmark RAG modelos | | https://reuniones.pymetory.com/desarrolloreunion11-13/ | Plan definitivo 47 tareas + pomodoro | ### Infraestructura | URL | Descripción | |---|---| | https://portfoliodavidmurillas.pymetory.com | Portainer (Docker management) | | http://129.158.216.27:3000 | Open WebUI (<REDACTED> / <REDACTED>) | | https://github.com/germanmurillas/gestor-inventario-pymes-llm | Repositorio GitHub | | https://github.com/germanmurillas/gestor-inventario-pymes-llm/pull/78 | PR mergeado (titan-final → main) | --- ## 🔧 Stack Tecnológico | Capa | Tecnología | |---|---| | Backend | Laravel 11, PHP 8.3 | | Frontend | React 19, Inertia.js 2.0, Tailwind v4, @dnd-kit | | IA / RAG | Ollama (gemma3:4b), OpenCode (DeepSeek V4 Pro), Claude (Opus 4.6/4.8) | | DB | MySQL 8.0 nativo en Titan | | Testing | PHPUnit (53 tests), Playwright 1.59.1 (58 specs) | | CI/CD | GitHub Actions (.github/workflows/deploy.yml) | | Infra | Oracle Cloud ARM A1.Flex (4 OCPU, 24GB RAM) | | Dominios | DuckDNS (pymetory-tesis, portfoliodavidmurillas) | | SSL | Let's Encrypt (wildcard *.app.pymetory.com) | --- ## 📂 Estructura del Proyecto ``` /var/www/portafolio/SolucionesWeb/pymetoryTesis/ (Titan) /home/david/pymetory/ (Local WSL) ├── app/ │ ├── Http/Controllers/ │ │ ├── InventoryController.php (FEFO, scopeCriticos) │ │ ├── KanbanController.php (reorder fix: where id != item->id) │ │ ├── ChatLLMController.php (RAG OpenCode + fallback MODO TEXTO) │ │ ├── TransferController.php (reason fix) │ │ ├── ApiKeyController.php (CRUD + enmascaramiento) │ │ └── UserController.php (CRUD + anti-autoeliminación) │ └── Models/ │ ├── Lote.php (scopeCriticos, is_critical fix) │ ├── Material.php (HasFactory) │ ├── Bodega.php (HasFactory) │ └── ApiKey.php (encrypted cast) ├── database/ │ ├── factories/ (Material, Bodega, Lote, ApiKey, User) │ └── migrations/ (31 migraciones, after('name') fix) ├── tests/ │ ├── Feature/ (30+ tests: Tag, Label, Settings, etc) │ ├── Feature/Flujos/ (5 integration flows) │ ├── _legacy/ (6 Breeze legacy, no ejecutados) │ └── usabilidad/ (Playwright specs: smoke, dashboard, rag, kanban, mobile, casos-manuales) ├── docs/ │ ├── PLAN_PRUEBAS_MANUALES.md (34 casos ejecutados) │ ├── RESUMEN_COBERTURA.md (matriz 18 módulos) │ ├── R4_static.md (validación MySQL Titan) │ ├── PR_INTEGRATION.md (descripción merge) │ └── screenshots/pruebas/ (65+ capturas) ├── scripts/ │ └── serve-watchdog.sh (auto-revive artisan serve) ├── tesis/ │ └── reuniones/ (HTML de reuniones 9, 10, 11, plan) ├── enjambre/ (ChatDev, MetaGPT, crewAI, workflows) ├── public/cazador/ (4 archivos de feature cazador) └── playwright.config.cjs (config Playwright) ``` --- ## 🐛 6 Bugs Encontrados y Arreglados por las Pruebas 1. **Lote::is_critical** excluía lotes vencidos (días < 0) — removido `>= 0` 2. **TransferController** undefined array key "reason" — agregado `?? 'sin motivo'` 3. **InventoryController** undefined array key "description" — agregado `?? null` 4. **Kanban::reorder** misma columna al final producía posiciones incorrectas — agregado `where('id', '!=', $item->id)` 5. **Dashboard lotesCriticos** no contaba vencidos — creado `scopeCriticos()` en Lote 6. **Migración add_unit_to_materials** usaba `after('nombre')` en vez de `after('name')` — fixeado (MySQL-killer silencioso en SQLite) --- ## 📊 Cobertura de Pruebas | Nivel | Cantidad | Resultado | |---|---|---| | PHPUnit | 53 pass + 1 skipped | 128 assertions | | Playwright @visual | 17 specs | 39 screenshots | | Playwright @smoke | 5 specs (17s) | CI cada push | | Casos manuales | 34/34 | 41 capturas | | Módulos cubiertos | 18/18 | Unit + Feature + E2E + Manual | --- ## 🏗️ Rama definitiva - **Branch**: `main` - **Commit**: `f00f108` — "titan-final: integracion testing + WIP Titan + titan-sync" - **Tag**: `deploy-20260609-titan-final` - **PR mergeado**: https://github.com/germanmurillas/gestor-inventario-pymes-llm/pull/78 - **Rollback**: `git checkout titan-wip` + restaurar dump desde `/tmp/pym_db_*.sql.gz` - **Watchdog**: systemd activo (`systemctl status pymetory`), Restart=always ## 🤖 Herramientas del Ecosistema | Herramienta | Version | Detalle | Estado | |---|---|---|---| | Hermes Agent (Nous Research) | v0.16.0 | 192k ⭐ GitHub · 28 tools, 88 skills · 20 skills migrados de OpenClaw · Providers: OpenCode + Ollama | Activo | | Nginx Proxy Manager | Docker | UI visual para proxy hosts, SSL, redirecciones | Activo | | Kiro CLI (Opus 4.8) | v2.5.0 | Claude Opus 4.8 · Key: kirojune3 · 23.3/1000 creditos | Activo | | agy CLI (Opus 4.6) | — | Claude Opus 4.6 · Google AI Pro OAuth | Activo | ## 🧠 Modelos LLM en Titan (Ollama ARM) | Modelo | Tamano | Contexto | Velocidad | |---|---|---|---| | gemma3:4b | 3.3 GB | 8K | 8-12 tok/s | | gemma3:12b | 8.1 GB | 256K | 3-5 tok/s | | gemma3:27b | 17 GB | 128K | <1 tok/s | | qwen3:14b | 9.3 GB | 128K | 2-4 tok/s | | qwen3:30b-a3b | 18 GB | 128K | <1 tok/s | | smollm2:360m | 725 MB | 2K | 30+ tok/s |