# lilglo254/student-management-system architecture

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

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

## Overview

This is a Flask student-management application. Its demonstrated user workflow is registration or login, session-based role selection, then a role-specific dashboard; the app also initializes a MySQL schema and includes a separate user-seeding script. The schema describes academic, assessment, attendance, fee, timetable, assignment, and submission records, but the sampled routes do not show management workflows for those records. The available evidence supports authentication, dashboard rendering, schema creation, and seeding—not further operational use of the schema.

Main entry points: [`database.py`](https://github.com/lilglo254/student-management-system/blob/main/database.py) (Schema initialization), [`main.py`](https://github.com/lilglo254/student-management-system/blob/main/main.py) (Flask routes and sessions), [`retrivedata.py`](https://github.com/lilglo254/student-management-system/blob/main/retrivedata.py) (User seeding), [`Templates`](https://github.com/lilglo254/student-management-system/tree/main/Templates) (Login and registration views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes and sessions<br/>[main.py]"]
  node_access["Role access control<br/>[main.py]"]
  node_authviews["Login and registration views"]
  node_dashviews["Role dashboards"]
  node_forbidden["Forbidden and logout views"]
end

subgraph group_data["Data layer"]
  node_dbinit["Schema initialization<br/>[database.py]"]
  node_accounts[("Account and student schema<br/>[database.py]")]
  node_academics[("Academic schema<br/>[database.py]")]
  node_assessment[("Assessment and attendance schema<br/>[database.py]")]
  node_operations[("Fees and timetable schema<br/>[database.py]")]
  node_coursework[("Assignment and submission schema<br/>[database.py]")]
  node_audit[("Activity log schema<br/>[database.py]")]
  node_seed["User seeding<br/>[retrivedata.py]"]
end

subgraph group_client["Browser interface"]
  node_browser(("Browser"))
  node_authui["Authentication interactions<br/>[auth.js]"]
end

node_user(("School user"))
node_mysql[("MySQL database")]

node_user -->|"submits forms"| node_flask
node_flask -->|"checks roles"| node_access
node_flask -->|"renders auth"| node_authviews
node_flask -->|"renders dashboards"| node_dashviews
node_flask -->|"renders errors"| node_forbidden
node_flask -->|"opens connection"| node_dbinit
node_dbinit -->|"creates tables"| node_mysql
node_dbinit -->|"defines tables"| node_accounts
node_dbinit -->|"defines tables"| node_academics
node_dbinit -->|"defines tables"| node_assessment
node_dbinit -->|"defines tables"| node_operations
node_dbinit -->|"defines tables"| node_coursework
node_dbinit -->|"defines tables"| node_audit
node_flask -->|"reads and writes users"| node_mysql
node_seed -->|"opens connection"| node_dbinit
node_seed -->|"inserts users"| node_mysql
node_browser -->|"runs interactions"| node_authui

click node_flask "https://github.com/lilglo254/student-management-system/blob/main/main.py"
click node_access "https://github.com/lilglo254/student-management-system/blob/main/main.py"
click node_authviews "https://github.com/lilglo254/student-management-system/tree/main/Templates"
click node_dashviews "https://github.com/lilglo254/student-management-system/tree/main/Templates"
click node_forbidden "https://github.com/lilglo254/student-management-system/tree/main/Templates"
click node_dbinit "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_accounts "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_academics "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_assessment "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_operations "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_coursework "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_audit "https://github.com/lilglo254/student-management-system/blob/main/database.py"
click node_seed "https://github.com/lilglo254/student-management-system/blob/main/retrivedata.py"
click node_authui "https://github.com/lilglo254/student-management-system/blob/main/styles/auth.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_flask,node_access,node_authviews,node_dashviews,node_forbidden,node_user toneBlue
class node_dbinit,node_accounts,node_academics,node_assessment,node_operations,node_coursework,node_audit,node_seed,node_mysql toneAmber
class node_browser,node_authui toneMint
```

## Components

### Web application

- [Flask routes and sessions](https://github.com/lilglo254/student-management-system/blob/main/main.py): `main.py`
- [Role access control](https://github.com/lilglo254/student-management-system/blob/main/main.py): `main.py`
- [Login and registration views](https://github.com/lilglo254/student-management-system/tree/main/Templates): `Templates`
- [Role dashboards](https://github.com/lilglo254/student-management-system/tree/main/Templates): `Templates`
- [Forbidden and logout views](https://github.com/lilglo254/student-management-system/tree/main/Templates): `Templates`

### Data layer

- [Schema initialization](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Account and student schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Academic schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Assessment and attendance schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Fees and timetable schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Assignment and submission schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [Activity log schema](https://github.com/lilglo254/student-management-system/blob/main/database.py): `database.py`
- [User seeding](https://github.com/lilglo254/student-management-system/blob/main/retrivedata.py): `retrivedata.py`

### Browser interface

- **Browser**
- [Authentication interactions](https://github.com/lilglo254/student-management-system/blob/main/styles/auth.js): `styles/auth.js`

### Other components

- **School user**
- **MySQL database**

## Connections

- School user → Flask routes and sessions: submits forms (evidence: `main.py`)
- Flask routes and sessions → Role access control: checks roles (evidence: `main.py`)
- Flask routes and sessions → Login and registration views: renders auth (evidence: `main.py`)
- Flask routes and sessions → Role dashboards: renders dashboards (evidence: `main.py`)
- Flask routes and sessions → Forbidden and logout views: renders errors (evidence: `main.py`)
- Flask routes and sessions → Schema initialization: opens connection (evidence: `main.py`)
- Schema initialization → MySQL database: creates tables (evidence: `database.py`)
- Schema initialization → Account and student schema: defines tables (evidence: `database.py`)
- Schema initialization → Academic schema: defines tables (evidence: `database.py`)
- Schema initialization → Assessment and attendance schema: defines tables (evidence: `database.py`)
- Schema initialization → Fees and timetable schema: defines tables (evidence: `database.py`)
- Schema initialization → Assignment and submission schema: defines tables (evidence: `database.py`)
- Schema initialization → Activity log schema: defines tables (evidence: `database.py`)
- Flask routes and sessions → MySQL database: reads and writes users (evidence: `main.py`)
- User seeding → Schema initialization: opens connection (evidence: `retrivedata.py`)
- User seeding → MySQL database: inserts users (evidence: `retrivedata.py`)
- Browser → Authentication interactions: runs interactions (evidence: `styles/auth.js`)
