Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Luisanchez0/modulo_Horario/llms.txt

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

Subjects (materias) and classrooms (aulas) are managed in two separate catalog microservices: materias-service and aulas-service. Both catalogs feed directly into the schedule generator — when you trigger automatic generation, the system reads from both services to find all available subjects and classrooms.

Subjects

A subject represents a course that needs to be placed on the schedule. Each subject has the following fields:
FieldRequiredDescription
nombreYesName of the subject, e.g. “Base de Datos”.
codigoYesShort course code, e.g. “BD101”. Displayed in the schedule table.
creditosYesNumber of credits. Must be greater than zero.
turnoYesShift preference: MATUTINO, VESPERTINO, or AMBOS. The generator uses this when matching subjects to available time slots.
descripcionNoOptional free-text description of the subject content.

Adding a subject from the UI

1

Navigate to the Materias page

Open the Materias section from the main menu. You must be logged in as ADMIN to see the creation form.
2

Fill in the subject fields

Enter the name, code, and number of credits. Select the shift that matches when this subject should be taught. Optionally add a description.
3

Click Crear materia

The subject appears in the table immediately and is now available for selection when generating or manually creating schedules.

Adding a subject via the API

curl -X POST http://localhost:8002/api/v1/materias/ \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Base de Datos",
    "codigo": "BD101",
    "creditos": 4,
    "turno": "MATUTINO",
    "descripcion": "Modelo relacional y SQL"
  }'

Classrooms

A classroom is a physical space where a subject can be taught. Each classroom has two fields:
FieldRequiredDescription
nombreYesName or identifier of the classroom, e.g. “Aula A1” or “Laboratorio B2”.
capacidadYesMaximum number of students. Must be at least 1. Shown in the schedule table next to the classroom name.

Adding a classroom from the UI

1

Navigate to the Aulas page

Open the Aulas section from the main menu. You must be logged in as ADMIN to see the creation form.
2

Enter the classroom name and capacity

Provide a descriptive name and the room’s student capacity.
3

Click Crear aula

The classroom is saved and immediately available for use in schedule generation.

Adding a classroom via the API

curl -X POST http://localhost:8003/aulas \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <admin-token>" \
  -d '{
    "nombre": "Aula A1",
    "capacidad": 35
  }'

How catalogs connect to schedule generation

When you trigger automatic generation, the schedule generator queries both materias-service and aulas-service to fetch the records you selected (or all records if you didn’t specify IDs). It then attempts to assign every subject to a valid teacher-classroom-slot combination. Neither service stores schedule data — they only maintain the catalog records.
Having more classrooms than concurrent time slots in your workday gives the generator more combinations to work with and reduces the number of unassigned subjects. For example, if you have six subjects and two classrooms with a two-hour slot duration over a four-hour workday, the generator can fill at most four slots across both rooms — two subjects will remain unassigned.

Editing and deleting catalog records

Both the Materias page and the Aulas page show Editar and Eliminar buttons in the table for each record (ADMIN only). Editing updates the catalog entry immediately. Deleting removes it permanently — existing schedule entries that reference the deleted subject or classroom will still display using their cached name from when the schedule was created.

Build docs developers (and LLMs) love