Skip to content

A simple RESTful API for managing tasks. Users can register, log in, create, update, delete tasks, and view their tasks. Built with Node.js, Express, and MongoDB.

Notifications You must be signed in to change notification settings

sumit1921184/TaskManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management System

A simple RESTful API for managing tasks. Users can register, log in, create, update, delete tasks, and view their tasks. Built with Node.js, Express, and MongoDB.

Deployed Link

Directory Structure

TaskManagementSystem/
│ ├─ config/
│ ├─ middlewares/
│ ├─ models/
│ ├─ routes/
│ ├─ index.js
│ └─ package.json

Installations And Guidelines

API Endpoints

Users

POST /user/register

  • Description: Register a new user.

  • Request Body:

    {
     "username": "string",
     "email": "string",
     "password": "string"
    }
    

POST /user/login

  • Description: Login with user credentials.

  • Request Body:

    {
      "email": "string",
      "password": "string"
    }
    

Tasks

POST /tasks

  • Description: Create a new task.

  • Request Headers:

    • Authorization: Bearer
  • Request Body:

    {
      "title": "string",
      "description": "string",
      "priority": "string",
      "status":"string",
    }
    

GET /tasks

  • Description: Get all tasks for the authenticated user.

  • Request Headers:

    • Authorization: Bearer
  • Responses:

    • 200 OK

      [
        {
          "_id": "string",
          "title": "string",
          "description": "string",
          "priority": "string",
          "status": "string",
          "userId": "string",
          "createdAt": "date"
        },
        
      ]
    • 400 Bad Request

      {
        "msg": "Error message"
      }

GET /task/:id

  • Description: Get a particular task by ID for the authenticated user.

  • Request Headers:

    • Authorization: Bearer
  • Request Parameters:

    • id: Task ID
  • Responses:

    • 200 OK

      {
        "_id": "string",
        "title": "string",
        "description": "string",
        "priority": "string",
        "status": "string",
        "userId": "string",
      }
    • 400 Bad Request

      {
        "msg": "Error message"
      }

PATCH /task/:id

  • Description: Update a particular task by ID for the authenticated user.

  • Request Headers:

    • Authorization: Bearer
  • Request Parameters:

    • id: Task ID
  • Request Body:

    {
      "title": "string",
      "description": "string",
      "priority": "string",
      "status": "string"
    }
    
  • Responses:

    • 200 OK

      {
          "msg": "Tasks has been updated"
      }
    • 400 Bad Request

      {
        "msg": "Error message"
      }

DELETE /tasks/:id

  • Description: Delete a particular task by ID for the authenticated user.

  • Request Headers:

    • Authorization: Bearer
  • Request Parameters:

    • id: Task ID
  • Responses:

    • 200 OK

      {
        "msg": "Task has been deleted"
      }
    • 400 Bad Request

      {
        "msg": "Error message"
      }
      

About

A simple RESTful API for managing tasks. Users can register, log in, create, update, delete tasks, and view their tasks. Built with Node.js, Express, and MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published