/app/maestro/clases.
Creating a class
Open the class form
Click Nueva clase in the header of the classes page, or navigate directly to
/app/maestro/clases?kid=new. The form slides in as a right-side drawer.Fill in the class details
The form accepts the following fields:
| Field | Required | Notes |
|---|---|---|
| Name | Yes | Display name for the class |
| Subject | Yes | Academic subject or topic area |
| Description | Yes | Shown on enrollment pages and invitation emails |
| Cover image | No | Uploaded to the classes Supabase storage bucket |
| Minimum age | No | Students younger than this are rejected at invitation |
| Maximum age | No | Students older than this are rejected at invitation |
Age limits are enforced at the API level when you invite students. The
invite-student endpoint calculates the student’s age from their date of birth and rejects the invitation if they fall outside the configured range.Editing a class
Click the edit icon (pencil) next to any class in the list. The same form drawer opens pre-populated with the current values. Saving sends the samePOST /api/teacher/create-update-classes endpoint with the existing class id included, which triggers an update rather than an insert.
Deleting a class
Click the trash icon next to the class. A confirmation dialog appears. If you confirm, the client sends:deleted = true) on the classes table row.
Sharing a class
Each class has a unique URL of the form/clases/<class_id>. Students can use this link to request enrollment.
Click the share icon on any class row to open the share dialog:
QR code
A QR code is generated client-side using the
qrcode library at 800×800 px. You can download it as a JPEG to print and distribute in class.Enrollment link
The direct URL is shown with a copy button. Clicking copy writes the URL to the clipboard using the Web Clipboard API.
URL_GENERAL environment variable configured on the server:
Inviting students by email
From the Alumnos tab inside a class, click Invitar alumnos to open the invitation dialog.Enter the student's email
Type the student’s registered email address. The button stays disabled until the input passes a standard email regex.
| HTTP status | Message | Cause |
|---|---|---|
| 404 | El estudiante no existe. | No active user found for that email |
| 400 | El estudiante no cumple el rango de edad de la clase. | Student age outside class limits |
| 409 | El estudiante ya está inscrito en esta clase. | Duplicate enrollment |
| 409 | El estudiante ya tiene una solicitud pendiente. | Pending request already exists |
Approving and rejecting enrollment requests
When a student requests enrollment through the class URL, they appear in the Pendientes de aprobación tab of the Alumnos view. For each pending student you can:-
Approve — click the green check icon. The client calls:
The student’s record in the class
students.listJSON array is updated withapproved: true. -
Reject — click the red X icon. The same endpoint is called with
approved=false. The student record is removed from the list entirely.
Removing an enrolled student
From the Alumnos inscritos tab, click the trash icon next to a student row:deleted: true on their entry in the class students.list array. They will no longer appear in the class roster or receive new activities.
API reference
| Endpoint | Method | Purpose |
|---|---|---|
/api/teacher/create-update-classes | POST | Create or update a class |
/api/teacher/invite-student | POST | Send an email invitation to a student |
/api/teacher/approve-reject-student | POST | Approve or reject a pending enrollment |
/api/teacher/delete-class | POST | Soft-delete a class |
/api/teacher/delete-student | POST | Soft-delete a student from a class |