How the tutor role works
Tutors and students are separate accounts in theusers table. A student is associated with a tutor via the tutor foreign key on the student’s row. When a tutor creates a student account, that tutor field is set to the tutor’s own user ID.
The tutor has no access to teacher-only features such as class creation or grading. Their dashboard surfaces only data about the students they manage.
The tutor dashboard
After logging in, tutors land at/app/tutor. The dashboard has two areas:
Header banner
The banner displays the tutor’s name and two quick-action buttons:| Button | Destination |
|---|---|
| Ver hijos | /app/tutor/hijos — list of all registered students |
| Añadir nuevo hijo | /app/tutor/hijos?kid=new — opens the new-student form |
Recent activity section
Data for this section comes from thetutor_dashboard Supabase view, filtered by the tutor’s ID. While it loads, a placeholder is shown. Once resolved, the layout depends on whether the tutor has students registered:
With students registered:
A row of avatar buttons appears, one per student. Clicking a student’s avatar selects them and updates the two panels below:
Study hours chart
A line chart showing the student’s session minutes per day over the last 30 days. Data comes from
sessions_last_30d on the student record returned by the dashboard view.Student detail card
Shows the student’s name, calculated age, and a bar chart of completed activities per class. Each bar compares
delivered_count against assigned_count for each enrolled class.What tutors can see
Thetutor_dashboard view surfaces the following per-student data:
| Data point | Source |
|---|---|
| Name and photo | users table |
| Age | Calculated from dob using getAgeFromDob |
| Study session minutes (last 30 days) | sessions_last_30d array from dashboard view |
| Enrolled classes | classes array with class_name, assigned_count, delivered_count |
- The content of class activities or exams
- Student submissions or grades in detail
- Montero AI conversation transcripts
Containment situations
If a student triggers a containment situation (a concern flagged by the Montero AI system), the situation appears on the student’s row in the/app/tutor/hijos page with a warning icon. Clicking the icon opens a side panel showing:
- The situation level (
leve/grave) - A summary
- The date and time
- The last message from the triggering conversation
Navigating the tutor area
Dashboard
Aggregated view of all your students’ recent activity.
Student monitoring
Detailed per-student progress: classes, activity completion, and session data.