/app/tutor/hijos is where you create, edit, and monitor the students linked to your tutor account.
Student list
The page shows all students whosetutor field matches your tutor ID, ordered alphabetically by first name. Each row shows:
- Student avatar (photo or initials fallback)
- Full name and calculated age
- Email address
- A warning icon if containment situations exist
- Edit and delete action buttons
Adding a student
Open the form
Click Nuevo hijo in the page header, or navigate to
/app/tutor/hijos?kid=new. A right-side drawer opens with the registration form.Fill in the student details
| Field | Required | Validation |
|---|---|---|
| First name | Yes | 3–50 characters |
| Last name | Yes | 3–50 characters |
| Yes | Valid email format; must be unique across the platform | |
| Date of birth | Yes | Student must be at least 8 years old |
| Sex | No | male, female, or other |
| Phone | No | Exactly 10 digits (Mexican format); must be unique if provided |
| Password | Yes (on create) | Must match confirmation field |
| Photo | No | Uploaded to Supabase storage under the users bucket |
Create the account
Submit the form. The client sends:On success, the server:
- Validates all fields with Zod schemas
- Checks for duplicate email or phone across the
userstable - Hashes the password with bcrypt
- Inserts the new user row with
tutorset to your ID - Sends a welcome email with an email-confirmation link to the student
The welcome email contains a confirmation link of the form
{URL_GENERAL}confirmar?t={token}&r=onmula. The student must click it to activate their account.Editing a student
Click the edit icon on any student row. The same form drawer opens pre-populated with the current values. Theid field is included in the submission, which triggers an update rather than an insert:
new_password and confirm_password if you want to change it. Photo replacement uploads a new file and removes all previous photos for that student from storage.
Deleting a student
Click the trash icon on a student row. A confirmation dialog appears. If you confirm:deleted = true) on the users table row.
Viewing progress per student
Progress data appears on the tutor dashboard (/app/tutor) rather than on a separate detail page. To view a specific student’s metrics:
Select the student
Click the student’s avatar in the row of avatar buttons. The charts below update immediately.
Review the charts
Two panels update to show the selected student’s data:
- Study hours (last 30 days) — a line chart showing daily session minutes. Each point on the x-axis is a calendar day; the y-axis shows minutes.
- Completed activities — a bar chart per class showing
delivered_countversusassigned_count.
/app/tutor/hijos?kid={student_id}. This pre-selects the student in the edit form.
Containment situations
If the Montero AI flags an emotionally sensitive conversation for a student, acontainment_situations record is created. The tutor sees:
- A warning icon (amber triangle) on the student’s row in
/app/tutor/hijos - A side panel that opens on click, listing all situations for that student
| Field | Description |
|---|---|
| Level | leve (mild, orange border) or grave (serious, red border) |
| Summary | Short description of the flagged content |
| Date/time | When the situation was detected |
| Last message | The final message from the triggering conversation |
How student data stays in sync
The tutor dashboard view (tutor_dashboard) is a Supabase database view that aggregates live data. It is re-fetched each time you load the dashboard page — there is no manual refresh step. Class enrollments, submitted activities, and session records are all read at the time of page load.
API reference
| Endpoint | Method | Purpose |
|---|---|---|
/api/tutor/create-update-users | POST | Create or update a student account |
/api/tutor/delete-user | POST | Soft-delete a student account |