Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Andr21Da16/UNITRU-ACADEMIC/llms.txt

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

When the dashboard_ready event fires, its data field contains a DashboardReport object — the single compound payload that bundles every piece of academic data the backend has successfully extracted from the SUV. This page documents every field of that root object and all of its nested types, cross-referencing the TypeScript interfaces (used by the frontend) and Python dataclasses (used by the backend serializer).
All numeric grade values in the payload are serialized as strings — for example "14", "13.50", "7". This is because the backend computes grades using Python’s Decimal type for precision, and Decimal is serialized as a string to avoid IEEE 754 rounding artefacts. Parse grade strings in the frontend with parseFloat() or a Decimal library (e.g. new Decimal(course.u1)) before doing arithmetic.

Listening for dashboard_ready

ws.onmessage = (event) => {
  const { event: name, data } = JSON.parse(event.data)
  if (name === "dashboard_ready") {
    const report = data as DashboardReport
    console.log(report.grade_report.courses)
  }
}

DashboardReport

The root object delivered in the dashboard_ready event’s data field.
grade_report
GradeReport
required
Current-cycle grades for all enrolled courses, including per-unit scores, final grades, and grade predictions. Always present (though courses may be empty if extraction failed).
student_profile
StudentProfile | null
Personal and academic profile information scraped from the student info page. null when profile extraction failed.
academic_record
AcademicRecord | null
Full historical course record covering all academic periods the student has attended. null when record extraction failed.
attendance
AttendanceSummary[]
Per-course attendance summary for the current period. Empty array when attendance extraction failed.
schedule
ScheduleSlot[]
The student’s weekly schedule, derived from attendance session data and cross-referenced with the enrollment sheet. Empty array when attendance data is unavailable.
enrollment
Enrollment | null
Current-period enrollment record listing all enrolled courses with credits and group assignments. null when enrollment extraction failed.
optimized_schedules
OptimizedSchedule[]
Top-5 optimized, conflict-free schedule combinations computed from the official course catalog for the next period. Empty array when optimisation failed or no catalog data is available.
analytics
AcademicAnalytics | null
Aggregated period-by-period academic statistics derived from the full course history. null when the academic record is unavailable.

Sub-types

Course

One row in grade_report.courses. Represents a single enrolled course with all published unit scores.

CoursePrediction

Attached to a Course when the backend can project what minimum scores are needed in pending units for the student to pass.

StudentProfile

Personal and institutional information for the student.

AcademicRecord

Complete historical course record across all academic periods.

CourseHistory

A single course entry in the full academic history.

AttendanceSummary

Attendance summary for one course in the current period.

ScheduleSlot

One time block in the student’s weekly timetable.

Enrollment

The student’s current-period enrollment record.

EnrolledCourse

A single course in the current enrollment record.

OptimizedSchedule

One candidate schedule combination produced by the schedule optimisation engine.

OptimizedSelection

Which section/group was selected for a given course in an optimized schedule.

OptimizedSession

A single time block within an optimized schedule candidate.

AcademicAnalytics

Aggregated statistics derived from the full academic history.

PeriodStat

Statistics for a single academic period, used to build historical performance charts.

TypeScript Type Reference

import type { GradeReport } from "@/features/grades/types/grade_types"

export interface DashboardReport {
  grade_report: GradeReport
  student_profile: StudentProfile | null
  academic_record: AcademicRecord | null
  attendance: AttendanceSummary[]
  schedule: ScheduleSlot[]
  enrollment: Enrollment | null
  optimized_schedules: OptimizedSchedule[]
  analytics: AcademicAnalytics | null
}

Python Dataclass Reference

from dataclasses import dataclass, field
from decimal import Decimal
from typing import List, Optional

@dataclass
class CourseDto:
    course_id: str
    course_name: str
    attempt: int
    u1: Optional[Decimal]
    u2: Optional[Decimal]
    u3: Optional[Decimal]
    u4: Optional[Decimal]
    u5: Optional[Decimal]
    u6: Optional[Decimal]
    sust: Optional[Decimal]
    np: Optional[Decimal]
    apla: Optional[Decimal]
    final_grade: Optional[Decimal]
    inh: bool
    average: Optional[Decimal] = None
    prediction: Optional[CoursePredictionDto] = None

@dataclass
class GradeReportDto:
    period: Optional[str]
    payment_order: Optional[str]
    enrollment_type: Optional[str]
    courses: List[CourseDto] = field(default_factory=list)

Build docs developers (and LLMs) love