Skip to main content

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.

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.

Prerequisites

  • Docker and Docker Compose installed and running.
  • A copy of the repository cloned locally.
  • The backup.dump file provided with the project (used to seed the database).

Setup

1

Clone the repository

git clone https://github.com/JuanSebax85/backend-prueba-fullstack.git
cd backend-prueba-fullstack
2

Start the database

Start only the PostgreSQL service first so it is ready before the backend tries to connect.
docker compose up -d db
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.
3

Restore the database backup

Copy the dump file into the running container and restore it:
docker cp backup.dump postgres_db:/backup.dump
docker exec -it postgres_db psql -U postgres -d prueba -f /backup.dump
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.
4

Build and start the backend

docker compose up --build backend
The --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.
5

Verify the API is running

In a new terminal, send a request to the students endpoint:
curl http://localhost:8080/alumnos
A 200 OK response with a JSON array confirms the API is up. An empty array ([]) is expected if the database was restored without student records.

First API calls

With the API running, try the following examples to create and retrieve records.

Students (Alumnos)

curl http://localhost:8080/alumnos
A successful POST /alumnos returns the created Alumno object with its generated id. You will need this id when creating a Nota.

Subjects (Materias)

curl http://localhost:8080/materias

Grades (Notas)

To create a Nota you must reference an existing Alumno and an existing Materia by their id values.
curl http://localhost:8080/notas
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 returns 400 Bad Request and does not delete the record.
To delete an Alumno, first delete all Notas that reference that Alumno. The same rule applies to Materias — you cannot delete a Materia that is referenced by existing Notas.

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.

Build docs developers (and LLMs) love