Overview
The Admin Dashboard provides platform administrators with comprehensive tools to manage users, courses, and payment records. This administrative interface is only accessible to users with admin privileges.Admin access is granted through the
isAdmin flag in the user session. Only administrators can access the dashboard at /admin/dashboard/:id.Accessing the Dashboard
The admin dashboard is protected by role-based access control. The route is conditionally rendered based on admin status:- User has
isAdmin: truein their session - User is authenticated
- Valid user ID is provided in the route parameter
Dashboard Features
The admin dashboard consists of three main management sections accessible via a sidebar navigation:User Management
View and manage all registered users on the platform
Course Management
Monitor and control course listings and availability
Payment Records
Track all payment transactions and enrollment history
User Management
View Users
The Users section displays a comprehensive table of all registered users with the following information:| Column | Description |
|---|---|
| ID | Unique user identifier (UUID) |
| User’s email address | |
| Nombre | First name |
| Apellido | Last name |
| Estado | Enabled/disabled status (checkbox) |
| Action | Block/unblock button |
src/views/dashboard/Content.jsx:15-67
Block/Unblock Users
Administrators can block or unblock user accounts: Block User:Course Management
View Courses
The Courses section displays all courses on the platform:| Column | Description |
|---|---|
| Id | Course unique identifier |
| Titulo | Course title |
| Categoría | Course category |
| Precio | Base price |
| En venta | On sale status (Yes/No) |
| Descuento | Discount percentage (if applicable) |
| Imagen | Course thumbnail (50x50px preview) |
| Estado | Enabled status checkbox |
| Action | Block/unblock button |
src/views/dashboard/Content.jsx:68-135
Block/Unblock Courses
Administrators can control course visibility and availability: Block Course:Blocked courses are marked with
banned: true and enabled: false. They become invisible to students and instructors but data is retained.Payment Management
View Payment Records
The Payments section provides a read-only view of all platform transactions:| Column | Description |
|---|---|
| ID de Pago | Payment unique identifier |
| Nombre de usuario | User’s full name (first + last) |
| Fecha de Pago | Payment date |
| Monto | Payment amount in USD |
| Método de Pago | Payment method (e.g., Stripe) |
| Estado de Pago | Payment status (completed, pending, failed) |
src/views/dashboard/Content.jsx:136-166
Payment Data Structure
Data Fetching
The dashboard loads data from three utility functions:- Users
- Courses
- Payments
Dashboard Layout
The dashboard uses a two-column layout:- Sidebar - Navigation menu with three buttons (Usuarios, Cursos, Pagos)
- Content - Main content area displaying selected data table
src/views/dashboard/Sidebar.jsx:1-25
Best Practices
User Management
User Management
- Always verify user identity before blocking accounts
- Document the reason for blocking users
- Communicate with users before taking blocking action
- Regularly review blocked accounts for potential reinstatement
Course Moderation
Course Moderation
- Review course content before blocking
- Block courses that violate platform policies
- Notify instructors when courses are blocked
- Set
banned: trueflag to distinguish administrative blocks from instructor deactivations
Payment Monitoring
Payment Monitoring
- Regularly audit payment records for discrepancies
- Monitor for unusual payment patterns
- Cross-reference payment amounts with course prices
- Track payment status changes over time
Security Considerations
- Access Control - Only grant admin access to trusted personnel
- Audit Logging - Track all administrative actions with timestamps and user IDs
- Two-Factor Authentication - Require 2FA for admin accounts
- Regular Review - Periodically review admin user list
- Principle of Least Privilege - Grant minimum permissions necessary
Related Documentation
User Profiles
Learn about user profile management
Course Management
Instructor course management tools