# erosverano260-ctrl/workload-management-system-mgt9-g2 architecture

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

- Interactive diagram: https://gitdiagram.com/erosverano260-ctrl/workload-management-system-mgt9-g2
- Repository: https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2

## Overview

EE Workload Management is a two-role portal for department administrators and faculty. The main workflow is administrator sign-in, maintaining courses, rooms, and instructors, then creating schedules and producing printable or Excel forms; faculty sign in to view their own timetable and workload, update personal availability, and submit designation or overload requests for chair review. Notifications carry decisions back to faculty. The graph preserves these documented capabilities, plus authentication, shared load rules, and database access. Some page implementations were not sampled, so links for documented features cite the README rather than implying source inspection.

Main entry points: [`admin/approvals.php`](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/approvals.php) (Chair approvals), [`includes/xlsx_forms.php`](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/xlsx_forms.php) (Excel forms), [`admin/schedule.php`](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/schedule.php) (Schedule builder), [`login.php`](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/login.php) (Sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shared services"]
  node_login["Sign-in<br/>[login.php]"]
  node_auth["Role access<br/>[auth.php]"]
  node_database["Database connection<br/>[db.php]"]
  node_mysql[("Workload database")]
end

subgraph group_admin["Administration"]
  node_courses["Course catalog<br/>[courses.php]"]
  node_classrooms["Classroom management<br/>[classrooms.php]"]
  node_instructors["Instructor accounts<br/>[instructors.php]"]
  node_schedule_admin["Schedule builder<br/>[schedule.php]"]
  node_schedule_data["Schedule records<br/>[schedule.php]"]
  node_schedule_api["Schedule lookups"]
end

subgraph group_faculty["Faculty portal"]
  node_faculty_dashboard["Faculty dashboard<br/>[index.php]"]
  node_faculty_schedule["Personal timetable<br/>[schedule.php]"]
  node_profile["Profile and availability<br/>[profile.php]"]
end

subgraph group_workflow["Approvals and outputs"]
  node_requests["Designation and overload requests"]
  node_approvals["Chair approvals<br/>[approvals.php]"]
  node_designation_admin["Designation settings<br/>[designations.php]"]
  node_load_rules["Workload rules<br/>[approvals.php]"]
  node_notifications["Notifications<br/>[notify.php]"]
  node_print_forms["Printable forms<br/>[print_helpers.php]"]
  node_excel_forms["Excel forms<br/>[xlsx_forms.php]"]
  node_xlsx_writer["Workbook writer<br/>[xlsx_writer.php]"]
end

node_administrator(("Administrator"))
node_instructor(("Instructor"))

node_administrator -->|"signs in"| node_login
node_instructor -->|"signs in"| node_login
node_login -->|"checks roles"| node_auth
node_auth -.->|"authorizes access"| node_database
node_database -->|"connects to"| node_mysql
node_administrator -->|"manages courses"| node_courses
node_administrator -->|"manages rooms"| node_classrooms
node_administrator -->|"manages accounts"| node_instructors
node_administrator -->|"builds schedules"| node_schedule_admin
node_schedule_admin -->|"fetches lookups"| node_schedule_api
node_schedule_admin -.->|"maintains schedules"| node_schedule_data
node_schedule_api -->|"reads data"| node_database
node_instructor -->|"views workload"| node_faculty_dashboard
node_faculty_dashboard -->|"calculates load"| node_load_rules
node_instructor -->|"views timetable"| node_faculty_schedule
node_instructor -->|"updates availability"| node_profile
node_instructor -->|"submits requests"| node_requests
node_requests -->|"queues for review"| node_approvals
node_administrator -->|"reviews requests"| node_approvals
node_administrator -->|"sets designation hours"| node_designation_admin
node_approvals -->|"checks limits"| node_load_rules
node_approvals -->|"sends decisions"| node_notifications
node_notifications -->|"delivers updates"| node_instructor
node_administrator -->|"prints forms"| node_print_forms
node_instructor -->|"prints own form"| node_print_forms
node_administrator -->|"downloads workbook"| node_excel_forms
node_instructor -->|"downloads own workbook"| node_excel_forms
node_excel_forms -->|"reuses form data"| node_print_forms
node_excel_forms -->|"builds sheets"| node_xlsx_writer

click node_login "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/login.php"
click node_auth "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/auth.php"
click node_database "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/db.php"
click node_courses "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/courses.php"
click node_classrooms "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/classrooms.php"
click node_instructors "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/instructors.php"
click node_schedule_admin "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/schedule.php"
click node_schedule_data "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/schedule.php"
click node_schedule_api "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/tree/main/data"
click node_faculty_dashboard "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/index.php"
click node_faculty_schedule "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/schedule.php"
click node_profile "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/profile.php"
click node_requests "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/tree/main/faculty"
click node_approvals "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/approvals.php"
click node_designation_admin "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/designations.php"
click node_load_rules "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/approvals.php"
click node_notifications "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/notify.php"
click node_print_forms "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/print_helpers.php"
click node_excel_forms "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/xlsx_forms.php"
click node_xlsx_writer "https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/xlsx_writer.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_login,node_auth,node_database,node_mysql toneBlue
class node_courses,node_classrooms,node_instructors,node_schedule_admin,node_schedule_data,node_schedule_api toneAmber
class node_faculty_dashboard,node_faculty_schedule,node_profile toneMint
class node_requests,node_approvals,node_designation_admin,node_load_rules,node_notifications,node_print_forms,node_excel_forms,node_xlsx_writer toneRose
class node_administrator,node_instructor toneIndigo
```

## Components

### Access and shared services

- [Sign-in](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/login.php): `login.php`
- [Role access](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/auth.php): `includes/auth.php`
- [Database connection](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/db.php): `includes/db.php`
- **Workload database**

### Administration

- [Course catalog](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/courses.php): `admin/courses.php`
- [Classroom management](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/classrooms.php): `admin/classrooms.php`
- [Instructor accounts](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/instructors.php): `admin/instructors.php`
- [Schedule builder](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/schedule.php): `admin/schedule.php`
- [Schedule records](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/schedule.php): `schedule.php`
- [Schedule lookups](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/tree/main/data): `data`

### Faculty portal

- [Faculty dashboard](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/index.php): `faculty/index.php`
- [Personal timetable](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/schedule.php): `faculty/schedule.php`
- [Profile and availability](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/faculty/profile.php): `faculty/profile.php`

### Approvals and outputs

- [Designation and overload requests](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/tree/main/faculty): `faculty`
- [Chair approvals](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/approvals.php): `admin/approvals.php`
- [Designation settings](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/admin/designations.php): `admin/designations.php`
- [Workload rules](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/approvals.php): `includes/approvals.php`
- [Notifications](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/notify.php): `includes/notify.php`
- [Printable forms](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/print_helpers.php): `includes/print_helpers.php`
- [Excel forms](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/xlsx_forms.php): `includes/xlsx_forms.php`
- [Workbook writer](https://github.com/erosverano260-ctrl/workload-management-system-mgt9-g2/blob/main/includes/xlsx_writer.php): `includes/xlsx_writer.php`

### Other components

- **Administrator**
- **Instructor**

## Connections

- Administrator → Sign-in: signs in
- Instructor → Sign-in: signs in
- Sign-in → Role access: checks roles (evidence: `login.php`)
- Role access → Database connection: authorizes access
- Database connection → Workload database: connects to (evidence: `includes/db.php`)
- Administrator → Course catalog: manages courses
- Administrator → Classroom management: manages rooms
- Administrator → Instructor accounts: manages accounts
- Administrator → Schedule builder: builds schedules
- Schedule builder → Schedule lookups: fetches lookups
- Schedule builder → Schedule records: maintains schedules
- Schedule lookups → Database connection: reads data (evidence: `data/get_booked_times.php`)
- Instructor → Faculty dashboard: views workload
- Faculty dashboard → Workload rules: calculates load (evidence: `faculty/index.php`)
- Instructor → Personal timetable: views timetable
- Instructor → Profile and availability: updates availability
- Instructor → Designation and overload requests: submits requests
- Designation and overload requests → Chair approvals: queues for review
- Administrator → Chair approvals: reviews requests
- Administrator → Designation settings: sets designation hours
- Chair approvals → Workload rules: checks limits (evidence: `includes/approvals.php`)
- Chair approvals → Notifications: sends decisions
- Notifications → Instructor: delivers updates
- Administrator → Printable forms: prints forms
- Instructor → Printable forms: prints own form
- Administrator → Excel forms: downloads workbook
- Instructor → Excel forms: downloads own workbook
- Excel forms → Printable forms: reuses form data (evidence: `includes/xlsx_forms.php`)
- Excel forms → Workbook writer: builds sheets (evidence: `includes/xlsx_forms.php`)
