# sam14334/grade-tracker-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/sam14334/grade-tracker-frontend
- Repository: https://github.com/sam14334/grade-tracker-frontend

## Overview

This is a browser-based course grade tracker for students and professors. Students enroll using a class code, manage target grades, enter assessment scores, and view grade calculations and predictions; professors create grading templates and review enrolled-student standings. The sampled JavaScript shows these workflows calling a JSON API through a shared client, but the backend implementation and HTML script wiring are not available here, so those connections are limited to documented calls and redirects in the excerpts.

Main entry points: [`js/api.js`](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/api.js) (API client), [`js/auth.js`](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/auth.js) (Login and registration), [`js/student-dashboard.js`](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/student-dashboard.js) (Student dashboard), [`js/otp.js`](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/otp.js) (Email verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Account access"]
  node_auth["Login and registration<br/>[auth.js]"]
  node_otp["Email verification<br/>[otp.js]"]
end

subgraph group_student["Student grade tools"]
  node_student_dashboard["Student dashboard"]
  node_course_scores["Course scores<br/>[course-scores.js]"]
end

subgraph group_professor["Professor tools"]
  node_template_management["Template management"]
  node_class_standings["Class standings"]
end

subgraph group_shared["API transport"]
  node_api_client["API client<br/>[api.js]"]
end

node_student_actor(("Student"))
node_professor_actor(("Professor"))
node_backend_api{{"Backend API"}}

node_auth -->|"redirects to"| node_otp
node_auth -->|"submits login and registration"| node_api_client
node_otp -->|"verifies or resends code"| node_api_client
node_student_dashboard -->|"loads dashboard; manages enrollments and targets"| node_api_client
node_student_dashboard -->|"links to"| node_course_scores
node_course_scores -->|"loads and saves scores"| node_api_client
node_template_management -->|"creates, updates, deletes templates"| node_api_client
node_class_standings -->|"loads and refreshes standings"| node_api_client
node_api_client -->|"sends HTTP requests"| node_backend_api

click node_auth "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/auth.js"
click node_otp "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/otp.js"
click node_student_dashboard "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/student-dashboard.js"
click node_course_scores "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/course-scores.js"
click node_template_management "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/professor-dashboard.js"
click node_class_standings "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/professor-dashboard.js"
click node_api_client "https://github.com/sam14334/grade-tracker-frontend/blob/main/js/api.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_auth,node_otp toneBlue
class node_student_dashboard,node_course_scores toneAmber
class node_template_management,node_class_standings,node_backend_api toneMint
class node_api_client toneRose
class node_student_actor,node_professor_actor toneIndigo
```

## Components

### Account access

- [Login and registration](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/auth.js): `js/auth.js`
- [Email verification](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/otp.js): `js/otp.js`

### Student grade tools

- [Student dashboard](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/student-dashboard.js): `js/student-dashboard.js`
- [Course scores](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/course-scores.js): `js/course-scores.js`

### Professor tools

- [Template management](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/professor-dashboard.js): `js/professor-dashboard.js`
- [Class standings](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/professor-dashboard.js): `js/professor-dashboard.js`

### API transport

- [API client](https://github.com/sam14334/grade-tracker-frontend/blob/main/js/api.js): `js/api.js`

### Other components

- **Student**
- **Professor**
- **Backend API**

## Connections

- Login and registration → Email verification: redirects to (evidence: `js/auth.js`)
- Login and registration → API client: submits login and registration (evidence: `js/auth.js`)
- Email verification → API client: verifies or resends code (evidence: `js/otp.js`)
- Student dashboard → API client: loads dashboard; manages enrollments and targets (evidence: `js/student-dashboard.js`)
- Student dashboard → Course scores: links to (evidence: `js/student-dashboard.js`)
- Course scores → API client: loads and saves scores (evidence: `js/course-scores.js`)
- Template management → API client: creates, updates, deletes templates (evidence: `js/professor-dashboard.js`)
- Class standings → API client: loads and refreshes standings (evidence: `js/professor-dashboard.js`)
- API client → Backend API: sends HTTP requests (evidence: `js/api.js`)
