Files
mercadodevida/work/current.md
2026-08-19 13:15:30 +02:00

1.5 KiB

Feature actual

F-054 — Backend muere sin rastro y auth/login devuelve 502/500

Status: in_progress
Type: fix
Priority: high
Created: 2026-08-19T08:52:44Z

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.

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   ???   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

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)