The Sistema de Gestión frontend is a single-page application (SPA) built with React 19 and served by Nginx inside a Docker container. The application communicates with a backend REST API using Axios and organises its UI into three feature modules — Students (Alumnos), Subjects (Materias), and Grades (Notas) — each controlled by a singleDocumentation 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.
vista state value in App.js.
Technology stack
| Layer | Technology |
|---|---|
| UI framework | React 19 (react, react-dom) |
| HTTP client | Axios 1.x |
| Build tool | Create React App (react-scripts 5) |
| Web server | Nginx (Alpine) |
| Container | Docker multi-stage build |
Docker and Nginx deployment
The application is built and served via a two-stage Dockerfile. The first stage uses the officialnode:20 image to produce a production build (npm run build). The second stage copies the resulting /app/build directory into an Nginx Alpine image and serves it on port 80.
Dockerfile
The
REACT_APP_API_URL environment variable must be set at build time so that Create React App can embed it in the bundle. See the Environment Configuration page for details.View-switching pattern
App.js controls which feature module is displayed using a single vista state variable initialised to "alumnos". Three menu buttons call setVista to switch between the three values: "alumnos", "materias", and "notas". Only the matching JSX block is rendered at a time.
App.js (simplified)
Top-level state groups
App.js maintains three independent state groups, one per feature module.
| State pair | Purpose |
|---|---|
alumnoSeleccionado / setAlumnoSeleccionado | Holds the student object being edited, or null when creating. |
materiaSeleccionada / setMateriaSeleccionada | Holds the subject object being edited, or null when creating. |
notaSeleccionada / setNotaSeleccionada | Holds the grade object being edited, or null when creating. |
Refresh toggle pattern
Each list component (AlumnosLista, MateriasLista, NotasLista) fetches data once on mount inside a useEffect. To force a re-fetch after a create or update, App.js passes the boolean toggle value (refrescarAlumnos, etc.) as the React key prop on the list. Flipping the boolean between true and false unmounts and remounts the list, triggering its useEffect again.
Refresh toggle example
Component tree
Feature modules
Students
Manage student records including name, email, and date of birth.
Subjects
Create and update the subjects available for grade assignment.
Grades
Record and edit numeric grades linking students to subjects.