Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ajith66310/task-manager-full/llms.txt

Use this file to discover all available pages before exploring further.

Most TaskFlow API endpoints require authentication. The API uses JSON Web Tokens (JWTs): you obtain one by calling the login or signup endpoint, then include it in every subsequent request via the Authorization header. Tokens expire after 7 days by default (configurable via JWT_EXPIRES_IN in user-service/.env). Store tokens securely and never expose them in client-side code or version control.

Getting started

1

Sign up or log in

Call POST /api/auth/signup to create an account, or POST /api/auth/login if you already have one. Both endpoints return a JWT in the response data field.
curl --request POST \
  --url http://localhost:5000/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "you@example.com",
    "password": "your-password"
  }'
A successful login returns a token you can use immediately:
{
  "success": true,
  "message": "Login successful",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "user": {
      "_id": "664a1f2e8b1c2d3e4f5a6b7c",
      "email": "you@example.com",
      "isVerified": false
    }
  }
}
2

Use the token in subsequent requests

Pass the JWT as a Bearer token in the Authorization header of every protected request.
curl --request GET \
  --url http://localhost:5000/api/tasks \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
The API gateway validates the token before forwarding the request to the appropriate microservice. If the token is missing or invalid, you receive a 401 response.
New accounts are unverified until an admin approves them. Unverified users receive a 403 Forbidden response when accessing task endpoints (/api/tasks). Check the isVerified field on your user object and wait for admin verification before making task requests.

Build docs developers (and LLMs) love