Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JuanSebax85/frontend-prueba-fullstack/llms.txt

Use this file to discover all available pages before exploring further.

The Sistema de Gestión frontend communicates exclusively with a REST API whose base URL is set via REACT_APP_API_URL. All HTTP calls are made through a shared axios instance, so every endpoint listed below is resolved relative to that base URL. The backend must implement all endpoints described here for the application to function correctly.

CORS requirement

The backend must enable CORS for the origin where the frontend is served (for example, http://localhost:3000). Without it, browsers will block every request from the React app, and none of the features will load.

Endpoints overview

MethodPathPurpose
GET/alumnosList all students
POST/alumnosCreate a student
PUT/alumnos/:idUpdate a student
DELETE/alumnos/:idDelete a student
GET/materiasList all subjects
POST/materiasCreate a subject
PUT/materias/:idUpdate a subject
DELETE/materias/:idDelete a subject
GET/notasList all grades
POST/notasCreate a grade
PUT/notas/:idUpdate a grade
DELETE/notas/:idDelete a grade

Students — /alumnos

GET /alumnos

Returns an array of all students. The frontend sorts the list by apellido client-side. Response body — array of:
id
number
required
Unique identifier for the student.
nombre
string
required
Student’s first name.
apellido
string
required
Student’s last name.
email
string
required
Student’s email address.
fechaNacimiento
string
required
Date of birth. The frontend displays this value as-is, so ISO 8601 format (YYYY-MM-DD) is recommended.

POST /alumnos

Creates a new student. The frontend sends the form fields without an id. Request body:
nombre
string
required
Student’s first name.
apellido
string
required
Student’s last name.
email
string
required
Student’s email address.
fechaNacimiento
string
required
Date of birth in YYYY-MM-DD format.

PUT /alumnos/:id

Updates an existing student. The frontend sends the full alumno object including id. Request body: same shape as the GET /alumnos response object, with id included.

DELETE /alumnos/:id

Deletes a student. If the student has grades registered in the system, the backend must return an error response so the frontend can display a meaningful message to the user. Guarded delete error response:
message
string
required
Human-readable explanation of why the deletion was rejected (for example, "El alumno tiene notas registradas"). The frontend reads error.response.data.message and displays this string in a modal.

Subjects — /materias

GET /materias

Returns an array of all subjects. The frontend sorts the list by nombre client-side. Response body — array of:
id
number
required
Unique identifier for the subject.
nombre
string
required
Subject name.

POST /materias

Creates a new subject. Request body:
nombre
string
required
Subject name.

PUT /materias/:id

Updates an existing subject. The frontend sends the full materia object including id. Request body: same shape as the GET /materias response object, with id included.

DELETE /materias/:id

Deletes a subject. If the subject has grades registered, the backend must return an error response with a message field (same format as the guarded alumno delete above).

Grades — /notas

GET /notas

Returns an array of all grades. The frontend sorts the list by alumnoApellido client-side. Response body — array of:
id
number
required
Unique identifier for the grade record.
alumnoId
number
required
ID of the student this grade belongs to.
alumnoNombre
string
required
First name of the student. Returned as a denormalized field so the list view does not require a separate lookup.
alumnoApellido
string
required
Last name of the student. Used for client-side sorting.
materiaId
number
required
ID of the subject this grade belongs to.
materiaNombre
string
required
Name of the subject. Returned as a denormalized field for display in the list.
valor
number
required
The numeric grade value. The frontend input uses step="0.1", so decimal values are expected.

POST /notas

Creates a new grade. The frontend sends nested objects for alumno and materia. Request body:
valor
number
required
The numeric grade value.
alumno
object
required
materia
object
required
Example POST /notas body
{
  "valor": 8.5,
  "alumno": { "id": 3 },
  "materia": { "id": 1 }
}

PUT /notas/:id

Updates an existing grade. The frontend sends the full payload including the top-level id plus nested objects. Request body: same shape as POST /notas, with the addition of a top-level id field matching the path parameter.
Example PUT /notas/7 body
{
  "id": 7,
  "valor": 9.0,
  "alumno": { "id": 3 },
  "materia": { "id": 1 }
}

DELETE /notas/:id

Deletes a grade record. No guarded delete is required — the frontend calls this directly and reloads the list on success.

Error response format

For guarded deletes (DELETE /alumnos/:id and DELETE /materias/:id), return a non-2xx HTTP status with a JSON body in this shape:
Error response body
{
  "message": "Description of why the operation was rejected."
}
The frontend reads error.response.data.message from the axios error object and displays it in a modal dialog. If message is absent, the frontend falls back to a hardcoded default message.

Environment configuration

Set REACT_APP_API_URL to point the frontend at your backend.

API integration

How the axios instance and services layer are structured.

Build docs developers (and LLMs) love