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
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).
- 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!
Note: All API endpoints are prefixed with http://localhost:<portnumber>
.
[Authentication endpoints remain unchanged]
- 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"
- Success (201):
- URL:
/projects
- Method:
GET
- Headers:
Authorization: Bearer <jwt-token>
- Response:
- Success (200):
[ { "projectId": "unique-project-id", "Name": "Project Name", "Host": "[email protected]", "Members": ["[email protected]", "[email protected]"], "Tasks": [], "StartDate": "YYYY-MM-DD", "EndDate": "YYYY-MM-DD" }, ]
- Success (200):
- URL:
/pojects/:projectId
- Method:
GET
- Headers:
Authorization: Bearer <jwt-token>
- Response:
- Success (200):
{ "projectId": "unique-project-id", "Name": "Project Name", "Host": "[email protected]", "Members": ["[email protected]", "[email protected]"], "Tasks": [], "StartDate": "YYYY-MM-DD", "EndDate": "YYYY-MM-DD" }
- Success (200):
- 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
- Success (200):
- URL:
/projects/add-member
- Method:
POST
- Headers:
Authorization: Bearer <jwt-token>
- Request Body:
{ "projectID": "DEMOPID1", "newMemberUID": "demomember1" }
- Response:
- Success (200):
{ "message": "Member added successfully" }
- Success (200):
- URL:
/projects/add-task
- Method:
POST
- Headers:
Authorization: Bearer <jwt-token>
- Request Body:
{ "projectID": "DEMOPID1", "taskID": "demotask1" }
- Response:
- Success (200):
{ "message": "Task added successfully" }
- Success (200):
- 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" }
- Success (201):
- 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": [] } ]
- Success (200):
- 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": [] }
- Success (200):
- 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" }
- Success (200):
- 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" }
- Success (201):
- 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" } ]
- Success (200):