Classify organizes platform access around three roles that are stored in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Taykl12/Classify/llms.txt
Use this file to discover all available pages before exploring further.
roles table and referenced by every user record in usuarios.id_rol. Each role unlocks a specific set of features, frontend routes, and backend API endpoints. When a user registers, they are automatically assigned the student (alumno) role. An administrator can later promote that user to professor or admin directly from the admin panel.
Role Assignments
| ID | Role | How it is assigned |
|---|---|---|
| 1 | Admin | Seeded at database setup; admins promote other users |
| 2 | Professor | Promoted from student by an admin via the admin panel |
| 3 | Student | Assigned automatically on registration |
Permissions Comparison
| Capability | Student | Professor | Admin |
|---|---|---|---|
| View own projects | ✅ | ✅ | ✅ |
| Create / edit projects | ✅ | ✅ | ✅ |
| Manage tasks | ✅ | ✅ | ✅ |
| View calendar events | ✅ | ✅ | ✅ |
| View assigned courses | ❌ | ✅ | ✅ |
| Record attendance | ❌ | ✅ | ✅ |
Validate pre-projects (anteproyecto_validado) | ❌ | ✅ | ✅ |
| Lock project sections | ❌ | ✅ | ✅ |
| Manage all users | ❌ | ❌ | ✅ |
| Manage courses and subjects | ❌ | ❌ | ✅ |
| Assign roles to users | ❌ | ❌ | ✅ |
| Access admin panel | ❌ | ❌ | ✅ |
| Monitor ESP32 devices | ❌ | ❌ | ✅ |
How Roles Are Assigned
Every new account created throughPOST /api/auth/register receives id_rol = 3 (alumno) automatically. No additional action is required from the user. To elevate a user to professor or admin, an existing administrator uses the Admin Panel → Users screen, which calls PATCH /api/admin/users/:id with the updated role.
Route Protection
Classify enforces roles at both the frontend and backend:<ProtectedRoute>— any authenticated user (all roles)<ProfessorRoute>— professor role only; redirects others<AdminRoute>— admin role only; redirects others<HomeRedirect>— redirects to the role-appropriate dashboard on/
requireAuth middleware validates the Supabase JWT and attaches the user’s identity to the request. The requireAdmin and requireProfessor middleware then check the role before allowing access to /api/admin/* and /api/professor/* routes respectively.
Explore Each Role
Student
Default role on sign-up. Create projects, manage tasks, and view the calendar.
Professor
Assigned by an admin. Record attendance, validate pre-projects, and lock sections.
Admin
Full platform control. Manage users, courses, subjects, and ESP32 devices.