Overview
Administrators can view detailed information about all registered users, including their enrollment activity, course creation statistics, and account details.User Types
Students
Users who enroll in and take courses
Educators
Users with approved educator status who can create courses
Features
Tab Navigation
Switch between user types using the tab interface:- Students
- Educators
View all users who are enrolled as students. Displays enrollment counts and account details.
Search Functionality
Search across user names and email addresses in real-time
- User full names (case-insensitive)
- Email addresses (case-insensitive)
User Information Display
Each user entry shows the following information:Student View
Educator View
API Integration
GET /api/admin/users
Fetches all users with enhanced statistics:Requires admin authentication via Bearer token in the Authorization header
Data Processing
Role Determination
The backend determines educator status by querying Clerk’s user metadata:Statistics Aggregation
1
Enrollment Count
Calculated from the
enrolledCourses array length in the User model2
Courses Created
Aggregated by grouping courses by
educatorId and counting documents3
User Sorting
All users are sorted by
createdAt in descending order (newest first)User Interface Features
Avatar Display
- With Image
- Without Image
Displays the user’s profile image in a circular avatar
Responsive Design
Mobile
Shows only name, primary metric, and joined date
Desktop
Displays all columns including email addresses and full statistics
Dark Mode
Full dark mode support with:- Adjusted background colors
- Border color variations
- Text color contrast optimization