About the Author

Name: Abhishek Srivastava

This project is a submission for the Web Development Task. It implements a robust Task Management System with secure authentication and CRUD operations.

API Documentation

Base URL: /api

Authentication

POST /auth/register

Register a new user.

Body: { "email": "user@example.com", "password": "password123" }

POST /auth/login

Login to receive an access token and httpOnly refresh cookie.

Body: { "email": "user@example.com", "password": "password123" }

POST /auth/refresh

Get a new access token using the httpOnly refresh cookie.

POST /auth/logout

Clear the refresh token cookie.

Tasks

GET /tasks

Get all tasks for the logged-in user.

Query Params: page (default 1), limit (default 10), status (PENDING/COMPLETED), search (title)

POST /tasks

Create a new task.

Body: { "title": "My Task", "description": "Details..." }

GET /tasks/:id

Get a specific task by ID.

PATCH /tasks/:id

Update a task.

Body: { "title": "Updated Title", "status": "COMPLETED" }

PATCH /tasks/:id/toggle

Toggle task status (PENDING ↔ COMPLETED).

DELETE /tasks/:id

Delete a task.