# lollllz/gmi-student-timetable architecture

> Architecture diagram of the GitHub repository lollllz/gmi-student-timetable, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lollllz/gmi-student-timetable
- Repository: https://github.com/lollllz/gmi-student-timetable

## Overview

GMI Student Timetable is a static browser app for browsing reconstructed schedules by class or lecturer, then exporting calendars. The main workflow selects a timetable, loads its data, and presents a searchable weekly or daily view; users can also share a selected week. Separate local-file workflows decode compatible DAV files for class-only calendar export and support experimental edits to recurring lessons. Groups reflect the user interface, schedule data, and local-file capabilities. Edges rely on the README and shown app imports/calls; unsampled UI behavior is included only where documented.

Main entry points: [`app.js`](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js) (App controller), [`dav-reader.js`](https://github.com/lollllz/gmi-student-timetable/blob/main/dav-reader.js) (DAV decoder), [`file-worker.js`](https://github.com/lollllz/gmi-student-timetable/blob/main/file-worker.js) (File worker), [`dav-writer.js`](https://github.com/lollllz/gmi-student-timetable/blob/main/dav-writer.js) (DAV editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Timetable experience"]
  node_app["App controller<br/>[app.js]"]
  node_classsearch["Class search<br/>[class-search.js]"]
  node_weekplanner["Week and day planner<br/>[app.js]"]
  node_eventsearch["Event search and details<br/>[core.js]"]
  node_lecturerview["Lecturer view<br/>[app.js]"]
  node_accessibility["Accessibility preferences<br/>[app.js]"]
end

subgraph group_schedule["Schedule data"]
  node_manifest["Schedule manifest<br/>[manifest.json]"]
  node_classdata["Class datasets"]
  node_lecturerdata["Lecturer datasets"]
  node_datecore["Date and week logic<br/>[core.js]"]
end

subgraph group_exports["Calendar and sharing"]
  node_classcalendar["Calendar generation<br/>[calendar.js]"]
  node_publishedcalendars["Published calendars"]
  node_sharing["Week sharing<br/>[app.js]"]
end

subgraph group_localfile["Local DAV workflows"]
  node_davfile["Local DAV file"]
  node_fileworker["File worker<br/>[file-worker.js]"]
  node_davreader["DAV decoder<br/>[dav-reader.js]"]
  node_localtimetable["Decoded timetable"]
  node_davwriter["DAV editor<br/>[dav-writer.js]"]
  node_davdownload["Edited DAV download<br/>[app.js]"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"loads"| node_manifest
node_app -->|"searches classes"| node_classsearch
node_app -->|"loads selected data"| node_classdata
node_app -->|"loads lecturer data"| node_lecturerdata
node_app -->|"renders"| node_weekplanner
node_app -->|"filters events"| node_eventsearch
node_app -->|"uses date logic"| node_datecore
node_app -->|"offers"| node_lecturerview
node_app -->|"offers preferences"| node_accessibility
node_app -->|"generates export"| node_classcalendar
node_student -->|"downloads"| node_publishedcalendars
node_app -->|"shares selected week"| node_sharing
node_student -->|"opens locally"| node_davfile
node_app -->|"reads file in"| node_fileworker
node_fileworker -->|"decodes with"| node_davreader
node_davreader -->|"produces"| node_localtimetable
node_app -->|"loads and displays"| node_localtimetable
node_app -->|"requests edits"| node_davwriter
node_davwriter -->|"re-decodes edits"| node_davreader
node_app -->|"exports file"| node_davdownload

click node_app "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"
click node_classsearch "https://github.com/lollllz/gmi-student-timetable/blob/main/class-search.js"
click node_weekplanner "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"
click node_eventsearch "https://github.com/lollllz/gmi-student-timetable/blob/main/core.js"
click node_lecturerview "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"
click node_accessibility "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"
click node_manifest "https://github.com/lollllz/gmi-student-timetable/blob/main/public/data/manifest.json"
click node_classdata "https://github.com/lollllz/gmi-student-timetable/tree/main/public/data"
click node_lecturerdata "https://github.com/lollllz/gmi-student-timetable/tree/main/public/lecturers"
click node_datecore "https://github.com/lollllz/gmi-student-timetable/blob/main/core.js"
click node_classcalendar "https://github.com/lollllz/gmi-student-timetable/blob/main/calendar.js"
click node_publishedcalendars "https://github.com/lollllz/gmi-student-timetable/tree/main/public/calendars"
click node_sharing "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"
click node_fileworker "https://github.com/lollllz/gmi-student-timetable/blob/main/file-worker.js"
click node_davreader "https://github.com/lollllz/gmi-student-timetable/blob/main/dav-reader.js"
click node_davwriter "https://github.com/lollllz/gmi-student-timetable/blob/main/dav-writer.js"
click node_davdownload "https://github.com/lollllz/gmi-student-timetable/blob/main/app.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_classsearch,node_weekplanner,node_eventsearch,node_lecturerview,node_accessibility toneBlue
class node_manifest,node_classdata,node_lecturerdata,node_datecore toneAmber
class node_classcalendar,node_publishedcalendars,node_sharing toneMint
class node_davfile,node_fileworker,node_davreader,node_localtimetable,node_davwriter,node_davdownload toneRose
class node_student toneIndigo
```

## Components

### Timetable experience

- [App controller](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`
- [Class search](https://github.com/lollllz/gmi-student-timetable/blob/main/class-search.js): `class-search.js`
- [Week and day planner](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`
- [Event search and details](https://github.com/lollllz/gmi-student-timetable/blob/main/core.js): `core.js`
- [Lecturer view](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`
- [Accessibility preferences](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`

### Schedule data

- [Schedule manifest](https://github.com/lollllz/gmi-student-timetable/blob/main/public/data/manifest.json): `public/data/manifest.json`
- [Class datasets](https://github.com/lollllz/gmi-student-timetable/tree/main/public/data): `public/data`
- [Lecturer datasets](https://github.com/lollllz/gmi-student-timetable/tree/main/public/lecturers): `public/lecturers`
- [Date and week logic](https://github.com/lollllz/gmi-student-timetable/blob/main/core.js): `core.js`

### Calendar and sharing

- [Calendar generation](https://github.com/lollllz/gmi-student-timetable/blob/main/calendar.js): `calendar.js`
- [Published calendars](https://github.com/lollllz/gmi-student-timetable/tree/main/public/calendars): `public/calendars`
- [Week sharing](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`

### Local DAV workflows

- **Local DAV file**
- [File worker](https://github.com/lollllz/gmi-student-timetable/blob/main/file-worker.js): `file-worker.js`
- [DAV decoder](https://github.com/lollllz/gmi-student-timetable/blob/main/dav-reader.js): `dav-reader.js`
- **Decoded timetable**
- [DAV editor](https://github.com/lollllz/gmi-student-timetable/blob/main/dav-writer.js): `dav-writer.js`
- [Edited DAV download](https://github.com/lollllz/gmi-student-timetable/blob/main/app.js): `app.js`

### Other components

- **Student**

## Connections

- Student → App controller: uses (evidence: `README.md`)
- App controller → Schedule manifest: loads (evidence: `app.js`)
- App controller → Class search: searches classes (evidence: `app.js`)
- App controller → Class datasets: loads selected data (evidence: `app.js`)
- App controller → Lecturer datasets: loads lecturer data (evidence: `app.js`)
- App controller → Week and day planner: renders (evidence: `README.md`)
- App controller → Event search and details: filters events (evidence: `README.md`)
- App controller → Date and week logic: uses date logic (evidence: `app.js`)
- App controller → Lecturer view: offers (evidence: `README.md`)
- App controller → Accessibility preferences: offers preferences (evidence: `README.md`)
- App controller → Calendar generation: generates export (evidence: `README.md`)
- Student → Published calendars: downloads (evidence: `README.md`)
- App controller → Week sharing: shares selected week (evidence: `app.js`)
- Student → Local DAV file: opens locally (evidence: `README.md`)
- App controller → File worker: reads file in (evidence: `README.md`)
- File worker → DAV decoder: decodes with (evidence: `file-worker.js`)
- DAV decoder → Decoded timetable: produces (evidence: `README.md`)
- App controller → Decoded timetable: loads and displays (evidence: `README.md`)
- App controller → DAV editor: requests edits (evidence: `app.js`)
- DAV editor → DAV decoder: re-decodes edits (evidence: `dav-writer.js`)
- App controller → Edited DAV download: exports file (evidence: `README.md`)
