erp-core/docs/02-fase-core-business/MGN-008-notifications/_MAP.md
rckrdmrd 4c4e27d9ba feat: Documentation and orchestration updates
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 05:35:20 -06:00

4.0 KiB

_MAP: MGN-008 - Notifications

Modulo: MGN-008 Nombre: Notificaciones Fase: 02 - Core Business Story Points: 25 SP Estado: Parcialmente Implementado Sprint: 7 Ultima actualizacion: 2026-01-07


Resumen

Sistema de notificaciones multi-canal (email, push, in-app, WebSocket) con templates y preferencias de usuario. Sprint 7 implemento el WebSocket Gateway para notificaciones en tiempo real.


Metricas

Metrica Valor
Story Points 25 SP
Requerimientos (RF) 4
Especificaciones (ET) 3
User Stories (US) 4
Tablas DB 6 (existentes en system)
Endpoints API WebSocket Gateway
Tests -

Requerimientos Funcionales

ID Titulo Prioridad SP
RF-NOTIF-001 Notificaciones In-App P0 8
RF-NOTIF-002 Notificaciones Email P0 8
RF-NOTIF-003 Notificaciones Push P1 5
RF-NOTIF-004 Preferencias de Notificacion P1 5

Indice completo: INDICE-RF-NOTIF.md


Especificaciones Tecnicas

ID Archivo Titulo
ET-NOTIF-backend ET-NOTIF-backend.md Backend Services
ET-NOTIF-frontend ET-NOTIF-frontend.md Frontend Components
ET-NOTIF-database ET-NOTIF-database.md Database Schema

Historias de Usuario

ID Titulo Estado
US-MGN008-001 Notificaciones In-App Pendiente
US-MGN008-002 Notificaciones Email Pendiente
US-MGN008-003 Notificaciones Push Pendiente
US-MGN008-004 WebSocket Gateway Implementado

Implementacion

Database (Existente en system schema)

Objeto Tipo Schema
notifications Tabla system
message_templates Tabla system
messages Tabla system
email_queue Tabla system

Backend (src/modules/notifications/)

Objeto Tipo Path
NotificationGateway Gateway src/modules/notifications/websocket/notification.gateway.ts
WebSocketTypes Types src/modules/notifications/websocket/websocket.types.ts

WebSocket Gateway

Evento Descripcion
connection Cliente conectado
notification Emite notificacion a usuario/tenant
tenant-notification Broadcast a todo el tenant
user-notification Notificacion individual

Frontend (src/features/notifications/)

Componente Path
NotificationBell src/features/notifications/components/NotificationBell.tsx
NotificationDropdown src/features/notifications/components/NotificationDropdown.tsx
useNotificationSocket src/features/notifications/hooks/useNotificationSocket.ts
notificationsStore src/features/notifications/stores/notifications.store.ts

Caracteristicas Implementadas (Sprint 7)

  • Socket.IO Gateway: Comunicacion bidireccional en tiempo real
  • JWT Authentication: Validacion de token en conexion WebSocket
  • Room-based: Rooms por tenant y usuario
  • Event Emission: Metodos para emitir a usuario, tenant o broadcast
  • Notification Bell UI: Icono con contador de no leidas
  • Notification Dropdown: Lista de notificaciones con acciones

Dependencias

Depende de: MGN-001 (Auth), MGN-002 (Users), MGN-004 (Tenants), MGN-006 (Settings)

Requerido por: Modulos de negocio


Trazabilidad

Ver: TRACEABILITY.yml


Changelog

Fecha Sprint Cambios
2026-01-07 Sprint 7 WebSocket Gateway + Frontend Notification Center
2025-12-05 - Documentacion RF inicial

Generado por: Requirements-Analyst Implementado por: Backend-Agent, Frontend-Agent (Sprint 7) Fecha: 2026-01-07