Description
The backend already records user login activity in the ActivityLog collection, but administrators currently have no frontend interface to view or investigate these records.
Add an Activity Logs section to the admin dashboard where administrators can inspect recent account activity without directly accessing MongoDB.
Proposed Features
-
Add a new Activity Logs tab or section to the admin dashboard.
-
Display activity records in a responsive table.
-
Show:
- User name or email
- User role
- Activity type
- Login timestamp
- IP address, when available
- User agent or device information, when available
-
Add filtering by:
- User email
- Role
- Activity type
- Date range
-
Add newest/oldest sorting.
-
Add pagination or a “Load more” option.
-
Show loading, empty, and error states.
-
Restrict the endpoint and page to administrators.
-
Avoid exposing sensitive authentication data.
Backend Work
-
Add or verify an admin-only endpoint for retrieving activity logs.
-
Support query parameters such as:
page
limit
role
activity
startDate
endDate
search
-
Return pagination metadata.
-
Validate query values.
-
Ensure the admin authentication middleware protects the route.
Frontend Work
- Add an
ActivityLogs admin component.
- Add a navigation entry in the admin dashboard.
- Create responsive desktop and mobile views.
- Add filters with a clear/reset action.
- Add readable date formatting.
- Add loading skeletons and an empty state.
Acceptance Criteria
@udaycodespace Kindly assign me this issue under ECSOC26
Description
The backend already records user login activity in the
ActivityLogcollection, but administrators currently have no frontend interface to view or investigate these records.Add an Activity Logs section to the admin dashboard where administrators can inspect recent account activity without directly accessing MongoDB.
Proposed Features
Add a new Activity Logs tab or section to the admin dashboard.
Display activity records in a responsive table.
Show:
Add filtering by:
Add newest/oldest sorting.
Add pagination or a “Load more” option.
Show loading, empty, and error states.
Restrict the endpoint and page to administrators.
Avoid exposing sensitive authentication data.
Backend Work
Add or verify an admin-only endpoint for retrieving activity logs.
Support query parameters such as:
pagelimitroleactivitystartDateendDatesearchReturn pagination metadata.
Validate query values.
Ensure the admin authentication middleware protects the route.
Frontend Work
ActivityLogsadmin component.Acceptance Criteria
@udaycodespace Kindly assign me this issue under ECSOC26