# harshh351998/attendance-tracking-system architecture

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

- Interactive diagram: https://gitdiagram.com/harshh351998/attendance-tracking-system
- Repository: https://github.com/harshh351998/attendance-tracking-system

## Overview

Attendance Tracking System is a faculty-facing PHP application for managing classes and recording student attendance. The main workflow is teacher sign-in, selecting or creating a class, marking attendance, and reviewing attendance records and statistics. The `Node` class holds class and student-record state and persists serialized class objects through MySQL. The sampled pages and handlers show these core paths; some browser-side interactions and student-detail behavior are represented as separate capabilities, but their wiring was not verified in the excerpts.

Main entry points: [`php/node_class.php`](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/node_class.php) (Class and Records Model), [`take.php`](https://github.com/harshh351998/attendance-tracking-system/blob/master/take.php) (Take Attendance), [`index.php`](https://github.com/harshh351998/attendance-tracking-system/blob/master/index.php) (Sign In), [`php/defines.php`](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/defines.php) (Validation and Sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_sign_in["Sign In<br/>[index.php]"]
  node_login["Process Login<br/>[process_login.php]"]
  node_signup["Process Signup<br/>[process_signup.php]"]
  node_profile["Teacher Profile<br/>[profile.php]"]
  node_profile_update["Update Profile<br/>[update_profile.php]"]
  node_account_helpers["Validation and Sessions<br/>[defines.php]"]
end

subgraph group_classes["Class Management"]
  node_dashboard["Teacher Dashboard<br/>[teacher.php]"]
  node_class_editor["Edit Classes<br/>[class.php]"]
  node_add_class["Add Class<br/>[add_class.php]"]
  node_update_class["Update Class<br/>[update_class.php]"]
  node_class_model["Class and Records Model<br/>[node_class.php]"]
end

subgraph group_attendance["Attendance"]
  node_attendance_page["Take Attendance<br/>[take.php]"]
  node_attendance_actions["Attendance Actions"]
  node_student_detail["Student Records<br/>[student.php]"]
end

subgraph group_insights["Records and Statistics"]
  node_statistics["Attendance Statistics<br/>[statistics.php]"]
  node_attendance_data["Attendance Retrieval<br/>[get_attendance.php]"]
end

node_teacher(("Teacher"))
node_mysql[("MySQL Database<br/>[attendance.sql]")]

node_teacher -.->|"opens"| node_sign_in
node_sign_in -.->|"submits credentials"| node_login
node_sign_in -.->|"submits registration"| node_signup
node_login -->|"uses helpers"| node_account_helpers
node_signup -->|"uses helpers"| node_account_helpers
node_profile_update -->|"uses helpers"| node_account_helpers
node_dashboard -->|"loads classes"| node_class_model
node_class_editor -->|"loads classes"| node_class_model
node_add_class -->|"creates class"| node_class_model
node_update_class -->|"loads and saves"| node_class_model
node_attendance_page -->|"loads class records"| node_class_model
node_statistics -->|"loads attendance data"| node_class_model
node_class_model -->|"reads and writes"| node_mysql
node_attendance_page -.->|"sends attendance"| node_attendance_actions
node_attendance_page -->|"links to records"| node_student_detail
node_statistics -.->|"requests attendance"| node_attendance_data

click node_sign_in "https://github.com/harshh351998/attendance-tracking-system/blob/master/index.php"
click node_login "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/process_login.php"
click node_signup "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/process_signup.php"
click node_profile "https://github.com/harshh351998/attendance-tracking-system/blob/master/profile.php"
click node_profile_update "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/update_profile.php"
click node_account_helpers "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/defines.php"
click node_dashboard "https://github.com/harshh351998/attendance-tracking-system/blob/master/teacher.php"
click node_class_editor "https://github.com/harshh351998/attendance-tracking-system/blob/master/class.php"
click node_add_class "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/add_class.php"
click node_update_class "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/update_class.php"
click node_class_model "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/node_class.php"
click node_mysql "https://github.com/harshh351998/attendance-tracking-system/blob/master/attendance.sql"
click node_attendance_page "https://github.com/harshh351998/attendance-tracking-system/blob/master/take.php"
click node_attendance_actions "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/mark_attendance.php"
click node_student_detail "https://github.com/harshh351998/attendance-tracking-system/blob/master/student.php"
click node_statistics "https://github.com/harshh351998/attendance-tracking-system/blob/master/statistics.php"
click node_attendance_data "https://github.com/harshh351998/attendance-tracking-system/blob/master/php/get_attendance.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_sign_in,node_login,node_signup,node_profile,node_profile_update,node_account_helpers toneBlue
class node_dashboard,node_class_editor,node_add_class,node_update_class,node_class_model,node_mysql toneAmber
class node_attendance_page,node_attendance_actions,node_student_detail toneMint
class node_statistics,node_attendance_data toneRose
class node_teacher toneIndigo
```

## Components

### Accounts

- [Sign In](https://github.com/harshh351998/attendance-tracking-system/blob/master/index.php): `index.php`
- [Process Login](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/process_login.php): `php/process_login.php`
- [Process Signup](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/process_signup.php): `php/process_signup.php`
- [Teacher Profile](https://github.com/harshh351998/attendance-tracking-system/blob/master/profile.php): `profile.php`
- [Update Profile](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/update_profile.php): `php/update_profile.php`
- [Validation and Sessions](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/defines.php): `php/defines.php`

### Class Management

- [Teacher Dashboard](https://github.com/harshh351998/attendance-tracking-system/blob/master/teacher.php): `teacher.php`
- [Edit Classes](https://github.com/harshh351998/attendance-tracking-system/blob/master/class.php): `class.php`
- [Add Class](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/add_class.php): `php/add_class.php`
- [Update Class](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/update_class.php): `php/update_class.php`
- [Class and Records Model](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/node_class.php): `php/node_class.php`

### Attendance

- [Take Attendance](https://github.com/harshh351998/attendance-tracking-system/blob/master/take.php): `take.php`
- [Attendance Actions](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/mark_attendance.php): `php/mark_attendance.php`
- [Student Records](https://github.com/harshh351998/attendance-tracking-system/blob/master/student.php): `student.php`

### Records and Statistics

- [Attendance Statistics](https://github.com/harshh351998/attendance-tracking-system/blob/master/statistics.php): `statistics.php`
- [Attendance Retrieval](https://github.com/harshh351998/attendance-tracking-system/blob/master/php/get_attendance.php): `php/get_attendance.php`

### Other components

- **Teacher**
- [MySQL Database](https://github.com/harshh351998/attendance-tracking-system/blob/master/attendance.sql): `attendance.sql`

## Connections

- Teacher → Sign In: opens (evidence: `README.md`)
- Sign In → Process Login: submits credentials
- Sign In → Process Signup: submits registration
- Process Login → Validation and Sessions: uses helpers (evidence: `php/process_login.php`)
- Process Signup → Validation and Sessions: uses helpers (evidence: `php/process_signup.php`)
- Update Profile → Validation and Sessions: uses helpers (evidence: `php/update_profile.php`)
- Teacher Dashboard → Class and Records Model: loads classes (evidence: `teacher.php`)
- Edit Classes → Class and Records Model: loads classes (evidence: `class.php`)
- Add Class → Class and Records Model: creates class (evidence: `php/add_class.php`)
- Update Class → Class and Records Model: loads and saves (evidence: `php/update_class.php`)
- Take Attendance → Class and Records Model: loads class records (evidence: `take.php`)
- Attendance Statistics → Class and Records Model: loads attendance data (evidence: `statistics.php`)
- Class and Records Model → MySQL Database: reads and writes (evidence: `php/node_class.php`)
- Take Attendance → Attendance Actions: sends attendance
- Take Attendance → Student Records: links to records (evidence: `take.php`)
- Attendance Statistics → Attendance Retrieval: requests attendance
