# Indice de Requerimientos - MGN-008 Notifications **Modulo:** MGN-008 **Nombre:** Notificaciones **Fase:** 02 - Core Business **Total RF:** 4 **Ultima actualizacion:** 2025-12-05 --- ## Resumen Este modulo proporciona un sistema de notificaciones multi-canal que incluye notificaciones in-app en tiempo real, emails transaccionales y push notifications. Soporta preferencias granulares por usuario. --- ## Lista de Requerimientos | ID | Titulo | Prioridad | Estado | SP | |----|--------|-----------|--------|---:| | [RF-NOTIF-001](./RF-NOTIF-001.md) | Notificaciones In-App | P0 | Draft | 8 | | [RF-NOTIF-002](./RF-NOTIF-002.md) | Notificaciones por Email | P0 | Draft | 8 | | [RF-NOTIF-003](./RF-NOTIF-003.md) | Push Notifications | P1 | Draft | 5 | | [RF-NOTIF-004](./RF-NOTIF-004.md) | Preferencias de Notificacion | P1 | Draft | 4 | **Total Story Points:** 25 SP --- ## Dependencias ### Depende de: - **MGN-001 Auth:** Para identificar usuarios - **MGN-002 Users:** Para datos de usuarios - **MGN-004 Tenants:** Para aislamiento multi-tenant - **MGN-006 Settings:** Para configuraciones de email ### Requerido por: - **Todos los modulos de negocio:** Para enviar notificaciones --- ## Entidades Principales | Entidad | Descripcion | |---------|-------------| | Notification | Notificacion in-app | | EmailTemplate | Template de email | | EmailJob | Cola de emails | | PushSubscription | Dispositivos registrados | | NotificationPreferences | Preferencias por usuario | --- ## Endpoints Principales | Metodo | Endpoint | RF | |--------|----------|-------| | GET | /api/v1/notifications | RF-NOTIF-001 | | PUT | /api/v1/notifications/:id/read | RF-NOTIF-001 | | GET | /api/v1/notifications/count | RF-NOTIF-001 | | POST | /api/v1/notifications/email | RF-NOTIF-002 | | GET | /api/v1/notifications/email/templates | RF-NOTIF-002 | | POST | /api/v1/notifications/push/subscribe | RF-NOTIF-003 | | GET | /api/v1/notifications/preferences | RF-NOTIF-004 | | PATCH | /api/v1/notifications/preferences | RF-NOTIF-004 | --- ## Canales de Notificacion | Canal | Tecnologia | Uso | |-------|------------|-----| | In-App | WebSocket | Tiempo real en app | | Email | SMTP | Transaccional, Digest | | Push Web | Web Push (VAPID) | Alertas browser | | Push Mobile | FCM/APNs | Alertas movil | --- ## Notas de Implementacion 1. **WebSocket:** Usar Socket.io o similar para tiempo real 2. **Email:** Cola con reintentos (Bull/BullMQ) 3. **Push:** Service Worker para Web Push 4. **Templates:** Handlebars para variables 5. **Tracking:** Opcional, con pixel y redirect --- **Generado por:** Requirements-Analyst **Fecha:** 2025-12-05