Skip to main content

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.

Inforario’s type definitions live under src/types/ and are re-exported through a single barrel at src/types/index.ts. The barrel re-exports everything from types/sgu.ts (schedule domain types) and types/database.ts (Supabase row shapes), then adds the two application-level enums directly. This page documents every public type in source order, plus CalendarEventInput and SyncCalendarResponse from the Google Calendar Edge service.

From types/index.ts

types/index.ts re-exports all symbols from types/sgu.ts and types/database.ts, and directly defines the two application-level enums below.

AppView

Controls which top-level view the application renders. Managed by the root App component.
export enum AppView {
  LANDING   = 'LANDING',
  DASHBOARD = 'DASHBOARD',
  ABOUT     = 'ABOUT',
  LOGIN     = 'LOGIN',
  PROFILE   = 'PROFILE',
}
LANDING
string
The public landing/home page shown to unauthenticated users.
DASHBOARD
string
The main schedule viewer and editor, accessible to all users (including guests).
ABOUT
string
Informational page describing the application.
LOGIN
string
Authentication page (sign-in / sign-up / password reset).
PROFILE
string
Authenticated user’s profile and saved schedules page.

Feature

Represents individual app capabilities gated behind feature-flag checks or used to track analytics events.
export enum Feature {
  UPLOAD           = 'UPLOAD',
  PROCESS          = 'PROCESS',
  RESOLVE_CONFLICT = 'RESOLVE_CONFLICT',
  EDIT_NAME        = 'EDIT_NAME',
  SAVE_CLOUD       = 'SAVE_CLOUD',
  CUSTOMIZE_COLOR  = 'CUSTOMIZE_COLOR',
  DOWNLOAD_PDF     = 'DOWNLOAD_PDF',
  SYNC_CALENDAR    = 'SYNC_CALENDAR',
}
ValueDescription
UPLOADUpload a schedule file (PDF or image)
PROCESSRun the local or AI parser on the uploaded file
RESOLVE_CONFLICTDisplay and handle detected time conflicts
EDIT_NAMERename a schedule or session title
SAVE_CLOUDPersist the current schedule to Supabase
CUSTOMIZE_COLORChange the color assigned to a subject
DOWNLOAD_PDFExport the schedule grid as a PDF
SYNC_CALENDARPush sessions to Google Calendar via Edge Function

From types/sgu.ts

types/sgu.ts defines the core schedule domain types: the day union, the session shape, the top-level schedule wrapper, and the theme selector.

DayOfWeek

A string union type representing the five weekdays used in UTM schedules. Only these values are ever stored in ClassSession.day.
export type DayOfWeek = 'Lunes' | 'Martes' | 'Miércoles' | 'Jueves' | 'Viernes';

DAYS

The ordered constant array of all weekdays. Used to render schedule grid columns Monday–Friday.
export const DAYS: DayOfWeek[] = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes'];

ClassSession

The core data unit. Represents a single scheduled class occurrence (or a virtual/unscheduled subject). Every parsed schedule is ultimately a ClassSession[].
export interface ClassSession {
  id: string;
  subject: string;
  subject_faculty?: string;
  day?: DayOfWeek;
  startTime?: string;
  endTime?: string;
  teacher: string;
  location: string;
  floor?: string;
  isVirtual?: boolean;
  color?: string;
  conflict?: boolean;
}
id
string
required
A UUID generated with crypto.randomUUID() at parse time. Used as React key and for database identity.
subject
string
required
The normalised subject name in UPPERCASE. Prefixes like "TECNOLOGÍAS DE LA" and parenthetical codes (e.g. "(A19)") are stripped by the parser.
subject_faculty
string
The faculty that owns this specific subject. Useful when a student’s schedule spans multiple faculties. Optional — may be undefined for AI-parsed sessions.
day
DayOfWeek
Day of the week. undefined for virtual or unscheduled subjects.
startTime
string
Start time in "HH:mm" 24-hour format (e.g. "08:00"). undefined for virtual sessions.
endTime
string
End time in "HH:mm" 24-hour format (e.g. "10:00"). undefined for virtual sessions.
teacher
string
required
Normalised teacher name in "Firstname Lastname" format. Defaults to 'Sin asignar' or 'N/A' when unknown.
location
string
required
Human-readable classroom string, e.g. "Aula 204 - Piso 2" or "Lab. Computación 306 - Piso 3". Virtual sessions use "Virtual" or "Materia Virtual".
floor
string
Extracted floor number as a string (e.g. "2"). "N/A" when not determinable or for virtual sessions.
isVirtual
boolean
true when the session has no physical classroom. Virtual sessions are excluded from ICS generation and Google Calendar sync.
color
string
A hex colour string (e.g. "#22C55E") assigned per-subject by the parser. Can be overridden by the user via the CUSTOMIZE_COLOR feature.
conflict
boolean
true when this session’s time slot overlaps with another session on the same day. Set by resolveConflicts(). Never causes a session to be removed.

Schedule

