# anzar-hue/student-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/anzar-hue/student-management-system
- Repository: https://github.com/anzar-hue/student-management-system

## Overview

Sterling Heritage Institute is a student academic-record system with two related workflows: a browser portal served by Flask, and standalone C++ theory/practical programs. Both manage student marks backed by tab-separated files; the web layer parses and serves those records, while the C++ programs provide their own portals and record management. The graph separates authentication, academic views and updates, calculation, and persistence. Source excerpts are partial, so web routes and file parsing are shown where visible; C++ capabilities and the web-to-browser connection rely on README documentation.

Main entry points: [`app.py`](https://github.com/anzar-hue/student-management-system/blob/main/app.py) (Flask application), [`index.html`](https://github.com/anzar-hue/student-management-system/blob/main/index.html) (Web interface), [`theory.cpp`](https://github.com/anzar-hue/student-management-system/blob/main/theory.cpp) (Theory engine), [`practical.cpp`](https://github.com/anzar-hue/student-management-system/blob/main/practical.cpp) (Practical engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web portal"]
  node_browser["Web interface<br/>[index.html]"]
  node_flask["Flask application<br/>[app.py]"]
  node_auth["Role authentication<br/>[app.py]"]
  node_student_api["Student records API<br/>[app.py]"]
  node_admin_api["Admin records API<br/>[app.py]"]
  node_teacher_api["Teacher mark API<br/>[app.py]"]
end

subgraph group_records["Academic records"]
  node_reader["Table parsing<br/>[app.py]"]
  node_evaluator["Mark evaluation<br/>[app.py]"]
  node_updater["Mark updates<br/>[app.py]"]
  node_files[("Theory / practical files")]
end

subgraph group_cpp["C++ portals"]
  node_theory["Theory engine<br/>[theory.cpp]"]
  node_practical["Practical engine<br/>[practical.cpp]"]
end

node_user(("Student / staff"))

node_user -->|"uses"| node_browser
node_browser -->|"requests data"| node_flask
node_flask -->|"routes login"| node_auth
node_flask -->|"serves records"| node_student_api
node_flask -->|"serves listings"| node_admin_api
node_flask -->|"serves mark access"| node_teacher_api
node_student_api -->|"loads records"| node_reader
node_admin_api -->|"loads records"| node_reader
node_admin_api -->|"evaluates marks"| node_evaluator
node_teacher_api -->|"loads marks"| node_reader
node_teacher_api -->|"writes marks"| node_updater
node_reader -->|"reads"| node_files
node_updater -->|"rewrites"| node_files
node_theory -->|"reads / saves theory"| node_files
node_practical -->|"reads / saves practical"| node_files

click node_browser "https://github.com/anzar-hue/student-management-system/blob/main/index.html"
click node_flask "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_auth "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_student_api "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_admin_api "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_teacher_api "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_reader "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_evaluator "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_updater "https://github.com/anzar-hue/student-management-system/blob/main/app.py"
click node_theory "https://github.com/anzar-hue/student-management-system/blob/main/theory.cpp"
click node_practical "https://github.com/anzar-hue/student-management-system/blob/main/practical.cpp"

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_browser,node_flask,node_auth,node_student_api,node_admin_api,node_teacher_api toneBlue
class node_reader,node_evaluator,node_updater,node_files toneAmber
class node_theory,node_practical toneMint
class node_user toneIndigo
```

## Components

### Web portal

- [Web interface](https://github.com/anzar-hue/student-management-system/blob/main/index.html): `index.html`
- [Flask application](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Role authentication](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Student records API](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Admin records API](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Teacher mark API](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`

### Academic records

- [Table parsing](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Mark evaluation](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- [Mark updates](https://github.com/anzar-hue/student-management-system/blob/main/app.py): `app.py`
- **Theory / practical files**

### C++ portals

- [Theory engine](https://github.com/anzar-hue/student-management-system/blob/main/theory.cpp): `theory.cpp`
- [Practical engine](https://github.com/anzar-hue/student-management-system/blob/main/practical.cpp): `practical.cpp`

### Other components

- **Student / staff**

## Connections

- Student / staff → Web interface: uses (evidence: `README.md`)
- Web interface → Flask application: requests data (evidence: `README.md`)
- Flask application → Role authentication: routes login (evidence: `app.py`)
- Flask application → Student records API: serves records (evidence: `app.py`)
- Flask application → Admin records API: serves listings (evidence: `app.py`)
- Flask application → Teacher mark API: serves mark access (evidence: `app.py`)
- Student records API → Table parsing: loads records (evidence: `app.py`)
- Admin records API → Table parsing: loads records (evidence: `app.py`)
- Admin records API → Mark evaluation: evaluates marks (evidence: `app.py`)
- Teacher mark API → Table parsing: loads marks (evidence: `app.py`)
- Teacher mark API → Mark updates: writes marks (evidence: `app.py`)
- Table parsing → Theory / practical files: reads (evidence: `app.py`)
- Mark updates → Theory / practical files: rewrites (evidence: `app.py`)
- Theory engine → Theory / practical files: reads / saves theory (evidence: `README.md`)
- Practical engine → Theory / practical files: reads / saves practical (evidence: `README.md`)
