# mepimchanok/student-grading-system architecture

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

- Interactive diagram: https://gitdiagram.com/mepimchanok/student-grading-system
- Repository: https://github.com/mepimchanok/student-grading-system

## Overview

This is a small, browser-based student grading application. A user submits student and course-grade details through the page; the JavaScript UI handler passes them to the grading manager, which keeps student records in memory. The UI then renders student cards, class GPA statistics, and a GPA chart. The README documents the separation of HTML, styling, and logic; the source excerpt shows the runtime calls. The HTML and CSS contents were not sampled, so their internal behavior and wiring are not detailed here.

Main entry points: [`script.js`](https://github.com/mepimchanok/student-grading-system/blob/main/script.js) (Grading Manager), [`index.html`](https://github.com/mepimchanok/student-grading-system/blob/main/index.html) (Page Structure), [`style.css`](https://github.com/mepimchanok/student-grading-system/blob/main/style.css) (Page Styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser Interface"]
  node_page["Page Structure<br/>[index.html]"]
  node_styles["Page Styling<br/>[style.css]"]
  node_handler["Form Handler<br/>[script.js]"]
end

subgraph group_domain["Grading Domain"]
  node_manager["Grading Manager<br/>[script.js]"]
  node_student["Student Records<br/>[script.js]"]
  node_memory[("In-Memory Records<br/>[script.js]")]
end

subgraph group_presentation["Results Presentation"]
  node_cards["Student Cards<br/>[script.js]"]
  node_statistics["GPA Statistics<br/>[script.js]"]
  node_chart["GPA Chart<br/>[script.js]"]
end

node_user(("User"))
node_chartjs["Chart.js"]

node_user -.->|"uses"| node_page
node_page -.->|"loads"| node_handler
node_handler -->|"submits grades"| node_manager
node_manager -->|"creates or updates"| node_student
node_manager -->|"stores records"| node_memory
node_handler -->|"renders"| node_cards
node_cards -->|"reads students"| node_manager
node_cards -->|"calculates GPA"| node_student
node_handler -->|"updates"| node_statistics
node_statistics -->|"requests summary"| node_manager
node_handler -->|"updates"| node_chart
node_chart -->|"reads students"| node_manager
node_chart -->|"renders with"| node_chartjs
node_page -.->|"styled by"| node_styles

click node_page "https://github.com/mepimchanok/student-grading-system/blob/main/index.html"
click node_styles "https://github.com/mepimchanok/student-grading-system/blob/main/style.css"
click node_handler "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_manager "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_student "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_memory "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_cards "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_statistics "https://github.com/mepimchanok/student-grading-system/blob/main/script.js"
click node_chart "https://github.com/mepimchanok/student-grading-system/blob/main/script.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_page,node_styles,node_handler,node_user toneBlue
class node_manager,node_student,node_memory toneAmber
class node_cards,node_statistics,node_chart toneMint
class node_chartjs toneIndigo
```

## Components

### Browser Interface

- [Page Structure](https://github.com/mepimchanok/student-grading-system/blob/main/index.html): `index.html`
- [Page Styling](https://github.com/mepimchanok/student-grading-system/blob/main/style.css): `style.css`
- [Form Handler](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`

### Grading Domain

- [Grading Manager](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`
- [Student Records](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`
- [In-Memory Records](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`

### Results Presentation

- [Student Cards](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`
- [GPA Statistics](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`
- [GPA Chart](https://github.com/mepimchanok/student-grading-system/blob/main/script.js): `script.js`

### Other components

- **User**
- **Chart.js**

## Connections

- User → Page Structure: uses
- Page Structure → Form Handler: loads
- Form Handler → Grading Manager: submits grades (evidence: `script.js`)
- Grading Manager → Student Records: creates or updates (evidence: `script.js`)
- Grading Manager → In-Memory Records: stores records (evidence: `script.js`)
- Form Handler → Student Cards: renders (evidence: `script.js`)
- Student Cards → Grading Manager: reads students (evidence: `script.js`)
- Student Cards → Student Records: calculates GPA (evidence: `script.js`)
- Form Handler → GPA Statistics: updates (evidence: `script.js`)
- GPA Statistics → Grading Manager: requests summary (evidence: `script.js`)
- Form Handler → GPA Chart: updates (evidence: `script.js`)
- GPA Chart → Grading Manager: reads students (evidence: `script.js`)
- GPA Chart → Chart.js: renders with (evidence: `script.js`)
- Page Structure → Page Styling: styled by (evidence: `README.md`)
