Welcome to the documentation for the Task Management Application backend API. This API allows users to manage tasks efficiently. It is built using React, Node.js, Express.js, and MySQL (MERN stack) as the backend stack.
The base URL for all API endpoints is: https://localhost:3000/
To access protected routes, users need to register and log in. Authentication is done via JWT tion.
-
Frontend:
- Tailwind
- ChaKra-UI
- React
- Html-CSS
-
Backend:
- Node.js
- Express
- MySQL
- Sequelize
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd Task_Management-
- Install dependencies:
- Backend:
cd Backend npm install
- Frontend:
cd Frontend npm install
- Start the backend server:
cd Backend npm run server
5.Start the Frontend server:
cd Frontend
npm run dev
- Method: POST
- Endpoint:
/user/register
- Description: Allows users to register. Hashes the password on store.
- Request Body:
{ "name": "Aishwarya", "email": "[email protected]", "password": "1234" }
- Method: POST
- Endpoint:
/user/login
- Description: Allows users to login. Hashes the password on store.
- Request Body:
{ "email": "[email protected]", "password": "1234" }
- Method: GET
- Endpoint:
/user/logout
- Description: User Logged out. token push in blacklist[]
- Request Body:
{ "token":"saddfsfhgafcggggh" }
- Method: GET
- Endpoint:
/task
- Description: Return only logged in user's tasks list array .
- Request Body:
{ "title": "Task1", "description": "Abcd" }
-
Method: GET
-
Endpoint:
/task/:id
-
Description: Returns the details of a specific task identified by its ID.
-
Request Body:
- Response:
task Object
- Response:
- Method: POST
- Endpoint:
/task
- Description: Allows user to add new task
- Request Body:
{ "title": "Task Title", "description": "Task Content", }
- Method: PUT
- Endpoint:
/task/:id
- Description: Allows user to update the details of a specific task identified by its ID.
- Request Body:
- Response:
Updated Array of task object
- Response:
- Method: DELETE
- Endpoint:
/task/:id
- Description: Allows user to delete the details of a specific task identified by its ID.
- Request Body:
- Response:
Delete Task Object
- Response:
The API handles errors gracefully and returns appropriate HTTP status codes and error messages.