data model and types
TypeScript types for generated schedules, raw JSON, exams, and subjects. Related: State, Python pipeline.
YourTietable#
interface YourTietable {
[day: string]: {
[timeSlot: string]: {
subject_name: string;
type: "L" | "T" | "P" | "C";
location: string;
};
};
}
Days in the Python output are full names (Monday). Raw JSON uses MON. WeekSchedule in types/schedule.ts is the same nested shape.
Class types#
flowchart LR L[Lecture] T[Tutorial] P[Practical] C[Custom] classDef lecture fill:#35;F0BB78,stroke:#35;543A14,color:#35;111111 classDef tutorial fill:#35;543A14,stroke:#35;F0BB78,color:#35;FFFFFF classDef practical fill:#35;FFF0DC,stroke:#35;543A14,color:#35;111111 classDef custom fill:#35;FF9B50,stroke:#35;543A14,color:#35;111111 class L lecture class T tutorial class P practical class C custom
| Code | Source | Card color (Tailwind) |
|---|---|---|
| L | parser | #F0BB78 |
| T | parser | #543A14 |
| P | parser | #FFF0DC |
| C | EditEventDialog | #FF9B50 |
Python ClassType in parser/models/enums.py is the same union. ClassInfo is a dataclass: subject_name, type, location.
Raw timetable JSON#
Files: website/data/time-table/{year}/{SEMESTER}/{campus}.json with campus 62, 128, or BCA.
flowchart TB File["EVEN26/62.json"] --> Y1["1"] File --> Y2["2"] Y1 --> TT[timetable] Y1 --> SUB[subjects] TT --> MON["MON"] MON --> Slot["9-9.50 class strings"]
Year keys "1"…"4" (BCA up to "3"). Each year:
{
"timetable": {
"MON": {
"9-9.50": ["TA4(CI121)-TS10/APR", "PA5(PH271)-PL1/MKC"]
}
},
"subjects": [
{ "Code": "CI121", "Full Code": "24B11CI121", "Subject": "..." }
]
}
Activity strings pack batch, type letter, subject code, room, faculty. The parser splits them.
Subjects#
website/types/subject.ts and form Subject:
| Field | Meaning |
|---|---|
| Code | Short code used in electives |
| Full Code | Catalog code |
| Subject | Display name |
Context#
schedule: YourTietable | null
editedSchedule: (YourTietable cells + isCustom?) | null
Edits copy the base schedule, then overlay. Display uses editedSchedule || schedule.
Exams#
interface ExamEntry {
subject_code: string;
subject_type: "L" | "T" | "P";
subject_name: string;
exam_date: string; // DD-MM-YYYY
exam_time: string;
exam_day: string;
semesters: number[];
exam_type: string;
}
On-disk JSON still has semester as a string like "2, 4". The UI normalizes that to semesters.
Academic calendar#
{ summary: string; start: { date: string }; end: { date: string } }
Holidays are titles that start with Holiday -.
Mess#
menu: {
[dayLabel: string]: {
Breakfast: string;
Lunch: string;
Lunch128?: string;
Dinner: string;
};
}
Day keys look like Monday 01.08.25.
Type flow#
flowchart LR JSON[campus JSON] --> Py[create_time_table] Py --> YT[YourTietable] YT --> Ctx[UserContext] Ctx --> UI[ScheduleDisplay / Timeline]
Raw slots stay strings until Python. After toJs(), TypeScript treats the object as YourTietable.