hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT]: Implement Email Messaging for Account Verification and Magic-Link Sign-Ins #44

Closed abdielbytes closed 1 week ago

abdielbytes commented 1 month ago

Description

Implement a feature to send email notifications for account verification and magic-link sign-ins. This system will automate sending verification and magic link emails, as well as manage user preferences for these notifications.

Acceptance Criteria

  1. Automated Email Notifications:

    • Automatically send email notifications for new account registrations and magic link sign-ins using a single endpoint.
  2. User Preferences:

    • Allow users to enable or disable specific email notifications.
    • Store user preferences securely in the database.
  3. Feedback and Error Handling:

    • Display appropriate messages for successful email delivery.
    • Handle and display errors for failed email delivery.

Purpose

The purpose of this feature is to:

Requirements

  1. Email Notification System:

    • [ ] Design and implement an automated email notification system for registrations and magic link sign-ins.
    • [ ] Use a centralized email service to handle sending emails.
  2. User Preferences:

    • [ ] Provide UI for users to manage their email notification preferences.
    • [ ] Store preferences securely in the database.
  3. Email Delivery Feedback:

    • [ ] Provide user feedback on successful or failed email actions.
  4. Email Templates:

    • [ ] Implement email templates for user notifications, including verification links and magic links.

Expected Outcome

Implementation Steps

  1. Email Notification UI:

    • Create a user interface for managing email notification preferences.
  2. Server-Side Validation and Handling:

    • Implement server-side validation and handling for email notifications.
    • Ensure secure storage of user preferences in the database.
  3. Email Notification Preferences:

    • Allow users to enable/disable specific email notifications.
    • Store these preferences securely in the database.
  4. User Feedback:

    • Provide feedback to users on the status of email actions, including success and failure messages.
  5. Email Templates:

    • Design and implement email templates for user notifications.

Endpoint

POST /api/v1/send-email

markessien commented 1 month ago

email service is centralised

markessien commented 1 month ago

An email sending ticket will never be approved