# dp8260264-sys/studenthub architecture

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

- Interactive diagram: https://gitdiagram.com/dp8260264-sys/studenthub
- Repository: https://github.com/dp8260264-sys/studenthub

## Overview

StudentHub is a student-portal website with informational pages, interactive browser features, event/student/FAQ listings, support submission, and two registration implementations. The clearest workflow is a visitor submitting a registration or support form, followed by server-side validation and file/database persistence. The graph includes the sampled JSON-driven listings and database-backed student/event-registration queries. README content was unavailable, so broader capabilities are represented by the pages in the tree; unsampled page wiring is not asserted.

Main entry points: [`StudentHub/js/practical6.js`](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/js/practical6.js) (Listing search and render), [`StudentHub/dashboard.html`](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/dashboard.html) (Portal pages), [`StudentHub/StudentHub_UserRegistration/register.php`](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_UserRegistration/register.php) (Account registration), [`StudentHub/StudentHub_Database/students.php`](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/students.php) (Student lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal pages"]
  node_portal_pages["Portal pages<br/>[dashboard.html]"]
  node_learning_pages["Learning pages<br/>[attendance.html]"]
  node_community_pages["Community pages<br/>[events.html]"]
  node_account_pages["Account pages<br/>[register.html]"]
  node_support_page["Support page<br/>[contact.php]"]
end

subgraph group_browser["Browser interactions"]
  node_ui_scripts["Portal interactions<br/>[app.js]"]
  node_page_interactions["Page interactions<br/>[app.js]"]
end

subgraph group_records["Data listings"]
  node_listing_client["Listing search and render<br/>[practical6.js]"]
  node_json_records["Listing records<br/>[events.json]"]
  node_student_records["Student records<br/>[students.json]"]
  node_faq_records["FAQ records<br/>[faqs.json]"]
end

subgraph group_submission["Form submissions"]
  node_support_handler["Support intake<br/>[contact.php]"]
  node_support_store[("Support requests<br/>[contacts.json]")]
  node_basic_registration["Basic registration<br/>[register.php]"]
  node_registration_csv[("Registration file<br/>[registrations.csv]")]
  node_account_registration["Account registration<br/>[register.php]"]
end

subgraph group_database["Database access"]
  node_account_db_config["Account DB connection<br/>[db.php]"]
  node_mysql[("MySQL database")]
  node_student_query["Student lookup<br/>[students.php]"]
  node_event_reg_query["Event registrations query<br/>[registrations.php]"]
  node_pdo_config["PDO connection<br/>[db.php]"]
end

node_visitor(("Student / visitor"))

node_visitor -->|"browses"| node_portal_pages
node_visitor -->|"submits request"| node_support_handler
node_support_handler -->|"reads and writes"| node_support_store
node_visitor -->|"submits registration"| node_basic_registration
node_basic_registration -->|"appends records"| node_registration_csv
node_visitor -->|"posts account form"| node_account_registration
node_account_registration -->|"requires connection"| node_account_db_config
node_account_registration -->|"queries and inserts"| node_mysql
node_portal_pages -.->|"uses interactions"| node_ui_scripts
node_portal_pages -.->|"uses interactions"| node_page_interactions
node_community_pages -.->|"loads listings"| node_listing_client
node_listing_client -->|"fetches configured data"| node_json_records
node_listing_client -->|"fetches configured data"| node_student_records
node_listing_client -->|"fetches configured data"| node_faq_records
node_visitor -.->|"requests lookup"| node_student_query
node_student_query -->|"requires connection"| node_pdo_config
node_student_query -.->|"queries student"| node_mysql
node_visitor -.->|"requests registrations"| node_event_reg_query
node_event_reg_query -->|"requires connection"| node_pdo_config
node_event_reg_query -.->|"queries joined records"| node_mysql
node_account_db_config -.->|"connects to"| node_mysql
node_pdo_config -.->|"connects to"| node_mysql

click node_portal_pages "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/dashboard.html"
click node_learning_pages "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/attendance.html"
click node_community_pages "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/events.html"
click node_account_pages "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/register.html"
click node_support_page "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/contact.php"
click node_ui_scripts "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/app.js"
click node_page_interactions "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/js/app.js"
click node_listing_client "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/js/practical6.js"
click node_json_records "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/events.json"
click node_student_records "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/students.json"
click node_faq_records "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/faqs.json"
click node_support_handler "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/contact.php"
click node_support_store "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/contacts.json"
click node_basic_registration "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/register.php"
click node_registration_csv "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/registrations.csv"
click node_account_registration "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_UserRegistration/register.php"
click node_account_db_config "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_UserRegistration/db.php"
click node_student_query "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/students.php"
click node_event_reg_query "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/registrations.php"
click node_pdo_config "https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/db.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_portal_pages,node_learning_pages,node_community_pages,node_account_pages,node_support_page toneBlue
class node_ui_scripts,node_page_interactions toneAmber
class node_listing_client,node_json_records,node_student_records,node_faq_records toneMint
class node_support_handler,node_support_store,node_basic_registration,node_registration_csv,node_account_registration toneRose
class node_account_db_config,node_mysql,node_student_query,node_event_reg_query,node_pdo_config,node_visitor toneIndigo
```

## Components

### Portal pages

- [Portal pages](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/dashboard.html): `StudentHub/dashboard.html`
- [Learning pages](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/attendance.html): `StudentHub/attendance.html`
- [Community pages](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/events.html): `StudentHub/events.html`
- [Account pages](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/register.html): `StudentHub/register.html`
- [Support page](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/contact.php): `StudentHub/contact.php`

### Browser interactions

- [Portal interactions](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/app.js): `StudentHub/app.js`
- [Page interactions](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/js/app.js): `StudentHub/js/app.js`

### Data listings

- [Listing search and render](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/js/practical6.js): `StudentHub/js/practical6.js`
- [Listing records](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/events.json): `StudentHub/data/events.json`
- [Student records](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/students.json): `StudentHub/data/students.json`
- [FAQ records](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/faqs.json): `StudentHub/data/faqs.json`

### Form submissions

- [Support intake](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/contact.php): `StudentHub/contact.php`
- [Support requests](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/contacts.json): `StudentHub/data/contacts.json`
- [Basic registration](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/register.php): `StudentHub/register.php`
- [Registration file](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/data/registrations.csv): `StudentHub/data/registrations.csv`
- [Account registration](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_UserRegistration/register.php): `StudentHub/StudentHub_UserRegistration/register.php`

### Database access

- [Account DB connection](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_UserRegistration/db.php): `StudentHub/StudentHub_UserRegistration/db.php`
- **MySQL database**
- [Student lookup](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/students.php): `StudentHub/StudentHub_Database/students.php`
- [Event registrations query](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/registrations.php): `StudentHub/StudentHub_Database/registrations.php`
- [PDO connection](https://github.com/dp8260264-sys/studenthub/blob/main/StudentHub/StudentHub_Database/db.php): `StudentHub/StudentHub_Database/db.php`

### Other components

- **Student / visitor**

## Connections

- Student / visitor → Portal pages: browses
- Student / visitor → Support intake: submits request (evidence: `StudentHub/contact.php`)
- Support intake → Support requests: reads and writes (evidence: `StudentHub/contact.php`)
- Student / visitor → Basic registration: submits registration (evidence: `StudentHub/register.php`)
- Basic registration → Registration file: appends records (evidence: `StudentHub/register.php`)
- Student / visitor → Account registration: posts account form (evidence: `StudentHub/StudentHub_UserRegistration/register.php`)
- Account registration → Account DB connection: requires connection (evidence: `StudentHub/StudentHub_UserRegistration/register.php`)
- Account registration → MySQL database: queries and inserts (evidence: `StudentHub/StudentHub_UserRegistration/register.php`)
- Portal pages → Portal interactions: uses interactions
- Portal pages → Page interactions: uses interactions
- Community pages → Listing search and render: loads listings
- Listing search and render → Listing records: fetches configured data (evidence: `StudentHub/js/practical6.js`)
- Listing search and render → Student records: fetches configured data (evidence: `StudentHub/js/practical6.js`)
- Listing search and render → FAQ records: fetches configured data (evidence: `StudentHub/js/practical6.js`)
- Student / visitor → Student lookup: requests lookup
- Student lookup → PDO connection: requires connection (evidence: `StudentHub/StudentHub_Database/students.php`)
- Student lookup → MySQL database: queries student
- Student / visitor → Event registrations query: requests registrations
- Event registrations query → PDO connection: requires connection (evidence: `StudentHub/StudentHub_Database/registrations.php`)
- Event registrations query → MySQL database: queries joined records
- Account DB connection → MySQL database: connects to
- PDO connection → MySQL database: connects to
