-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Extend the existing email service beyond verification to support configurable email alerts for inventory events (low stock, price changes, expiring items) and scheduled digest reports with per-user notification preferences.
Motivation
The email service infrastructure already exists for verification emails, but it is underutilized. Users want to be proactively notified about important inventory events without having to log in and check manually. Configurable email alerts turn the system from a passive database into an active management tool that surfaces issues before they become problems.
Proposed Implementation
- Create a
notification_preferencesDB table (user_id, email_low_stock, email_price_change, email_expiring_items, email_digest_frequency, updated_at) - Extend the existing email service with templates for each alert type
- Implement alert triggers: low stock threshold reached, unit value changed, item approaching expiration
- Build a scheduled job system for digest reports (daily/weekly inventory summary)
- Add a notification preferences section in the user profile/settings page
- Create email templates with consistent branding and unsubscribe links
- Add an unsubscribe endpoint that respects one-click unsubscribe (RFC 8058)
- Include a notification history/log for debugging delivery issues
- Support digest frequency options: disabled, daily, weekly
Acceptance Criteria
- Users can configure email notification preferences in their profile settings
- Low stock alerts are sent when an item reaches its reorder point
- Price change alerts are sent when unit value is updated
- Expiring item alerts are sent based on configurable warning threshold
- Scheduled digest reports can be set to daily, weekly, or disabled
- Each email includes an unsubscribe link that works
- Email templates are professional and consistent
- Notification preferences are persisted per user in the database
- Alert triggers only fire once per event (no duplicate emails)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request