Inforario accepts your official UTM SGU schedule PDF and transforms it into a structured, interactive timetable without any manual data entry. Drop the file onto the upload zone, and Inforario will automatically detect subjects, teachers, time slots, and room codes — then resolve any overlapping sessions before handing the data to the viewer.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DavidCevallos15/inforario-IA-null/llms.txt
Use this file to discover all available pages before exploring further.
The DropZone Component
TheDropZone component is the entry point for all uploads. It accepts drag-and-drop events as well as a standard file picker, validates the file type, and delegates to the useScheduleUpload hook for processing.
Select or drag your PDF
Click Seleccionar Archivo or drag your SGU schedule PDF directly onto the upload zone. The component listens for
dragenter, dragover, dragleave, and drop events and provides visual feedback while a file is being dragged over it.File validation
Only
application/pdf files are accepted. If you drop an unsupported file type, an inline error banner appears with an × dismiss button. Image files are processed through the OCR fallback path in the underlying hook but are not shown in the main drop zone UI.Confirm and process
Once a valid file is selected, its name and size are displayed. Click Procesar Horario to start parsing. The button shows a spinning loader and the text Analizando Documento… while the file is being processed.
Parsing Pipeline
useScheduleUpload orchestrates a two-path pipeline for PDFs and a separate OCR path for images. For PDFs, it first attempts AI-assisted extraction; on failure it falls back to the local regex parser.
- AI Extraction (Primary)
- Local Regex Parser (Fallback)
- OCR Fallback (Images)
The AI path calls The
parseScheduleFileWithEdge from supabaseClient.ts. This function first extracts plain text from the PDF using pdfjs-dist, groups text items by row (y-coordinate proximity ≤ 2 px), then sends the reconstructed plain text to the extract-schedule Supabase Edge Function, which calls Groq’s llama-3.3-70b-versatile model to return a structured session list.mapSessions helper validates each session returned by the AI: it checks that startTime and endTime match HH:MM format, maps Spanish day names to DayOfWeek, strips TECNOLOGÍAS DE LA prefixes and itinerary suffixes from subject names, and drops any entry missing required fields.If Supabase is not configured (missing
VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY), the AI path is skipped entirely and the local parser is used directly.Metadata Extraction
The local parser scans text items in the top portion of page 1 (y < 210) to find the schedule header fields. Each label is matched by text content and its value is read from the next item on the same horizontal line (|candidate.y − label.y| ≤ 5).
PERIODO
Academic period range — normalized from
"ABRIL DE 2026 HASTA AGOSTO DE 2026" to "ABRIL 2026 - AGOSTO 2026".FACULTAD
Faculty name, stored in uppercase and carried into every
ClassSession as subject_faculty.ESCUELA
Career / school name, mapped to the
career field in ParseResult.ESTUDIANTE
Student full name, exposed as
student_name in ParseResult.NIVEL field is also extracted but used internally for filtering only.
Normalization Logic
Subject Names
Raw subject names from the PDF often contain UTM-specific suffixes and prefixes that are stripped during parsing:Teacher Names
UTM stores teacher names in the formatLASTNAME1 LASTNAME2 FIRSTNAME1 FIRSTNAME2. The parser rearranges them to Firstname Lastname and strips academic title prefixes:
TEMP or containing TEMPORAL are normalized to "Sin asignar".
Room / Location Codes
UTM room codes follow the patternCAMPUS-FACULTY-FLOOR-ROOM-TYPE. The parser decodes them into human-readable strings:
1-59-2-04-A
→ Aula 204 - Piso 2 (type code
A = classroom)1-59-3-06-LC
→ Lab. Computación 306 - Piso 3 (type code
LC = computer lab)TIPO and LUGAR fields from the schedule block are used instead.
ParseResult Shape
The parsing functions return aParseResult object consumed by useScheduleUpload to build the final Schedule.
Array of parsed class sessions. Each entry includes
id, subject, day, startTime, endTime, teacher, location, floor, isVirtual, conflict, and color.Faculty name extracted from the PDF header (e.g.
"FACULTAD DE CIENCIAS INFORMÁTICAS").Normalized academic period string (e.g.
"SEPTIEMBRE 2025 - ENERO 2026").Student full name from the
ESTUDIANTE: header field.Career / school name from the
ESCUELA: header field.Accepted File Types
| MIME Type | Processing Path |
|---|---|
application/pdf | AI extraction → local regex parser fallback |
image/png, image/jpeg, image/webp, image/* | OCR via Tesseract.js |
The DropZone UI currently restricts the file picker to
application/pdf only. Image upload is available programmatically via the useScheduleUpload hook for future UI expansion.