# ushaed/school-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/ushaed/school-management-system
- Repository: https://github.com/ushaed/school-management-system

## Overview

This is a college portal combining a public education-themed website with administrative student, attendance, and online-exam workflows. The strongest visible runtime paths are login/session handling, attendance and student records backed by MySQL, and contact-message storage with optional email. The README describes responsive theme, gallery/lightbox, scrolling, and carousel capabilities. Some exam and admin behavior is represented by named endpoints; their internal dispatch is not established by the sampled excerpts.

Main entry points: [`lib/Database.php`](https://github.com/ushaed/school-management-system/blob/master/lib/Database.php) (MySQL access), [`inc/navbar.php`](https://github.com/ushaed/school-management-system/blob/master/inc/navbar.php) (Site navigation), [`index.php`](https://github.com/ushaed/school-management-system/blob/master/index.php) (College home), [`lib/Student.php`](https://github.com/ushaed/school-management-system/blob/master/lib/Student.php) (Student records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_home["College home<br/>[index.php]"]
  node_sitechrome["Site navigation<br/>[navbar.php]"]
  node_homeslider["Hero carousel<br/>[header.php]"]
  node_sitefooter["Site footer<br/>[footer.php]"]
  node_gallery["Image gallery<br/>[gallary.php]"]
  node_theme["Responsive theme<br/>[style.css]"]
  node_contact["Contact form<br/>[contact.php]"]
  node_contacthandler["Contact handler<br/>[contact_auth.php]"]
end

subgraph group_access["Access and admin"]
  node_adminlogin["Admin login<br/>[admin.php]"]
  node_userauth["User authentication<br/>[auth.php]"]
  node_adminarea["Admin pages<br/>[admin_page.php]"]
  node_adminoverview["Admin dashboard"]
  node_teacherlogin["Teacher sign-in"]
  node_teacherauth["Teacher authentication"]
end

subgraph group_academics["Academic operations"]
  node_attendance["Attendance taking<br/>[attendence.php]"]
  node_attendanceview["Attendance history<br/>[date_view.php]"]
  node_students["Student records<br/>[Student.php]"]
  node_examentry["Online exam entry<br/>[onlinefirst.php]"]
  node_exam["Exam and results<br/>[dashboardexam.php]"]
end

subgraph group_shared["Shared services"]
  node_session["Session management<br/>[Session.php]"]
  node_format["Date formatting<br/>[Format.php]"]
  node_db[("MySQL access<br/>[Database.php]")]
end

node_visitor(("Visitor"))
node_email["SMTP mail service"]

node_visitor -->|"visits"| node_home
node_home -->|"includes"| node_sitechrome
node_home -->|"includes"| node_homeslider
node_home -->|"includes"| node_sitefooter
node_sitechrome -->|"links to"| node_gallery
node_sitechrome -->|"links to"| node_contact
node_sitechrome -->|"links to"| node_adminlogin
node_visitor -.->|"submits"| node_contact
node_contacthandler -->|"inserts message"| node_db
node_contacthandler -->|"sends email"| node_email
node_adminlogin -.->|"queries credentials"| node_db
node_userauth -->|"checks credentials"| node_db
node_userauth -->|"sets login"| node_session
node_teacherauth -->|"checks teacher"| node_db
node_teacherauth -->|"sets login"| node_session
node_adminarea -.->|"uses"| node_db
node_adminoverview -.->|"uses"| node_db
node_attendance -->|"uses records"| node_students
node_attendance -->|"formats dates"| node_format
node_attendanceview -->|"reads history"| node_students
node_attendanceview -->|"formats dates"| node_format
node_students -->|"queries and updates"| node_db
node_examentry -.->|"uses"| node_db
node_exam -.->|"uses"| node_db
node_sitechrome -->|"links to"| node_examentry
node_visitor -.->|"views responsive site"| node_theme
node_gallery -.->|"lightbox display"| node_visitor
node_homeslider -.->|"carousel display"| node_visitor

click node_home "https://github.com/ushaed/school-management-system/blob/master/index.php"
click node_sitechrome "https://github.com/ushaed/school-management-system/blob/master/inc/navbar.php"
click node_homeslider "https://github.com/ushaed/school-management-system/blob/master/inc/header.php"
click node_sitefooter "https://github.com/ushaed/school-management-system/blob/master/inc/footer.php"
click node_gallery "https://github.com/ushaed/school-management-system/blob/master/gallary.php"
click node_theme "https://github.com/ushaed/school-management-system/blob/master/assets/css/style.css"
click node_contact "https://github.com/ushaed/school-management-system/blob/master/contact.php"
click node_contacthandler "https://github.com/ushaed/school-management-system/blob/master/contact_auth.php"
click node_adminlogin "https://github.com/ushaed/school-management-system/blob/master/admin.php"
click node_userauth "https://github.com/ushaed/school-management-system/blob/master/auth.php"
click node_session "https://github.com/ushaed/school-management-system/blob/master/lib/Session.php"
click node_adminarea "https://github.com/ushaed/school-management-system/blob/master/admin_page.php"
click node_adminoverview "https://github.com/ushaed/school-management-system/blob/master/admin_dashboard.php"
click node_teacherlogin "https://github.com/ushaed/school-management-system/blob/master/attendencefirst.php"
click node_teacherauth "https://github.com/ushaed/school-management-system/blob/master/attendence_auth.php"
click node_attendance "https://github.com/ushaed/school-management-system/blob/master/attendence.php"
click node_attendanceview "https://github.com/ushaed/school-management-system/blob/master/date_view.php"
click node_students "https://github.com/ushaed/school-management-system/blob/master/lib/Student.php"
click node_format "https://github.com/ushaed/school-management-system/blob/master/helpers/Format.php"
click node_examentry "https://github.com/ushaed/school-management-system/blob/master/onlinefirst.php"
click node_exam "https://github.com/ushaed/school-management-system/blob/master/dashboardexam.php"
click node_db "https://github.com/ushaed/school-management-system/blob/master/lib/Database.php"

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_home,node_sitechrome,node_homeslider,node_sitefooter,node_gallery,node_theme,node_contact,node_contacthandler toneBlue
class node_adminlogin,node_userauth,node_adminarea,node_adminoverview,node_teacherlogin,node_teacherauth toneAmber
class node_attendance,node_attendanceview,node_students,node_examentry,node_exam toneMint
class node_session,node_format,node_db toneRose
class node_visitor,node_email toneIndigo
```

## Components

### Public website

- [College home](https://github.com/ushaed/school-management-system/blob/master/index.php): `index.php`
- [Site navigation](https://github.com/ushaed/school-management-system/blob/master/inc/navbar.php): `inc/navbar.php`
- [Hero carousel](https://github.com/ushaed/school-management-system/blob/master/inc/header.php): `inc/header.php`
- [Site footer](https://github.com/ushaed/school-management-system/blob/master/inc/footer.php): `inc/footer.php`
- [Image gallery](https://github.com/ushaed/school-management-system/blob/master/gallary.php): `gallary.php`
- [Responsive theme](https://github.com/ushaed/school-management-system/blob/master/assets/css/style.css): `assets/css/style.css`
- [Contact form](https://github.com/ushaed/school-management-system/blob/master/contact.php): `contact.php`
- [Contact handler](https://github.com/ushaed/school-management-system/blob/master/contact_auth.php): `contact_auth.php`

### Access and admin

- [Admin login](https://github.com/ushaed/school-management-system/blob/master/admin.php): `admin.php`
- [User authentication](https://github.com/ushaed/school-management-system/blob/master/auth.php): `auth.php`
- [Admin pages](https://github.com/ushaed/school-management-system/blob/master/admin_page.php): `admin_page.php`
- [Admin dashboard](https://github.com/ushaed/school-management-system/blob/master/admin_dashboard.php): `admin_dashboard.php`
- [Teacher sign-in](https://github.com/ushaed/school-management-system/blob/master/attendencefirst.php): `attendencefirst.php`
- [Teacher authentication](https://github.com/ushaed/school-management-system/blob/master/attendence_auth.php): `attendence_auth.php`

### Academic operations

- [Attendance taking](https://github.com/ushaed/school-management-system/blob/master/attendence.php): `attendence.php`
- [Attendance history](https://github.com/ushaed/school-management-system/blob/master/date_view.php): `date_view.php`
- [Student records](https://github.com/ushaed/school-management-system/blob/master/lib/Student.php): `lib/Student.php`
- [Online exam entry](https://github.com/ushaed/school-management-system/blob/master/onlinefirst.php): `onlinefirst.php`
- [Exam and results](https://github.com/ushaed/school-management-system/blob/master/dashboardexam.php): `dashboardexam.php`

### Shared services

- [Session management](https://github.com/ushaed/school-management-system/blob/master/lib/Session.php): `lib/Session.php`
- [Date formatting](https://github.com/ushaed/school-management-system/blob/master/helpers/Format.php): `helpers/Format.php`
- [MySQL access](https://github.com/ushaed/school-management-system/blob/master/lib/Database.php): `lib/Database.php`

### Other components

- **Visitor**
- **SMTP mail service**

## Connections

- Visitor → College home: visits
- College home → Site navigation: includes (evidence: `index.php`)
- College home → Hero carousel: includes (evidence: `index.php`)
- College home → Site footer: includes (evidence: `index.php`)
- Site navigation → Image gallery: links to (evidence: `inc/navbar.php`)
- Site navigation → Contact form: links to (evidence: `inc/navbar.php`)
- Site navigation → Admin login: links to (evidence: `inc/navbar.php`)
- Visitor → Contact form: submits
- Contact handler → MySQL access: inserts message (evidence: `contact_auth.php`)
- Contact handler → SMTP mail service: sends email (evidence: `contact_auth.php`)
- Admin login → MySQL access: queries credentials (evidence: `admin.php`)
- User authentication → MySQL access: checks credentials (evidence: `auth.php`)
- User authentication → Session management: sets login (evidence: `auth.php`)
- Teacher authentication → MySQL access: checks teacher (evidence: `attendence_auth.php`)
- Teacher authentication → Session management: sets login (evidence: `attendence_auth.php`)
- Admin pages → MySQL access: uses (evidence: `admin_page.php`)
- Admin dashboard → MySQL access: uses (evidence: `admin_dashboard.php`)
- Attendance taking → Student records: uses records (evidence: `attendence.php`)
- Attendance taking → Date formatting: formats dates (evidence: `attendence.php`)
- Attendance history → Student records: reads history (evidence: `date_view.php`)
- Attendance history → Date formatting: formats dates (evidence: `date_view.php`)
- Student records → MySQL access: queries and updates (evidence: `lib/Student.php`)
- Online exam entry → MySQL access: uses (evidence: `onlinefirst.php`)
- Exam and results → MySQL access: uses (evidence: `dashboardexam.php`)
- Site navigation → Online exam entry: links to (evidence: `inc/navbar.php`)
- Visitor → Responsive theme: views responsive site (evidence: `README.txt`)
- Image gallery → Visitor: lightbox display (evidence: `README.txt`)
- Hero carousel → Visitor: carousel display (evidence: `README.txt`)
