hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT] Implement Wait List #74

Closed Dev-Tonia closed 2 months ago

Dev-Tonia commented 3 months ago

Description

This feature will allows users to join a waitlist and be part of the early bird group. This will give the most enthusiastic users the opportunity to be among the first to experience and provide feedback on new updates and features as soon as they're released.

Purpose

For user to be able to join the company early bords

Requirements

  1. Backend:

    • API Endpoints:

      • POST /wait-lists

        • Description: Endpoint to create a wait list ticket.

        • Request Body:

          {
           "name": "string",
           "email": "string"
          }
        • Success Response:

          {
           "waitListId": "string",
           "status": "Open"
          }
          {
          
          "status": true,
          "message": "string",
          }
          
        • Error Response:

          {
           "error": "Invalid request data",
           "details": "Description of the validation error"
          }
      • GET /wait-lists/{waitListId}

        • Description: Endpoint to retrieve details of a specific wait list details.

        • Success Response:

          {
          "status": true,
          "message": "string",
          "data": {
              "waitListId": 0,
              "name": "string",
              "email": "string"
          }
          }
        • Error Response:

          {
           "error": "Wait list not found"
          }
      • GET /wait-lists

        • Description: Endpoint to retrieve a list of all wait lists.

        • Success Response:

          [
           {
          "status": true,
          "message": "string",
          "data": {
              "waitListId": 0,
              "name": "string",
              "email": "string"
          }
           },
           ...
          ]
        • Error Response:

          {
           "error": "No wait lists found"
          }
    • Database Schema:

      • WaitLIst Table:
      • waitListId (UUID, Primary Key)
      • name (String)
      • email (String)
      • createdAt (Timestamp)
      • updatedAt (Timestamp)
  2. Notifications:

    • Email confirmation to users upon joining the wait list.

Expected Outcome


Checklist/Acceptance Criteria

  1. Backend Functionality:

    • [ ] API endpoint accepts , validates and processes the wait list submissions.
    • [ ] Wait list are stored in the database with unique IDs.
  2. Notifications:

    • [ ] Users receive a confirmation email showing that they have been added to the wait list.
  3. Integration Testing:

    • [ ] End-to-end tests to ensure the wait list are received and stored properly on the database.
    • [ ] Data is correctly stored, and notification are sent.
markessien commented 3 months ago

This ticket is poorly described