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.

The TaskFlow Admin Dashboard is a dedicated React frontend that gives administrators full visibility and control over users and tasks across the entire platform. It is separate from the user-facing frontend and runs on port 3000. All actions performed through the dashboard call admin-protected API endpoints that require a valid admin-role JWT.
All admin API routes require an Authorization: Bearer <token> header. The JWT must belong to an account with role: admin. Requests from non-admin tokens receive 403 Forbidden.

Dashboard pages

The Admin Dashboard is organised into five pages:

Overview

A summary view showing total tasks, completion rate, in-progress count, and overdue tasks. Includes a status distribution pie chart and a priority bar chart, plus sections for tasks due today, upcoming tasks, and overdue tasks.

Task list

A filterable, paginated view of all tasks across every user. Admins can update status, priority, and due date, or delete tasks directly from this view.

Add task

A form to assign a new task directly to a specific user. Admin-assigned tasks are pre-verified (isVerifiedByAdmin: true) and trigger an assignment notification email to the recipient.

Task verification

A queue of tasks submitted by users that are awaiting admin review. Admins can mark each task as verified, closing the verification loop and notifying the user by email.

User management

A list of all non-admin user accounts. Admins can verify unverified users or permanently delete accounts from this page.

Admin workflows

User management

View all user accounts (excluding admins):
GET /api/admin/users
Authorization: Bearer <token>
Verify a user account so they can create tasks:
PATCH /api/admin/users/:id/verify
Authorization: Bearer <token>
Delete a user account permanently:
DELETE /api/admin/users/:id
Authorization: Bearer <token>

Task assignment

Assign a new task directly to a user. The body must include the target userId:
POST /api/admin/tasks/assign
Authorization: Bearer <token>
Content-Type: application/json
{
  "title": "Prepare onboarding materials",
  "description": "Create slides and a checklist for new hires.",
  "priority": "high",
  "dueDate": "2025-10-15T00:00:00.000Z",
  "userId": "64f1a2b3c4d5e6f7a8b9c0d1"
}
The created task has isVerifiedByAdmin: true and the assigned user receives an email notification.

Pending task review

Retrieve all tasks that users have submitted for admin review (tasks where isVerifiedByAdmin is false):
GET /api/admin/tasks/pending
Authorization: Bearer <token>

Task verification

Mark a pending task as verified:
PATCH /api/admin/tasks/:id/verify
Authorization: Bearer <token>
This sets isVerifiedByAdmin: true on the task and sends a verification confirmation email to the task owner.

Onboarding a new user

Use the following workflow every time a new user joins your organisation:
1

User signs up

The new user registers at POST /api/auth/signup with their name, email, and password. Their account is created with isVerified: false and they cannot yet create tasks.
2

Admin opens User Management

In the Admin Dashboard, navigate to the User Management page. Unverified users are listed with a pending indicator.
3

Admin verifies the account

Click Verify next to the user’s name, or call PATCH /api/admin/users/:id/verify directly. The user’s isVerified field is set to true.
4

User can create tasks

The newly verified user can now log in and create tasks through the user frontend at http://localhost:5173 or the task API.

Marking tasks as completed

Admins can mark any task as completed through the standard task update endpoint:
PUT /api/tasks/:id
Authorization: Bearer <token>
Content-Type: application/json
{
  "status": "completed"
}
When an admin sets status to completed, the task service automatically sends the task owner an email notification. The update is returned to the caller immediately — the email is dispatched in the background and does not delay the API response.
Once a task is marked completed, it cannot be modified further by anyone. If you need to reopen a task, you must delete it and create a new one.

Build docs developers (and LLMs) love