Skip to main content

Documentation 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.

Classify organizes platform access around three roles that are stored in the 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

IDRoleHow it is assigned
1AdminSeeded at database setup; admins promote other users
2ProfessorPromoted from student by an admin via the admin panel
3StudentAssigned automatically on registration

Permissions Comparison

CapabilityStudentProfessorAdmin
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 through POST /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 /
On the API side, the 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.

Build docs developers (and LLMs) love