# polmarsol/mai-grades architecture

> Architecture diagram of the GitHub repository polmarsol/mai-grades, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/polmarsol/mai-grades
- Repository: https://github.com/polmarsol/mai-grades

## Overview

MAI Grades is a private, browser-based grade tracker for students in the named AI master’s program. Students enter or import course structure, record grades and submissions, then review projected marks, target requirements, deadlines and semester statistics; they can also explore what-if grades and export or share selected results. The README documents browser-local storage, calendar feeds, news, customization and offline support. Several feature modules are identified by the tree and README but were not sampled, so their internal calls are not asserted here.

Main entry points: [`index.html`](https://github.com/polmarsol/mai-grades/blob/main/index.html) (App shell), [`tools/calendars.mjs`](https://github.com/polmarsol/mai-grades/blob/main/tools/calendars.mjs) (Calendar feeds), [`assets/js/app.js`](https://github.com/polmarsol/mai-grades/blob/main/assets/js/app.js) (App controller), [`assets/js/views/home.js`](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/home.js) (Home dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Student app"]
  node_shell["App shell<br/>[index.html]"]
  node_controller["App controller<br/>[app.js]"]
  node_home["Home dashboard<br/>[home.js]"]
  node_course["Course view<br/>[subject.js]"]
  node_overview["Semester overview<br/>[overview.js]"]
  node_statsview["Stats view<br/>[stats.js]"]
  node_settings["Settings view<br/>[settings.js]"]
  node_editor["Structure editor<br/>[editor.js]"]
  node_layout["Home layout<br/>[layout.js]"]
  node_progress["Submission progress<br/>[progress.js]"]
  node_sharing["Grade sharing<br/>[share.js]"]
end

subgraph group_grades["Grades and data"]
  node_catalog["Course catalog<br/>[catalog.js]"]
  node_gradeengine["Grade engine<br/>[grades.js]"]
  node_browserdata[("Browser storage<br/>[store.js]")]
  node_statistics["Grade statistics<br/>[stats.js]"]
end

subgraph group_calendar["Calendar and updates"]
  node_calendarfeeds["Calendar feeds<br/>[calendars.mjs]"]
  node_ical["Calendar generation<br/>[ics.js]"]
  node_subscription["Calendar subscription<br/>[subscribe.js]"]
  node_news["Course news<br/>[news.js]"]
end

subgraph group_delivery["Browser delivery"]
  node_serviceworker["Offline service worker<br/>[sw.js]"]
end

node_student(("Student"))

node_student -->|"opens"| node_shell
node_shell -->|"loads"| node_controller
node_student -->|"records grades"| node_course
node_student -->|"edits structure"| node_editor
node_student -->|"reviews deadlines"| node_home
node_student -->|"reviews semester"| node_overview
node_student -->|"reviews statistics"| node_statsview
node_student -->|"backs up data"| node_settings
node_course -->|"projects marks"| node_gradeengine
node_gradeengine -->|"uses structures"| node_catalog
node_controller -->|"stores locally"| node_browserdata
node_overview -->|"exports deadlines"| node_ical
node_calendarfeeds -->|"builds feeds"| node_ical
node_calendarfeeds -->|"reads courses"| node_catalog
node_student -->|"subscribes"| node_subscription
node_student -->|"reads updates"| node_news
node_student -->|"shares grades"| node_sharing
node_student -->|"customizes home"| node_layout
node_home -->|"shows submissions"| node_progress
node_statsview -->|"shows analysis"| node_statistics
node_serviceworker -->|"caches offline"| node_shell

click node_shell "https://github.com/polmarsol/mai-grades/blob/main/index.html"
click node_controller "https://github.com/polmarsol/mai-grades/blob/main/assets/js/app.js"
click node_home "https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/home.js"
click node_course "https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/subject.js"
click node_overview "https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/overview.js"
click node_statsview "https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/stats.js"
click node_settings "https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/settings.js"
click node_editor "https://github.com/polmarsol/mai-grades/blob/main/assets/js/editor.js"
click node_layout "https://github.com/polmarsol/mai-grades/blob/main/assets/js/layout.js"
click node_progress "https://github.com/polmarsol/mai-grades/blob/main/assets/js/progress.js"
click node_catalog "https://github.com/polmarsol/mai-grades/blob/main/assets/js/catalog.js"
click node_gradeengine "https://github.com/polmarsol/mai-grades/blob/main/assets/js/grades.js"
click node_browserdata "https://github.com/polmarsol/mai-grades/blob/main/assets/js/store.js"
click node_statistics "https://github.com/polmarsol/mai-grades/blob/main/assets/js/stats.js"
click node_calendarfeeds "https://github.com/polmarsol/mai-grades/blob/main/tools/calendars.mjs"
click node_ical "https://github.com/polmarsol/mai-grades/blob/main/assets/js/ics.js"
click node_subscription "https://github.com/polmarsol/mai-grades/blob/main/assets/js/subscribe.js"
click node_news "https://github.com/polmarsol/mai-grades/blob/main/assets/js/news.js"
click node_sharing "https://github.com/polmarsol/mai-grades/blob/main/assets/js/share.js"
click node_serviceworker "https://github.com/polmarsol/mai-grades/blob/main/sw.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_shell,node_controller,node_home,node_course,node_overview,node_statsview,node_settings,node_editor,node_layout,node_progress,node_sharing toneBlue
class node_catalog,node_gradeengine,node_browserdata,node_statistics toneAmber
class node_calendarfeeds,node_ical,node_subscription,node_news toneMint
class node_serviceworker toneRose
class node_student toneIndigo
```

## Components

### Student app

- [App shell](https://github.com/polmarsol/mai-grades/blob/main/index.html): `index.html`
- [App controller](https://github.com/polmarsol/mai-grades/blob/main/assets/js/app.js): `assets/js/app.js`
- [Home dashboard](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/home.js): `assets/js/views/home.js`
- [Course view](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/subject.js): `assets/js/views/subject.js`
- [Semester overview](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/overview.js): `assets/js/views/overview.js`
- [Stats view](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/stats.js): `assets/js/views/stats.js`
- [Settings view](https://github.com/polmarsol/mai-grades/blob/main/assets/js/views/settings.js): `assets/js/views/settings.js`
- [Structure editor](https://github.com/polmarsol/mai-grades/blob/main/assets/js/editor.js): `assets/js/editor.js`
- [Home layout](https://github.com/polmarsol/mai-grades/blob/main/assets/js/layout.js): `assets/js/layout.js`
- [Submission progress](https://github.com/polmarsol/mai-grades/blob/main/assets/js/progress.js): `assets/js/progress.js`
- [Grade sharing](https://github.com/polmarsol/mai-grades/blob/main/assets/js/share.js): `assets/js/share.js`

### Grades and data

- [Course catalog](https://github.com/polmarsol/mai-grades/blob/main/assets/js/catalog.js): `assets/js/catalog.js`
- [Grade engine](https://github.com/polmarsol/mai-grades/blob/main/assets/js/grades.js): `assets/js/grades.js`
- [Browser storage](https://github.com/polmarsol/mai-grades/blob/main/assets/js/store.js): `assets/js/store.js`
- [Grade statistics](https://github.com/polmarsol/mai-grades/blob/main/assets/js/stats.js): `assets/js/stats.js`

### Calendar and updates

- [Calendar feeds](https://github.com/polmarsol/mai-grades/blob/main/tools/calendars.mjs): `tools/calendars.mjs`
- [Calendar generation](https://github.com/polmarsol/mai-grades/blob/main/assets/js/ics.js): `assets/js/ics.js`
- [Calendar subscription](https://github.com/polmarsol/mai-grades/blob/main/assets/js/subscribe.js): `assets/js/subscribe.js`
- [Course news](https://github.com/polmarsol/mai-grades/blob/main/assets/js/news.js): `assets/js/news.js`

### Browser delivery

- [Offline service worker](https://github.com/polmarsol/mai-grades/blob/main/sw.js): `sw.js`

### Other components

- **Student**

## Connections

- Student → App shell: opens (evidence: `README.md`)
- App shell → App controller: loads (evidence: `README.md`)
- Student → Course view: records grades (evidence: `README.md`)
- Student → Structure editor: edits structure (evidence: `README.md`)
- Student → Home dashboard: reviews deadlines (evidence: `README.md`)
- Student → Semester overview: reviews semester (evidence: `README.md`)
- Student → Stats view: reviews statistics (evidence: `README.md`)
- Student → Settings view: backs up data (evidence: `README.md`)
- Course view → Grade engine: projects marks (evidence: `README.md`)
- Grade engine → Course catalog: uses structures (evidence: `README.md`)
- App controller → Browser storage: stores locally (evidence: `README.md`)
- Semester overview → Calendar generation: exports deadlines (evidence: `README.md`)
- Calendar feeds → Calendar generation: builds feeds (evidence: `tools/calendars.mjs`)
- Calendar feeds → Course catalog: reads courses (evidence: `tools/calendars.mjs`)
- Student → Calendar subscription: subscribes (evidence: `README.md`)
- Student → Course news: reads updates (evidence: `README.md`)
- Student → Grade sharing: shares grades (evidence: `README.md`)
- Student → Home layout: customizes home (evidence: `README.md`)
- Home dashboard → Submission progress: shows submissions (evidence: `README.md`)
- Stats view → Grade statistics: shows analysis (evidence: `README.md`)
- Offline service worker → App shell: caches offline (evidence: `sw.js`)
