# danielnnko/final-project architecture

> Architecture diagram of the GitHub repository danielnnko/final-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielnnko/final-project
- Repository: https://github.com/danielnnko/final-project

## Overview

This is a PHP hostel-management web application for student registration, accommodation and payment tracking, maintenance requests, and role-based administration. The principal workflow is a student registering or signing in, then using a dashboard to review accommodation and payment status, submit payments or maintenance requests, and follow their status. Wardens and administrators manage students and block-manager roles; block managers handle their block’s students and maintenance. The README is empty, so capability coverage is based on the file tree and sampled pages; unsampled page-level wiring is shown only where routes are visible.

Main entry points: [`config/database.php`](https://github.com/danielnnko/final-project/blob/main/config/database.php) (Database Connection), [`pages/student/dashboard.php`](https://github.com/danielnnko/final-project/blob/main/pages/student/dashboard.php) (Student Dashboard), [`pages/block-manager/dashboard.php`](https://github.com/danielnnko/final-project/blob/main/pages/block-manager/dashboard.php) (Block Dashboard), [`auth/login.php`](https://github.com/danielnnko/final-project/blob/main/auth/login.php) (Sign In)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Accounts"]
  node_registration["Registration<br/>[register.php]"]
  node_login["Sign In<br/>[login.php]"]
  node_logout["Sign Out<br/>[logout.php]"]
end

subgraph group_student["Student Services"]
  node_student_dash["Student Dashboard<br/>[dashboard.php]"]
  node_profile["Student Profile<br/>[profile.php]"]
  node_payments["Student Payments<br/>[payments.php]"]
  node_equipment["Equipment<br/>[equipment.php]"]
end

subgraph group_operations["Hostel Operations"]
  node_maintenance["Maintenance Requests<br/>[dashboard.php]"]
  node_block_dash["Block Dashboard<br/>[dashboard.php]"]
  node_block_maintenance["Block Maintenance<br/>[maintenance.php]"]
  node_block_students["Block Students<br/>[students.php]"]
end

subgraph group_oversight["Administration"]
  node_student_admin["Student Records<br/>[students.php]"]
  node_student_details["Student Details"]
  node_payment_verify["Payment Review"]
  node_payment_verify_one["Payment Verification<br/>[verify-payment.php]"]
  node_admin_maintenance["Maintenance Oversight<br/>[maintenance.php]"]
  node_maintenance_detail["Request Details"]
  node_warden_dash["Warden Dashboard<br/>[dashboard.php]"]
  node_warden_managers["Warden Manager Roles"]
  node_admin_managers["Admin Manager Roles"]
  node_manager_create["Create Manager"]
  node_mattress["Mattress Assignment"]
  node_reports["Reports<br/>[reports.php]"]
end

node_student_actor(("Student"))
node_staff_actor(("Hostel Staff"))
node_database_link["Database Connection<br/>[database.php]"]
node_hostel_db[("Hostel Database<br/>[hostel_db.sql]")]

node_student_actor -->|"registers"| node_registration
node_student_actor -->|"signs in"| node_login
node_staff_actor -->|"signs in"| node_login
node_login -->|"queries"| node_database_link
node_registration -->|"uses connection"| node_database_link
node_database_link -->|"connects to"| node_hostel_db
node_student_actor -->|"opens"| node_student_dash
node_student_dash -->|"queries"| node_database_link
node_student_dash -->|"links to"| node_payments
node_student_dash -->|"shows requests"| node_maintenance
node_student_actor -->|"manages profile"| node_profile
node_student_actor -->|"manages payments"| node_payments
node_student_actor -->|"views equipment"| node_equipment
node_staff_actor -->|"manages students"| node_student_admin
node_staff_actor -->|"reviews payments"| node_payment_verify
node_staff_actor -->|"verifies payment"| node_payment_verify_one
node_staff_actor -->|"reviews requests"| node_admin_maintenance
node_admin_maintenance -->|"opens details"| node_maintenance_detail
node_staff_actor -->|"opens"| node_warden_dash
node_staff_actor -->|"assigns roles"| node_warden_managers
node_warden_managers -->|"updates roles"| node_database_link
node_staff_actor -->|"manages roles"| node_admin_managers
node_admin_managers -->|"queries roles"| node_database_link
node_staff_actor -->|"creates manager"| node_manager_create
node_manager_create -->|"updates role"| node_database_link
node_staff_actor -->|"assigns equipment"| node_mattress
node_staff_actor -->|"views reports"| node_reports
node_staff_actor -->|"opens"| node_block_dash
node_block_dash -->|"queries block"| node_database_link
node_block_dash -->|"links to"| node_block_students
node_block_dash -->|"links to"| node_block_maintenance
node_student_actor -->|"signs out"| node_logout

click node_registration "https://github.com/danielnnko/final-project/blob/main/auth/register.php"
click node_login "https://github.com/danielnnko/final-project/blob/main/auth/login.php"
click node_logout "https://github.com/danielnnko/final-project/blob/main/auth/logout.php"
click node_student_dash "https://github.com/danielnnko/final-project/blob/main/pages/student/dashboard.php"
click node_profile "https://github.com/danielnnko/final-project/blob/main/pages/student/profile.php"
click node_payments "https://github.com/danielnnko/final-project/blob/main/pages/student/payments.php"
click node_equipment "https://github.com/danielnnko/final-project/blob/main/pages/student/equipment.php"
click node_student_admin "https://github.com/danielnnko/final-project/blob/main/pages/admin/students.php"
click node_student_details "https://github.com/danielnnko/final-project/blob/main/pages/admin/student-details.php"
click node_payment_verify "https://github.com/danielnnko/final-project/blob/main/pages/admin/verify-payments.php"
click node_payment_verify_one "https://github.com/danielnnko/final-project/blob/main/pages/admin/verify-payment.php"
click node_maintenance "https://github.com/danielnnko/final-project/blob/main/pages/student/dashboard.php"
click node_admin_maintenance "https://github.com/danielnnko/final-project/blob/main/pages/admin/maintenance.php"
click node_maintenance_detail "https://github.com/danielnnko/final-project/blob/main/pages/admin/maintenance-details.php"
click node_block_dash "https://github.com/danielnnko/final-project/blob/main/pages/block-manager/dashboard.php"
click node_block_maintenance "https://github.com/danielnnko/final-project/blob/main/pages/block-manager/maintenance.php"
click node_block_students "https://github.com/danielnnko/final-project/blob/main/pages/block-manager/students.php"
click node_warden_dash "https://github.com/danielnnko/final-project/blob/main/pages/warden/dashboard.php"
click node_warden_managers "https://github.com/danielnnko/final-project/blob/main/pages/warden/manage-block-managers.php"
click node_admin_managers "https://github.com/danielnnko/final-project/blob/main/pages/admin/manage-block-managers.php"
click node_manager_create "https://github.com/danielnnko/final-project/blob/main/pages/admin/create-block-manager.php"
click node_mattress "https://github.com/danielnnko/final-project/blob/main/pages/admin/assign-mattress.php"
click node_reports "https://github.com/danielnnko/final-project/blob/main/pages/admin/reports.php"
click node_database_link "https://github.com/danielnnko/final-project/blob/main/config/database.php"
click node_hostel_db "https://github.com/danielnnko/final-project/blob/main/database/hostel_db.sql"

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_registration,node_login,node_logout toneBlue
class node_student_dash,node_profile,node_payments,node_equipment,node_database_link,node_hostel_db toneAmber
class node_maintenance,node_block_dash,node_block_maintenance,node_block_students toneMint
class node_student_admin,node_student_details,node_payment_verify,node_payment_verify_one,node_admin_maintenance,node_maintenance_detail,node_warden_dash,node_warden_managers,node_admin_managers,node_manager_create,node_mattress,node_reports toneRose
class node_student_actor,node_staff_actor toneIndigo
```

## Components

### Accounts

- [Registration](https://github.com/danielnnko/final-project/blob/main/auth/register.php): `auth/register.php`
- [Sign In](https://github.com/danielnnko/final-project/blob/main/auth/login.php): `auth/login.php`
- [Sign Out](https://github.com/danielnnko/final-project/blob/main/auth/logout.php): `auth/logout.php`

### Student Services

- [Student Dashboard](https://github.com/danielnnko/final-project/blob/main/pages/student/dashboard.php): `pages/student/dashboard.php`
- [Student Profile](https://github.com/danielnnko/final-project/blob/main/pages/student/profile.php): `pages/student/profile.php`
- [Student Payments](https://github.com/danielnnko/final-project/blob/main/pages/student/payments.php): `pages/student/payments.php`
- [Equipment](https://github.com/danielnnko/final-project/blob/main/pages/student/equipment.php): `pages/student/equipment.php`

### Hostel Operations

- [Maintenance Requests](https://github.com/danielnnko/final-project/blob/main/pages/student/dashboard.php): `pages/student/dashboard.php`
- [Block Dashboard](https://github.com/danielnnko/final-project/blob/main/pages/block-manager/dashboard.php): `pages/block-manager/dashboard.php`
- [Block Maintenance](https://github.com/danielnnko/final-project/blob/main/pages/block-manager/maintenance.php): `pages/block-manager/maintenance.php`
- [Block Students](https://github.com/danielnnko/final-project/blob/main/pages/block-manager/students.php): `pages/block-manager/students.php`

### Administration

- [Student Records](https://github.com/danielnnko/final-project/blob/main/pages/admin/students.php): `pages/admin/students.php`
- [Student Details](https://github.com/danielnnko/final-project/blob/main/pages/admin/student-details.php): `pages/admin/student-details.php`
- [Payment Review](https://github.com/danielnnko/final-project/blob/main/pages/admin/verify-payments.php): `pages/admin/verify-payments.php`
- [Payment Verification](https://github.com/danielnnko/final-project/blob/main/pages/admin/verify-payment.php): `pages/admin/verify-payment.php`
- [Maintenance Oversight](https://github.com/danielnnko/final-project/blob/main/pages/admin/maintenance.php): `pages/admin/maintenance.php`
- [Request Details](https://github.com/danielnnko/final-project/blob/main/pages/admin/maintenance-details.php): `pages/admin/maintenance-details.php`
- [Warden Dashboard](https://github.com/danielnnko/final-project/blob/main/pages/warden/dashboard.php): `pages/warden/dashboard.php`
- [Warden Manager Roles](https://github.com/danielnnko/final-project/blob/main/pages/warden/manage-block-managers.php): `pages/warden/manage-block-managers.php`
- [Admin Manager Roles](https://github.com/danielnnko/final-project/blob/main/pages/admin/manage-block-managers.php): `pages/admin/manage-block-managers.php`
- [Create Manager](https://github.com/danielnnko/final-project/blob/main/pages/admin/create-block-manager.php): `pages/admin/create-block-manager.php`
- [Mattress Assignment](https://github.com/danielnnko/final-project/blob/main/pages/admin/assign-mattress.php): `pages/admin/assign-mattress.php`
- [Reports](https://github.com/danielnnko/final-project/blob/main/pages/admin/reports.php): `pages/admin/reports.php`

### Other components

- **Student**
- **Hostel Staff**
- [Database Connection](https://github.com/danielnnko/final-project/blob/main/config/database.php): `config/database.php`
- [Hostel Database](https://github.com/danielnnko/final-project/blob/main/database/hostel_db.sql): `database/hostel_db.sql`

## Connections

- Student → Registration: registers
- Student → Sign In: signs in
- Hostel Staff → Sign In: signs in
- Sign In → Database Connection: queries
- Registration → Database Connection: uses connection
- Database Connection → Hostel Database: connects to
- Student → Student Dashboard: opens
- Student Dashboard → Database Connection: queries
- Student Dashboard → Student Payments: links to
- Student Dashboard → Maintenance Requests: shows requests
- Student → Student Profile: manages profile
- Student → Student Payments: manages payments
- Student → Equipment: views equipment
- Hostel Staff → Student Records: manages students
- Hostel Staff → Payment Review: reviews payments
- Hostel Staff → Payment Verification: verifies payment
- Hostel Staff → Maintenance Oversight: reviews requests
- Maintenance Oversight → Request Details: opens details
- Hostel Staff → Warden Dashboard: opens
- Hostel Staff → Warden Manager Roles: assigns roles
- Warden Manager Roles → Database Connection: updates roles
- Hostel Staff → Admin Manager Roles: manages roles
- Admin Manager Roles → Database Connection: queries roles
- Hostel Staff → Create Manager: creates manager
- Create Manager → Database Connection: updates role
- Hostel Staff → Mattress Assignment: assigns equipment
- Hostel Staff → Reports: views reports
- Hostel Staff → Block Dashboard: opens
- Block Dashboard → Database Connection: queries block
- Block Dashboard → Block Students: links to
- Block Dashboard → Block Maintenance: links to
- Student → Sign Out: signs out
