Skip to content

alok27a/COMS4156-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMS4156-Project

Repository for COMS 4156 24F, Team Scrum Masters

EventEase is a flexible RESTful service designed to simplify and automate the complexities of event management. EventEase offers a seamless solution to manage everything from event creation to event registration. With endpoints for task management, RSVP handling, and real-time reporting, EventEase empowers various applications with robust event management capabilities, allowing organizers and hosters to focus on delivering great user experiences. EventEase API makes it easy to integrate sophisticated event planning tools into any system, no matter the size or scope of your event.

To distinguish from regular event-management services and make it useful for elderly users, Eventease provides SMS and email reminders for events, allowing elderly users to stay informed without relying on complex apps. Additionally, a simple RSVP system could be integrated, enabling one-click RSVP via email or SMS, reducing the need for navigating complicated interfaces. The API would also support caregiver collaboration, allowing caregivers to manage event details, send RSVPs, or receive notifications on behalf of elderly users. Lastly, an option for simplified, large-text invitations or event details could be offered to ensure better accessibility for users with vision impairments or low digital literacy.

Service Repository

Link to the service repository is Click Here

Technologies Used

  • Javascript:
  • React.js: Framework for frontend development.
  • Postman: To test various endpoints provided by our service.

Installation of Client App

Open the terminal in the folder in which you wish to clone the repository and enter the following command:

git clone https://github.com/alok27a/COMS4156-App
cd COMS4156-App

Install all the NPM packages:

npm i

In order to run the frontend:

npm run start

Prerequisite

  • Node Better to have the latest version

To Run Unit Tests of Client App

Execute the below code in the client app folder

npm test

Endpoint Documentation

After starting the server, an autogenerated JSON OpenAPI spec can be found at http://localhost:8080/v3/api-docs, and interactive Swagger documentation at http://localhost:8080/swagger-ui.html.

We also have a Postman project, with documentation and interactive use of the application endpoints, available here.

Here is documentation for all the HTTP endpoints exposed by this application:

Created Endpoints

Event Management

POST /api/events
  • Expected Input Parameters:
    • Request Parameters:
      • organizerId (Long): The ID of the organizer (user creating the event) passed as a query parameter.
    • Request Body:
      • event (Object):
        • name (String): Name of the event.
        • description (String): Description of the event.
        • location (String): Location where the event is held.
        • date (String): The date of the event (in YYYY-MM-DD format).
        • time (String): The time of the event (in HH:MM format).
        • capacity (int): Maximum number of participants allowed.
        • budget (int): Budget for the event.
  • Expected Output: A JSON object containing the organizerId and the eventId of the newly created event.
  • Operation: Creates a new event with the specified details and sets the organizer for the event.
  • Upon Success:
    • HTTP 201 Status Code with:
    • { "organizerId": "The organizer's user ID", "eventId": "The newly created event's ID" }
  • Upon Failure:
    • HTTP 404 Status Code with "Organizer not found" if the provided organizerId is invalid.
    • HTTP 500 Status Code with an error message in the response body in case of any other server error.
GET /api/events/{eventId}
  • Expected Input Parameters:

    • Path Parameter:
      • eventId (Long): The ID of the event to retrieve.
  • Expected Output: A JSON object representing the event details.

  • Operation: Retrieves the details of a specific event by its ID.

  • Upon Success:

    • HTTP 200 Status Code with the full details of the event in the response body.
  • Upon Failure:

    • HTTP 404 Status Code with "Event not found" if the event with the provided eventId does not exist.
    • HTTP 500 Status Code with "An unexpected error has occurred" in the response body.
GET /api/events
  • Expected Input Parameters:

    • Query Parameters:
      • startDate (String): The start date of the range in YYYY-MM-DD format.
      • endDate (String): The end date of the range in YYYY-MM-DD format.
  • Expected Output: A list of event objects that fall within the specified date range.

  • Operation: Retrieves a list of events between the specified start and end dates.

  • Upon Success:

    • HTTP 200 Status Code with the list of events in the response body.
  • Upon Failure:

    • HTTP 400 Status Code if the date parameters are not provided or invalid.
    • HTTP 500 Status Code with "An unexpected error has occurred" in the response body.
PATCH /api/events/{eventId}
  • Expected Input Parameters:
    • Path Parameter:
      • eventId (Long): The ID of the event to update.
    • Request Body:
      • event (Object):
        • name (String): Name of the event.
        • description (String): Description of the event.
        • location (String): Location where the event is held.
        • date (String): The date of the event (in YYYY-MM-DD format).
        • time (String): The time of the event (in HH:MM format).
        • capacity (int): Maximum number of participants allowed.
        • budget (int): Budget for the event.
  • Expected Output: A string indicating the result of the operation.
  • Operation: Updates the specified event's details. Only the provided fields will be updated.
  • Upon Success:
    • HTTP 200 Status Code with "Event updated successfully" in the response body.
  • Upon Failure:
    • HTTP 404 Status Code with "Event not found" if the event with the provided eventId does not exist.
    • HTTP 400 Status Code with "Failed to update event" in case of invalid input or other errors.

