Price-Tracking-Web-Scraper icon indicating copy to clipboard operation
Price-Tracking-Web-Scraper copied to clipboard

Create NotificationPreferenceForm.js

Open Animesh-Das245 opened this issue 2 years ago • 0 comments

Feature: Price Drop Notifications

This pull request introduces a new feature that allows users to set a notification preference for a price drop on a specific product. When the price of a tracked product drops by 30% or more, a notification email is sent to the user.

Changes Made:

  1. Backend:

    • Added a new route /set-notification-preference to handle the notification preference setup.
    • Added a new route /check-price-drop to monitor price drops and trigger email notifications.
    • Integrated an SMTP relay service for sending email notifications.
    • Added new database models NotificationPreference and PriceDropNotification to manage notification preferences and sent notifications.
  2. Frontend:

    • Created a new component NotificationPreferenceForm to allow users to set their notification preferences.
    • Integrated the NotificationPreferenceForm component into the App.js file.
    • Updated styling to accommodate the new form.
  3. Email Notifications:

    • Configured SMTP relay service credentials via environment variables.
    • Created email templates for price drop notifications.
  4. Documentation:

    • Updated README.md to include setup instructions for the new feature.

This feature enhances the user experience by providing timely updates on price drops for products they are interested in.

How to Test:

  • Update SMTP relay service credentials in the backend configuration.
  • Navigate to the Notification Preference section in the UI.
  • Set a notification preference for a product.
  • Verify that an email notification is sent when a price drop of 30% or more is detected.

Please review the changes and let me know if any further modifications are required.

Animesh-Das245 avatar Oct 30 '23 13:10 Animesh-Das245