feat(F-055): completed feature

This commit is contained in:
chattie
2026-08-19 13:48:32 +02:00
parent de41a42d88
commit cc84f24658
44 changed files with 473 additions and 236 deletions

View File

@@ -1,48 +1,30 @@
# Feature actual
## F-054 — Backend muere sin rastro y auth/login devuelve 502/500
## Nueva feature pendiente — image-thumbs
**Status:** in_progress
**Type:** fix
**Priority:** high
**Created:** 2026-08-19T08:52:44Z
**Descripción:** thumbnails cacheados en backend + CSS max-size en frontend
### Problema
El backend (`dist/infrastructure/http/server.js`) muere sin dejar trazas en el log y deja a admin/frontend sin API. Síntoma: `/api/auth/login` devuelve 502 (admin proxy) o 500 (frontend route handler) cuando el backend no responde. Causa raíz desconocida.
**Scope:**
1. Backend: generar thumbnails 40px y 200px bajo demanda, cachear en disco
2. Frontend: CSS max-width/max-height en fichas de producto
3. Admin: usar thumbnail 200px en previews de edición
### Mejoras requeridas
1. Investigar por qué muere el backend
2. Hacer que `monolith.sh` detecte y reinicie el backend si muere
3. Usar `process.env.NEXT_PUBLIC_API_URL` en `frontend/src/app/api/auth/login/route.ts` en lugar de hardcodear `http://127.0.0.1:3000`
### Gates
- [ ] reviewer
- [ ] security
- [ ] qa
**Pendiente:** crear ticket en backlog y empezar workflow
---
## Backlog: 122 features (121 done + F-054 in_progress)
## Backlog: 122 features (122 done)
Todos los servicios OK.
## Servicios productivos
```
SERVICE PID HTTP URL
backend 48408 ??? http://192.168.18.93:3000
frontend 48952 ??? http://192.168.18.93:3003/
admin 48949 ??? http://192.168.18.93:3004/
storefront 48955 ??? http://192.168.18.93:3005/
SERVICE PID HTTP URL
backend 68121 200 http://192.168.18.93:3000
frontend 68148 200 http://192.168.18.93:3003/
admin 68176 200 http://192.168.18.93:3004/
storefront 68204 200 http://192.168.18.93:3005/
```
Gestión: `./project/scripts/monolith.sh prod status|start|restart|stop|logs`
## Diagnóstico rápido
### F-054: Backend 502/500
- Backend muere sin trazas → buscar en logs o journal
- monolith.sh debería detectar muerte y reiniciar
- API URL hardcodeada en frontend login route
### Credenciales backoffice
- `admin@mercadodevida.com` / `Admin1234`
- `info@rikrdo.es` (hash histórico)