The top-level schedule object stored in state, passed to rendering components, and persisted to the database.
export interface Schedule {
  id?: string;
  title: string;
  academic_period?: string;
  faculty?: string;
  sessions: ClassSession[];
  lastUpdated: Date | string;
}
id
string
The UUID of the Supabase schedules row. Absent for schedules that have not yet been saved to the database. Its presence controls whether saveScheduleToDB performs an UPDATE or INSERT.
title
string
required
A display name for the schedule set by the user (e.g. "Horario 2025-A").
academic_period
string
Normalised period string (e.g. "ABRIL 2025 - AGOSTO 2025"). Used in the ICS filename and schedule header display.
faculty
string
The student’s faculty, extracted from the SGU header (e.g. "FACULTAD DE CIENCIAS INFORMÁTICAS").
sessions
ClassSession[]
required
The complete array of parsed class sessions, including both schedulable and virtual/unscheduled entries.
lastUpdated
Date | string
required
ISO 8601 timestamp or Date object of the last save. Written as new Date().toISOString() by saveScheduleToDB.

ScheduleTheme

Controls the visual appearance preset applied to the schedule grid.
export type ScheduleTheme = 'DEFAULT' | 'MINIMALIST' | 'SCHOOL' | 'NEON';
ValueDescription
DEFAULTStandard color-coded grid
MINIMALISTLow-contrast, muted palette
SCHOOLBold, high-readability design
NEONDark background with bright accent colors

From types/database.ts

types/database.ts defines the Supabase row shapes and imports ClassSession from types/sgu.ts.

UserProfile

Represents a row from the Supabase profiles table. Populated by a database trigger on auth.users insert.
export interface UserProfile {
  id: string;
  email: string;
  full_name?: string;
  avatar_url?: string;
  career?: string;
}
id
string
required
UUID — matches auth.users.id (foreign key).
email
string
required
The user’s email address as registered in Supabase Auth.
full_name
string
Display name. Populated from options.data.full_name during signUpWithEmail(), or from the Google OAuth profile.
avatar_url
string
URL to the user’s profile picture. Set automatically for Google OAuth users; undefined for email/password accounts.
career
string
The academic programme (carrera) of the student. Optional — may be filled by the user in their profile settings.

DBResponseSchedule

Shape of a row returned from the Supabase schedules table. Used as the return type of getScheduleById(). Note that getUserSchedules() selects only id, title, academic_period, and last_updated — it does not return the full DBResponseSchedule shape.
export interface DBResponseSchedule {
  id: string;
  user_id: string;
  title: string;
  academic_period?: string;
  faculty?: string;
  schedule_data: ClassSession[];
  created_at: string;
}
id
string
required
UUID primary key of the schedule row.
user_id
string
required
UUID of the owning user — foreign key to auth.users.id.
title
string
required
Schedule display name.
academic_period
string
Normalised academic period string (e.g. "ABRIL 2025 - AGOSTO 2025").
faculty
string
Faculty name stored with the schedule.
schedule_data
ClassSession[]
required
The full session array, stored as JSON in the database column schedule_data. Deserialised automatically by the Supabase client. This field is only present when fetched by getScheduleById() (which selects *).
created_at
string
required
ISO 8601 timestamp set by the database on row creation.
The schedules table also has a last_updated column that is not part of the DBResponseSchedule interface. It is written by saveScheduleToDB and returned by getUserSchedules() lightweight queries, but is not modelled in this interface. Extend the type if your UI needs to display it.

From services/google/googleCalendarEdge.ts

CalendarEventInput

The shape of a single calendar event sent to the google-calendar-sync Edge Function. Mirrors the Google Calendar API v3 event structure.
export interface CalendarEventInput {
  summary: string;
  description?: string;
  location?: string;
  start: {
    dateTime: string;
    timeZone: string;
  };
  end: {
    dateTime: string;
    timeZone: string;
  };
  recurrence?: string[];
}
summary
string
required
The event title — set to session.subject.
description
string
Free-text body. Set to "Docente: {teacher}" by buildCalendarEventsFromSchedule().
location
string
Human-readable classroom string from session.location.
start.dateTime
string
required
ISO 8601 datetime string of the first occurrence (e.g. "2025-04-14T08:00:00.000Z").
start.timeZone
string
required
IANA timezone identifier resolved via Intl.DateTimeFormat().resolvedOptions().timeZone (defaults to the user’s browser timezone).
end.dateTime
string
required
ISO 8601 datetime string of the first occurrence’s end time.
end.timeZone
string
required
Same IANA timezone as start.timeZone.
recurrence
string[]
Array of RFC 5545 recurrence rule strings. Set to ["RRULE:FREQ=WEEKLY;UNTIL={untilStr}"] by buildCalendarEventsFromSchedule(). Absent for one-off events.

SyncCalendarResponse

The response shape returned by syncCalendarEvents() after calling the google-calendar-sync Edge Function. This type is internal to googleCalendarEdge.ts and not re-exported from the barrel.
interface SyncCalendarResponse {
  success: boolean;
  message: string;
  events?: Array<{ id: string; htmlLink?: string }>;
}
success
boolean
required
true when the Edge Function created all events successfully; false on any failure (including Supabase misconfiguration and empty event arrays).
message
string
required
Human-readable status or error message. Shown directly to the user in the UI on failure.
events
Array<{ id: string; htmlLink?: string }>
Array of created Google Calendar event objects. Each entry contains the Google-assigned event id and an optional htmlLink deep-link URL. Present only on success.

Build docs developers (and LLMs) love