This guide takes you from zero to a working API call. You only need Docker and Docker Compose installed — no Java or Maven required on your local machine. By the end, you will have the API running and have created your first student, subject, and grade records.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSebax85/backend-prueba-fullstack/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker and Docker Compose installed and running.
- A copy of the repository cloned locally.
- The
backup.dumpfile provided with the project (used to seed the database).
Setup
Start the database
Start only the PostgreSQL service first so it is ready before the backend tries to connect.The service is named
db in docker-compose.yml and runs PostgreSQL 15. The container will be accessible as postgres_db on the internal Docker network.Wait a few seconds after this command before moving on. PostgreSQL needs a moment to initialise before it accepts connections.
Restore the database backup
Copy the dump file into the running container and restore it:The first command places
backup.dump inside the container. The second runs psql to execute the dump against the prueba database using the postgres user.Build and start the backend
--build flag forces Docker to rebuild the backend image from source. You only need this flag the first time, or after making changes to the source code.Watch the logs until you see Spring Boot report that the application has started. The server binds to port 8080.First API calls
With the API running, try the following examples to create and retrieve records.Students (Alumnos)
POST /alumnos returns the created Alumno object with its generated id. You will need this id when creating a Nota.
Subjects (Materias)
Grades (Notas)
To create a Nota you must reference an existing Alumno and an existing Materia by theirid values.
Replace
"id": 1 with the actual IDs returned when you created the Alumno and Materia in the previous steps.Referential integrity
The API enforces referential integrity at the controller level. If you try to delete an Alumno that has one or more associated Notas, the API returns400 Bad Request and does not delete the record.
What’s next
Introduction
Learn about the data model, architecture, and design choices behind the API.
Configuration guide
Customise environment variables, database settings, and CORS configuration.
API reference — Alumnos
Full endpoint reference for student records.
API overview
Understand base URL, response formats, and error codes.