You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The alerts module (src/growth/alerts/) has basic CRUD for alerts and trigger logs, but lacks:
Event-driven trigger mechanism — alerts are created via direct API calls, not by subscribing to domain events (risk breaches, portfolio thresholds, DeFi position changes).
Delivery channel abstraction — no distinction between email, push, WebSocket, or in-app alerts.
Delivery guarantees — no retry logic, no deduplication, no rate limiting per user.
Description
The alerts module (
src/growth/alerts/) has basic CRUD for alerts and trigger logs, but lacks:defiModule — Protocol Adapter Registry & Strategy Discovery #9.Direction
src/growth/alerts/listeners/directory with event listeners:RiskAlertListener— subscribes torisk.threshold.breachedevents.PortfolioAlertListener— subscribes to portfolio rebalancing events.src/growth/alerts/services/alert-dispatcher.service.ts:EmailChannel,WebSocketChannel,InAppChannel).AlertPreferenceentity storing per-user channel preferences and quiet hours.POST /api/v1/alerts/subscribeandDELETE /api/v1/alerts/unsubscribeendpoints for user preference management.Definition of Done
Acceptance Criteria
RiskAlertListenercreates alerts whenrisk.threshold.breachedevents are emittedAlertDispatcherdelivers through at least 2 channels (in-app + one other)AlertPreferenceentity exists with channel and quiet-hours configurationnpm run buildsucceeds