RSVP Management

POST /api/events/{eventId}/rsvp/{userId}
  • POST RSVP for an event
  • Expected Path Variables: eventId (String), userId(String)
  • Expected Output: RSVP Object
  • Upon Success: HTTP 201 Status Code is returned
  • Upon Failure:
    • HTTP 400 Status Code is returned with the message indicating RSVP already exists
    • HTTP 404 Status Code is returned along with the message indicating user or event not found.
    • HTTP 500 Internal Server Error for other issues
GET /api/events/{eventId}/attendees
  • Retrieves the list of attendees for a given event, identified by eventId.
  • Expected Path Variables: eventId (String)
  • Expected Output: List of RSVP Object
  • Upon Success: 200 OK with the list of attendees
  • Upon Failure:
    • HTTP 404 Status Code is returned if the event is not found.
    • HTTP 500 Internal Server Error for other issues
DELETE /api/events/{eventId}/rsvp/cancel/{userId}
  • Cancels an RSVP for a user to a specified event.
  • Expected Path Variables: eventId (String), userId(String)
  • Expected Output: Success Message (String)
  • Upon Success: 200 OK with a successful cancellation message.
  • Upon Failure:
    • HTTP 404 Status Code is returned if the event/user/rsvp is not found.
    • HTTP 500 Internal Server Error for other issues
PATCH /api/events/{eventId}/rsvp/{userId}
  • Partially updates an RSVP for a user to a specified event.
  • Expected Path Variables:
    • eventId (String)
    • userId (String)
  • Expected Request Body: JSON object with fields to update in the RSVP.
  • Expected Output: Success Message (String) with updated RSVP details.
  • Upon Success:
    • 200 OK with the updated RSVP details.
  • Upon Failure:
    • HTTP 404 Status Code is returned if the event, user, or RSVP is not found.
    • HTTP 500 Internal Server Error for other issues.
POST /api/events/{eventId}/rsvp/checkin/{userId}
  • Checks in a user to a specified event.
  • Expected Path Variables:
    • eventId (String)
    • userId (String)
  • Expected Output: Success Message (String).
  • Upon Success:
    • 200 OK with a message indicating successful check-in.
  • Upon Failure:
    • HTTP 404 Status Code is returned if the event, user, or RSVP is not found.
    • HTTP 500 Internal Server Error for other issues.
GET /api/events/rsvp/user/{userId}
  • Retrieves all RSVPs for a specific user.
  • Expected Path Variables:
    • userId (String)
  • Expected Output: List of RSVP objects (JSON).
  • Upon Success:
    • 200 OK with a list of RSVPs for the specified user.
  • Upon Failure:
    • HTTP 404 Status Code is returned if the user is not found.
    • HTTP 500 Internal Server Error for other issues.
GET /api/events/rsvp/user/{userId}/checkedin
  • Retrieves all checked-in RSVPs for a specific user.
  • Expected Path Variables:
    • userId (String)
  • Expected Output: List of checked-in RSVP objects (JSON).
  • Upon Success:
    • 200 OK with a list of checked-in RSVPs for the specified user.
  • Upon Failure:
    • HTTP 404 Status Code is returned if the user is not found.
    • HTTP 500 Internal Server Error for other issues.

Task Management

POST /api/events/{eventId}/tasks
  • Creates a new task for the specified event and assigns it to a user.
  • Expected Input Parameters:
    • Path Parameters:
      • eventId (String): The ID of the event for which the task is being created.
    • Query Parameters:
      • userId (String): The ID of the user creating the task.
      • Request Body (JSON):
      • name (String): Name of the task.
      • description (String): Description of the task.
      • status (String): Status of the task. Valid values: PENDING, COMPLETED, IN_PROGRESS, CANCELLED.
      • dueDate (String): Due date of the task in YYYY-MM-DD HH:MM:SS format.
  • Upon Success:
    • HTTP 201 Status Code with:
    • { "taskId": "The newly created task's ID", "eventId": "The event's ID", "userId": "The user's ID" }
  • Upon Failure:
    • HTTP 404 Status Code is returned along with the message indicating user or event not found.
    • HTTP 500 Internal Server Error for other issues.
GET /api/events/{eventId}/tasks
  • Retrieves all tasks associated with a specific event.
  • Expected Input Parameters:
    • Path Parameters:
      • eventId (String): The ID of the event to retrieve tasks from.
  • Upon Success:
    • HTTP 200 Status Code with list of tasks associated with event.
  • Upon Failure:
    • HTTP 404 Status Code is returned along with the message indicating event not found.
    • HTTP 500 Internal Server Error for other issues.
