# reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus architecture

> Architecture diagram of the GitHub repository reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus
- Repository: https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus

## Overview

SIA-FinalProj is a role-based Resource Generation Office portal for student merchandise ordering and staff order/inventory management, with administrative reporting. Students sign in, browse item variants, place orders, and review or cancel pending orders; staff register accounts, maintain the catalog, and update order status; administrators review received orders and generate reports. PHP pages perform the database queries directly, with shared connection and profile rendering. Paths and links reflect the supplied tree and sampled code; some routes are represented by their exact tree paths because their source was not sampled.

Main entry points: [`Database/db_sm3101.sql`](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Database/db_sm3101.sql) (RGO database), [`template.php`](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/template.php) (Profile template), [`index.php`](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/index.php) (Role login), [`Staff/item.php`](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/item.php) (Catalog list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and Profiles"]
  node_login["Role login<br/>[index.php]"]
  node_profile["Profile template<br/>[template.php]"]
  node_connection["DB connection<br/>[conn.php]"]
end

subgraph group_student["Student Ordering"]
  node_student_home["Browse and order<br/>[home.php]"]
  node_place_order["Place order<br/>[placeorder.php]"]
  node_history["Order history<br/>[history.php]"]
  node_student_cancel["Cancel order<br/>[del.php]"]
end

subgraph group_staff["Staff Operations"]
  node_staff_home["Order queue<br/>[home.php]"]
  node_staff_status["Update status<br/>[edit.php]"]
  node_staff_register["Register staff<br/>[register.php]"]
  node_staff_items["Catalog list<br/>[item.php]"]
  node_item_add["Add catalog item<br/>[additem.php]"]
  node_item_edit["Edit catalog item<br/>[updateitem.php]"]
  node_item_delete["Delete catalog item<br/>[del.php]"]
end

subgraph group_admin["Administration"]
  node_admin_home["Received orders<br/>[home.php]"]
  node_order_report["Order report<br/>[report.php]"]
  node_item_report["Item report<br/>[itemrep.php]"]
end

subgraph group_data["Database"]
  node_database[("RGO database<br/>[db_sm3101.sql]")]
end

node_user(("Portal user"))

node_user -->|"submits credentials"| node_login
node_login -->|"includes"| node_connection
node_login -->|"checks account"| node_database
node_login -->|"routes student"| node_student_home
node_login -->|"routes staff"| node_staff_home
node_login -->|"routes admin"| node_admin_home
node_student_home -->|"includes profile"| node_profile
node_staff_home -->|"includes profile"| node_profile
node_admin_home -->|"includes profile"| node_profile
node_profile -->|"includes"| node_connection
node_profile -->|"reads profile"| node_database
node_student_home -->|"reads catalog and orders"| node_database
node_student_home -->|"submits order"| node_place_order
node_place_order -->|"includes"| node_connection
node_place_order -->|"creates pending order"| node_database
node_history -->|"includes profile"| node_profile
node_history -->|"reads order history"| node_database
node_history -->|"cancels pending order"| node_student_cancel
node_student_cancel -->|"updates order"| node_database
node_staff_home -->|"reads order queue"| node_database
node_staff_home -->|"submits status change"| node_staff_status
node_staff_status -->|"updates order"| node_database
node_staff_home -->|"registers account"| node_staff_register
node_staff_register -->|"writes account"| node_database
node_staff_items -->|"includes profile"| node_profile
node_staff_items -->|"reads catalog"| node_database
node_staff_items -->|"submits new item"| node_item_add
node_staff_items -->|"submits item changes"| node_item_edit
node_staff_items -->|"deletes item"| node_item_delete
node_item_add -->|"writes catalog"| node_database
node_item_edit -->|"updates catalog"| node_database
node_item_delete -->|"deletes catalog item"| node_database
node_admin_home -->|"reads received orders"| node_database
node_admin_home -->|"requests report"| node_order_report
node_admin_home -->|"requests report"| node_item_report
node_order_report -->|"queries order data"| node_database
node_item_report -->|"queries catalog data"| node_database

click node_login "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/index.php"
click node_profile "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/template.php"
click node_connection "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/conn.php"
click node_student_home "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/home.php"
click node_place_order "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/placeorder.php"
click node_history "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/history.php"
click node_student_cancel "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/del.php"
click node_staff_home "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/home.php"
click node_staff_status "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/edit.php"
click node_staff_register "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/register.php"
click node_staff_items "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/item.php"
click node_item_add "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/additem.php"
click node_item_edit "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/updateitem.php"
click node_item_delete "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/del.php"
click node_admin_home "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/home.php"
click node_order_report "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/report.php"
click node_item_report "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/itemrep.php"
click node_database "https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Database/db_sm3101.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_login,node_profile,node_connection,node_user toneBlue
class node_student_home,node_place_order,node_history,node_student_cancel toneAmber
class node_staff_home,node_staff_status,node_staff_register,node_staff_items,node_item_add,node_item_edit,node_item_delete toneMint
class node_admin_home,node_order_report,node_item_report toneRose
class node_database toneIndigo
```

## Components

### Access and Profiles

- [Role login](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/index.php): `index.php`
- [Profile template](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/template.php): `template.php`
- [DB connection](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/conn.php): `conn.php`

### Student Ordering

- [Browse and order](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/home.php): `Student/home.php`
- [Place order](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/placeorder.php): `Student/placeorder.php`
- [Order history](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/history.php): `Student/history.php`
- [Cancel order](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Student/del.php): `Student/del.php`

### Staff Operations

- [Order queue](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/home.php): `Staff/home.php`
- [Update status](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/edit.php): `Staff/edit.php`
- [Register staff](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/register.php): `Staff/register.php`
- [Catalog list](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/item.php): `Staff/item.php`
- [Add catalog item](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/additem.php): `Staff/additem.php`
- [Edit catalog item](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/updateitem.php): `Staff/updateitem.php`
- [Delete catalog item](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Staff/del.php): `Staff/del.php`

### Administration

- [Received orders](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/home.php): `Admin/home.php`
- [Order report](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/report.php): `Admin/report.php`
- [Item report](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Admin/itemrep.php): `Admin/itemrep.php`

### Database

- [RGO database](https://github.com/reyharold/order-reservation-and-tracking-for-rgo-bsu-lipa-campus/blob/master/Database/db_sm3101.sql): `Database/db_sm3101.sql`

### Other components

- **Portal user**

## Connections

- Portal user → Role login: submits credentials
- Role login → DB connection: includes
- Role login → RGO database: checks account
- Role login → Browse and order: routes student
- Role login → Order queue: routes staff
- Role login → Received orders: routes admin
- Browse and order → Profile template: includes profile
- Order queue → Profile template: includes profile
- Received orders → Profile template: includes profile
- Profile template → DB connection: includes
- Profile template → RGO database: reads profile
- Browse and order → RGO database: reads catalog and orders
- Browse and order → Place order: submits order
- Place order → DB connection: includes
- Place order → RGO database: creates pending order
- Order history → Profile template: includes profile
- Order history → RGO database: reads order history
- Order history → Cancel order: cancels pending order
- Cancel order → RGO database: updates order
- Order queue → RGO database: reads order queue
- Order queue → Update status: submits status change
- Update status → RGO database: updates order
- Order queue → Register staff: registers account
- Register staff → RGO database: writes account
- Catalog list → Profile template: includes profile
- Catalog list → RGO database: reads catalog
- Catalog list → Add catalog item: submits new item
- Catalog list → Edit catalog item: submits item changes
- Catalog list → Delete catalog item: deletes item
- Add catalog item → RGO database: writes catalog
- Edit catalog item → RGO database: updates catalog
- Delete catalog item → RGO database: deletes catalog item
- Received orders → RGO database: reads received orders
- Received orders → Order report: requests report
- Received orders → Item report: requests report
- Order report → RGO database: queries order data
- Item report → RGO database: queries catalog data
