Skip to content

SameerSharma-57/Workflow-Management-Mock-PS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Management Mock Project

Setup Instructions

1. Install Dependencies

Every time you pull the latest changes from the repository, run the following commands to ensure all dependencies are installed:

  • In the root folder:

    npm install
    npm install react-toastify
    npm install jwt-decode
    npm install react-datepicker
  • In the frontend folder:

    cd frontend
    npm install
    npm install react-toastify
    npm install jwt-decode
    npm install react-datepicker

2. Start the Application

To start the application, run the following command in the root folder:

npm run start

This will start both the backend and frontend (if configured in the scripts).

3. Private Files

  • Private files such as .env and Firebase configuration files are not included in this repository.
  • Links to these files will be provided separately and will be updated when necessary.

Make sure to download these files and place them in the appropriate locations as instructed.


Feel free to reach out if you encounter any issues!

API Endpoints

Note: All API endpoints are prefixed with http://localhost:<portnumber>.

Authentication

[Authentication endpoints remain unchanged]

Projects

Create Project

  • URL: projects/create
  • Method: POST
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
      "Name": "Project Name",
      "Members": ["[email protected]", "[email protected]"],
      "StartDate": "YYYY-MM-DD",
      "EndDate": "YYYY-MM-DD",
      "Host": "UID"
      "Tasks": []
    }
  • Response:
    • Success (201):
      {
        "message": "Project created successfully",
        "projectID": "Sample Project ID"
    }
    
    

Get All Projects

  • URL: /projects
  • Method: GET
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Response:

Get Single Project

  • URL: /pojects/:projectId
  • Method: GET
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Response:

Update Project

  • URL: /projects/update/:projectId
  • Method: PUT
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
        "Name": "Project Name",
        "Host": "[email protected]",
        "Members": ["[email protected]", "[email protected]"],
        "Tasks": [],
        "StartDate": "YYYY-MM-DD",
        "EndDate": "YYYY-MM-DD"
      }
  • Response:
    • Success (200):
      Project with projectID nCwZ7E has been updated

Add Member to the Project

  • URL: /projects/add-member
  • Method: POST
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
    "projectID": "DEMOPID1",
    "newMemberUID": "demomember1"
    }
    
  • Response:
    • Success (200):
      {
      "message": "Member added successfully"
      }

Add Task to the Project

  • URL: /projects/add-task
  • Method: POST
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
    "projectID": "DEMOPID1",
    "taskID": "demotask1"
    }
    
  • Response:
    • Success (200):
      {
      "message": "Task added successfully"
      }

Tasks

Create Task

  • URL: /tasks/createTask/:projectId
  • Method: POST
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
      "name": "Task Name",
      "status": "Pending",
      "dueDate": "YYYY-MM-DD",
      "assignee": "[email protected]"
    }
  • Response:
    • Success (201):
      {
        "taskId": "unique-task-id"
      }

Get All Tasks for a Project

  • URL: /tasks/getAllTasks/:projectId
  • Method: GET
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Response:
    • Success (200):
      [
        {
          "taskId": "unique-task-id",
          "name": "Task Name",
          "status": "Pending",
          "dueDate": "YYYY-MM-DD",
          "assignee": "[email protected]",
          "comments": []
        }
      ]

Get Single Task

  • URL: /tasks/getTask/:projectId/:taskId
  • Method: GET
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Response:
    • Success (200):
      {
        "taskId": "unique-task-id",
        "name": "Task Name",
        "status": "Pending",
        "dueDate": "YYYY-MM-DD",
        "assignee": "[email protected]",
        "comments": []
      }

Update Task

  • URL: /tasks/updateTask/:projectId/:taskId
  • Method: PUT
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
      "status": "In Progress",
      "dueDate": "YYYY-MM-DD"
    }
  • Response:
    • Success (200):
      {
        "message": "Task updated successfully"
      }

Comments

Add Comment

  • URL: /tasks/addComment/:projectId/:taskId
  • Method: POST
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Request Body:
    {
      "text": "This is a comment."
    }
  • Response:
    • Success (201):
      {
        "commentId": "unique-comment-id"
      }

Get Comments for a Task

  • URL: /tasks/getComments/:projectId/:taskId
  • Method: GET
  • Headers:
    • Authorization: Bearer <jwt-token>
  • Response:
    • Success (200):
      [
        {
          "commentId": "unique-comment-id",
          "userId": "[email protected]",
          "text": "This is a comment.",
          "timestamp": "YYYY-MM-DD HH:MM:SS"
        }
      ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published