GET /api/events/{eventId}/tasks/{taskId}
  • Retrieves a specific task by its ID and associated event.
  • Expected Input Parameters:
    • Path Parameters:
      • taskId (String): The ID of the event and specific task to retrieve.
  • Upon Success:
    • HTTP 200 Status Code with task and its respective details.
  • Upon Failure:
    • HTTP 404 Status Code is returned along with the message indicating event or task not found.
    • HTTP 500 Internal Server Error for other issues.
PATCH /api/events/{eventId}/tasks/{taskId}/status
  • Updates the status of a specific task within an event.
  • Expected Input Parameters:
    • Path Parameters:
      • eventId (String): The ID of the event containing the task that is being updated.
      • taskId (String): The ID of the specific task being updated.
    • Query Parameters:
      • status (String): Status of the task. Valid values: PENDING, COMPLETED, IN_PROGRESS, CANCELLED.
  • Upon Success:
    • HTTP 200 Status Code with task and its respective details.
  • Upon Failure:
    • HTTP 400 Status Code is returned if the request body does not contain a valid status enumeration.
    • HTTP 404 Status Code is returned along with the message indicating event or task not found.
    • HTTP 500 Internal Server Error for other issues.
PATCH /api/events/{eventId}/tasks/{taskId}/user
  • Updates the assigned user for a specific task within an event.
  • Expected Input Parameters:
    • Path Parameters:
      • eventId (String): The ID of the event containing the task that is being updated.
      • taskId (String): The ID of the specific task being updated.
    • Query Parameters:
      • userId (String): User ID to be assigned task to.
  • Upon Success:
    • HTTP 200 Status Code with task and its respective details.
  • Upon Failure:
    • HTTP 404 Status Code is returned along with the message indicating user, event, or task not found.
    • HTTP 500 Internal Server Error for other issues.
DELETE /api/events/{eventId}/tasks/{taskId}
  • Deletes a specific task associated with an event.
  • Expected Input Parameters:
    • Path Parameters:
      • eventId (String): The ID of the event containing the task deleting.
      • taskId (String): The ID of the specific task being deleted.
  • Upon Success:
    • HTTP 200 Status Code with successful deletion message.
  • Upon Failure:
    • HTTP 404 Status Code is returned along with the message indicating event or task not found.
    • HTTP 500 Internal Server Error for other issues.

User Management

POST /api/users/add
  • Adds a new user to the system.
  • Expected Input Parameters:
    • Request Body (JSON):
      • firstName (String): The first name of the user.
      • lastName (String): The last name of the user.
      • email (String): The email address of the user.
      • phone (String, optional): The phone number of the user.
      • role (String, optional): The role of the user (e.g., ADMIN, USER).
  • Upon Success:
    • HTTP 200 Status Code with the message "User saved successfully."
  • Upon Failure:
    • HTTP 400 Bad Request for invalid input data.
    • HTTP 500 Internal Server Error for other issues.
GET /api/users/list
  • Retrieves a list of users based on filter criteria.
  • Expected Input Parameters:
    • Query Parameters:
      • firstName (String, optional): The first name to filter users.
      • lastName (String, optional): The last name to filter users.
      • email (String, optional): The email address to filter users.
      • phone (String, optional): The phone number to filter users.
      • role (String, optional): The role to filter users (e.g., ADMIN, USER).
  • Upon Success:
    • HTTP 200 Status Code with a list of users.
  • Upon Failure:
    • HTTP 500 Internal Server Error for other issues.
PATCH /api/users/update/{id}
  • Updates an existing user's details.
  • Expected Input Parameters:
    • Path Parameters:
      • id (Long): The ID of the user to be updated.
    • Request Body (JSON):
      • firstName (String, optional): The new first name of the user.
      • lastName (String, optional): The new last name of the user.
      • email (String, optional): The new email address of the user.
      • phone (String, optional): The new phone number of the user.
      • role (String, optional): The new role of the user (e.g., ADMIN, USER).
  • Upon Success:
    • HTTP 200 Status Code with the message "User updated successfully."
  • Upon Failure:
    • HTTP 404 Status Code if the user is not found.
    • HTTP 500 Internal Server Error for other issues.
DELETE /api/users/delete/{id}
  • Deletes a specific user from the system.
  • Expected Input Parameters:
    • Path Parameters:
      • id (Long): The ID of the user to be deleted.
  • Upon Success:
    • HTTP 200 Status Code with the message "User deleted successfully."
  • Upon Failure:
    • HTTP 404 Status Code if the user is not found.
    • HTTP 500 Internal Server Error for other issues.

Screenshots of the Client App

Elderly Dashboard image

Elderly Event's registered image

Caregiver Dashboard image

Caregiver Creating an Event image

Caregiver managing an event image

Tasks assigned to a caregiver image

About

COM4156 - Project Client App

Resources

Stars

Watchers

Forks

Packages

No packages published