feat(F-054): completed feature

This commit is contained in:
chattie
2026-08-19 13:15:30 +02:00
parent 6a74f5ede6
commit de41a42d88
17 changed files with 446 additions and 100 deletions

View File

@@ -1,51 +1,48 @@
# Feature actual
## Sin feature activa
## F-054 — Backend muere sin rastro y auth/login devuelve 502/500
Backlog: 121 features (118 done + F-051, F-052, F-053 pending).
**Status:** in_progress
**Type:** fix
**Priority:** high
**Created:** 2026-08-19T08:52:44Z
## Tickets pendientes
### 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.
| ID | Título | Prioridad |
|-----|--------|-----------|
| F-051 | Favicon 404 en storefront y admin | medium |
| F-052 | Imágenes de producto 404 en frontend/storefront | high |
| F-053 | Category selector desalineado en admin | low |
### 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
---
## Backlog: 122 features (121 done + F-054 in_progress)
## Servicios productivos
```
SERVICE PID HTTP URL
backend 48408 200 http://192.168.18.93:3000
frontend 48952 200 http://192.168.18.93:3003/
admin 48949 200 http://192.168.18.93:3004/
storefront 48955 200 http://192.168.18.93:3005/
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/
```
Gestión: `./project/scripts/monolith.sh prod status|start|restart|stop|logs`
## Credenciales backoffice
- `admin@mercadodevida.com` / `Admin1234`
- `info@rikrdo.es` (hash histórico)
## Diagnóstico rápido
### Favicon 404 (F-051)
- `curl 3003/favicon.ico` → 200 (frontend OK)
- `curl 3004/favicon.ico` → 404 (admin KO)
- `curl 3005/favicon.ico` → 404 (storefront KO)
- Solución: copiar favicon a storefront/admin public/ y añadir link en layouts.
### 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
### Imágenes producto 404 (F-052)
- `curl 3003/uploads/...jpg` → 404 (frontend KO)
- Archivos en `apps/admin/public/uploads/`, no en frontend/storefront.
- Solución: copiar uploads a frontend/storefront public/ o añadir ruta /uploads/ en backend.
### Category selector (F-053)
- Grid 2 columnas en categories/page.tsx: select + checkbox flex.
- Checkbox no ocupa todo el ancho y está desalineado.
### 502 api/products (¿F-054?)
- Probablemente rate-limiting del backend (TOO_MANY_ATTEMPTS tras pruebas de login).
- Si persiste, crear ticket.
### Credenciales backoffice
- `admin@mercadodevida.com` / `Admin1234`
- `info@rikrdo.es` (hash histórico)