# zhuj05/nou-study-tools architecture

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

- Interactive diagram: https://gitdiagram.com/zhuj05/nou-study-tools
- Repository: https://github.com/zhuj05/nou-study-tools

## Overview

nou-study-tools is a Flet-based study assistant for National Open University students. Students enter course scores to calculate grades or passing targets, calculate a credit-weighted semester average and GPA, track exam and assignment dates for LINE or CSV export, and check academic-calendar events and exam countdowns. The README also documents campus shortcuts and display preferences. The excerpts show the main UI dispatching to grade, export, clipboard, and calendar components; unsampled shortcut wiring and browser offline behavior are represented cautiously.

Main entry points: [`views/calculator.py`](https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py) (Study assistant UI), [`main.py`](https://github.com/zhuj05/nou-study-tools/blob/main/main.py) (Flet app entry), [`views/calendar_view.py`](https://github.com/zhuj05/nou-study-tools/blob/main/views/calendar_view.py) (Academic calendar), [`services/grade_service.py`](https://github.com/zhuj05/nou-study-tools/blob/main/services/grade_service.py) (Grade service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["App and interface"]
  node_entry["Flet app entry<br/>[main.py]"]
  node_workspace["Study assistant UI<br/>[calculator.py]"]
end

subgraph group_study["Academic tools"]
  node_grade_ui["Grade calculator<br/>[calculator.py]"]
  node_average_ui["Semester average<br/>[calculator.py]"]
  node_tracker_ui["Schedule tracker<br/>[calculator.py]"]
  node_calendar_ui["Academic calendar<br/>[calendar_view.py]"]
  node_grade_service["Grade service<br/>[grade_service.py]"]
  node_grade_rules["Grade rules<br/>[grades.py]"]
  node_tracker_export["Tracker export<br/>[tracker_export.py]"]
end

subgraph group_support["Data and integrations"]
  node_calendar_loader["Calendar loader<br/>[calendar_loader.py]"]
  node_calendar_data["Calendar data<br/>[calendar_data.json]"]
  node_clipboard["Clipboard adapter<br/>[clipboard.py]"]
  node_app_config["Shortcuts and exports<br/>[models.py]"]
  node_browser_cache["Offline asset cache<br/>[sw.js]"]
end

node_student(("Student"))
node_browser(("Web browser"))

node_student -->|"opens app"| node_entry
node_entry -->|"renders"| node_workspace
node_workspace -->|"calculates grades"| node_grade_service
node_grade_service -->|"uses rules"| node_grade_rules
node_workspace -->|"exports tracker"| node_tracker_export
node_workspace -->|"copies text"| node_clipboard
node_workspace -->|"builds calendar"| node_calendar_ui
node_calendar_ui -->|"loads dates"| node_calendar_loader
node_calendar_loader -->|"reads"| node_calendar_data
node_workspace -->|"imports settings"| node_app_config
node_browser -.->|"caches assets"| node_browser_cache

click node_entry "https://github.com/zhuj05/nou-study-tools/blob/main/main.py"
click node_workspace "https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py"
click node_grade_ui "https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py"
click node_average_ui "https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py"
click node_tracker_ui "https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py"
click node_calendar_ui "https://github.com/zhuj05/nou-study-tools/blob/main/views/calendar_view.py"
click node_grade_service "https://github.com/zhuj05/nou-study-tools/blob/main/services/grade_service.py"
click node_grade_rules "https://github.com/zhuj05/nou-study-tools/blob/main/domain/grades.py"
click node_tracker_export "https://github.com/zhuj05/nou-study-tools/blob/main/services/tracker_export.py"
click node_calendar_loader "https://github.com/zhuj05/nou-study-tools/blob/main/infrastructure/calendar_loader.py"
click node_calendar_data "https://github.com/zhuj05/nou-study-tools/blob/main/calendar_data.json"
click node_clipboard "https://github.com/zhuj05/nou-study-tools/blob/main/infrastructure/clipboard.py"
click node_app_config "https://github.com/zhuj05/nou-study-tools/blob/main/models.py"
click node_browser_cache "https://github.com/zhuj05/nou-study-tools/blob/main/web/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_entry,node_workspace,node_browser toneBlue
class node_grade_ui,node_average_ui,node_tracker_ui,node_calendar_ui,node_grade_service,node_grade_rules,node_tracker_export toneAmber
class node_calendar_loader,node_calendar_data,node_clipboard,node_app_config,node_browser_cache toneMint
class node_student toneIndigo
```

## Components

### App and interface

- [Flet app entry](https://github.com/zhuj05/nou-study-tools/blob/main/main.py): `main.py`
- [Study assistant UI](https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py): `views/calculator.py`

### Academic tools

- [Grade calculator](https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py): `views/calculator.py`
- [Semester average](https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py): `views/calculator.py`
- [Schedule tracker](https://github.com/zhuj05/nou-study-tools/blob/main/views/calculator.py): `views/calculator.py`
- [Academic calendar](https://github.com/zhuj05/nou-study-tools/blob/main/views/calendar_view.py): `views/calendar_view.py`
- [Grade service](https://github.com/zhuj05/nou-study-tools/blob/main/services/grade_service.py): `services/grade_service.py`
- [Grade rules](https://github.com/zhuj05/nou-study-tools/blob/main/domain/grades.py): `domain/grades.py`
- [Tracker export](https://github.com/zhuj05/nou-study-tools/blob/main/services/tracker_export.py): `services/tracker_export.py`

### Data and integrations

- [Calendar loader](https://github.com/zhuj05/nou-study-tools/blob/main/infrastructure/calendar_loader.py): `infrastructure/calendar_loader.py`
- [Calendar data](https://github.com/zhuj05/nou-study-tools/blob/main/calendar_data.json): `calendar_data.json`
- [Clipboard adapter](https://github.com/zhuj05/nou-study-tools/blob/main/infrastructure/clipboard.py): `infrastructure/clipboard.py`
- [Shortcuts and exports](https://github.com/zhuj05/nou-study-tools/blob/main/models.py): `models.py`
- [Offline asset cache](https://github.com/zhuj05/nou-study-tools/blob/main/web/sw.js): `web/sw.js`

### Other components

- **Student**
- **Web browser**

## Connections

- Student → Flet app entry: opens app (evidence: `README.md`)
- Flet app entry → Study assistant UI: renders (evidence: `main.py`)
- Study assistant UI → Grade service: calculates grades (evidence: `views/calculator.py`)
- Grade service → Grade rules: uses rules (evidence: `services/grade_service.py`)
- Study assistant UI → Tracker export: exports tracker (evidence: `views/calculator.py`)
- Study assistant UI → Clipboard adapter: copies text (evidence: `views/calculator.py`)
- Study assistant UI → Academic calendar: builds calendar (evidence: `views/calculator.py`)
- Academic calendar → Calendar loader: loads dates (evidence: `views/calendar_view.py`)
- Calendar loader → Calendar data: reads (evidence: `infrastructure/calendar_loader.py`)
- Study assistant UI → Shortcuts and exports: imports settings (evidence: `views/calculator.py`)
- Web browser → Offline asset cache: caches assets
