# zerabyte88/web-hs15 architecture

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

- Interactive diagram: https://gitdiagram.com/zerabyte88/web-hs15
- Repository: https://github.com/zerabyte88/web-hs15

## Overview

HS15 is a private community photo and video archive with member accounts and administrator tools. Members authenticate, enter a private hub, browse photo albums or videos, and manage their profiles; administrators additionally manage media and user roles. The map includes the documented thumbnail, poster, and protected-streaming capabilities. Several PHP modules are only partially sampled, so edges for those features rely on README statements; unsampled JavaScript wiring is not asserted.

Main entry points: [`php/security_helper.php`](https://github.com/zerabyte88/web-hs15/blob/main/php/security_helper.php) (Security Services), [`php/vidgallery.php`](https://github.com/zerabyte88/web-hs15/blob/main/php/vidgallery.php) (Video Gallery), [`php/admin.php`](https://github.com/zerabyte88/web-hs15/blob/main/php/admin.php) (Admin Panel), [`php/choose.php`](https://github.com/zerabyte88/web-hs15/blob/main/php/choose.php) (Private Hub)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Accounts"]
  node_login["Sign In<br/>[index.php]"]
  node_login_handler["Authentication<br/>[login.php]"]
  node_registration["Registration<br/>[register.php]"]
  node_password_reset["Password Recovery<br/>[fgpass.php]"]
  node_reset_handler["Reset Password<br/>[reset_password.php]"]
  node_account["Account Settings<br/>[account.php]"]
  node_profile_image["Profile Images<br/>[profile_image.php]"]
  node_logout["Sign Out<br/>[logout.php]"]
end

subgraph group_browse["Archive Browsing"]
  node_hub["Private Hub<br/>[choose.php]"]
  node_photo_gallery["Photo Gallery<br/>[gallery.php]"]
  node_video_gallery["Video Gallery<br/>[vidgallery.php]"]
end

subgraph group_media["Media Handling"]
  node_media_gateway["Protected Media Gateway<br/>[media.php]"]
  node_video_poster["Video Poster Upload<br/>[video_thumb.php]"]
  node_media_storage[("Media Files and Thumbnails")]
end

subgraph group_admin["Administration"]
  node_admin_panel["Admin Panel<br/>[admin.php]"]
end

subgraph group_core["Shared Services"]
  node_database[("MySQL Database<br/>[connect.php]")]
  node_security["Security Services"]
  node_gallery_stats["Gallery Statistics<br/>[stats_helper.php]"]
end

node_visitor(("Member or Admin"))
node_mysql_service[("MySQL")]

node_visitor -->|"opens"| node_login
node_login -->|"submits credentials"| node_login_handler
node_login_handler -.->|"signs in"| node_hub
node_login -->|"uses session security"| node_security
node_registration -->|"creates account"| node_database
node_password_reset -->|"creates reset token"| node_security
node_password_reset -->|"provides reset link"| node_reset_handler
node_account -->|"updates account"| node_database
node_account -->|"uses security checks"| node_security
node_visitor -->|"browses archive"| node_hub
node_hub -->|"opens photos"| node_photo_gallery
node_hub -->|"opens videos"| node_video_gallery
node_photo_gallery -->|"gets counts"| node_gallery_stats
node_video_gallery -->|"gets counts"| node_gallery_stats
node_photo_gallery -->|"loads protected media"| node_media_gateway
node_video_gallery -->|"streams video"| node_media_gateway
node_media_gateway -->|"checks access"| node_security
node_media_gateway -->|"reads files"| node_media_storage
node_video_gallery -->|"uploads browser poster"| node_video_poster
node_video_poster -->|"writes poster"| node_media_storage
node_visitor -->|"administers archive"| node_admin_panel
node_admin_panel -->|"manages users and media"| node_database
node_admin_panel -->|"requires admin role"| node_security
node_admin_panel -->|"gets counts"| node_gallery_stats
node_database -->|"connects to"| node_mysql_service

click node_login "https://github.com/zerabyte88/web-hs15/blob/main/php/index.php"
click node_login_handler "https://github.com/zerabyte88/web-hs15/blob/main/php/login.php"
click node_registration "https://github.com/zerabyte88/web-hs15/blob/main/php/register.php"
click node_password_reset "https://github.com/zerabyte88/web-hs15/blob/main/php/fgpass.php"
click node_reset_handler "https://github.com/zerabyte88/web-hs15/blob/main/php/reset_password.php"
click node_account "https://github.com/zerabyte88/web-hs15/blob/main/php/account.php"
click node_profile_image "https://github.com/zerabyte88/web-hs15/blob/main/php/profile_image.php"
click node_logout "https://github.com/zerabyte88/web-hs15/blob/main/php/logout.php"
click node_hub "https://github.com/zerabyte88/web-hs15/blob/main/php/choose.php"
click node_photo_gallery "https://github.com/zerabyte88/web-hs15/blob/main/php/gallery.php"
click node_video_gallery "https://github.com/zerabyte88/web-hs15/blob/main/php/vidgallery.php"
click node_admin_panel "https://github.com/zerabyte88/web-hs15/blob/main/php/admin.php"
click node_database "https://github.com/zerabyte88/web-hs15/blob/main/php/connect.php"
click node_security "https://github.com/zerabyte88/web-hs15/blob/main/php/security_helper.php"
click node_gallery_stats "https://github.com/zerabyte88/web-hs15/blob/main/php/stats_helper.php"
click node_media_gateway "https://github.com/zerabyte88/web-hs15/blob/main/php/media.php"
click node_video_poster "https://github.com/zerabyte88/web-hs15/blob/main/php/video_thumb.php"
click node_media_storage "https://github.com/zerabyte88/web-hs15/tree/main/media"

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_login_handler,node_registration,node_password_reset,node_reset_handler,node_account,node_profile_image,node_logout toneBlue
class node_hub,node_photo_gallery,node_video_gallery,node_mysql_service toneAmber
class node_media_gateway,node_video_poster,node_media_storage toneMint
class node_admin_panel toneRose
class node_database,node_security,node_gallery_stats,node_visitor toneIndigo
```

## Components

### Access and Accounts

- [Sign In](https://github.com/zerabyte88/web-hs15/blob/main/php/index.php): `php/index.php`
- [Authentication](https://github.com/zerabyte88/web-hs15/blob/main/php/login.php): `php/login.php`
- [Registration](https://github.com/zerabyte88/web-hs15/blob/main/php/register.php): `php/register.php`
- [Password Recovery](https://github.com/zerabyte88/web-hs15/blob/main/php/fgpass.php): `php/fgpass.php`
- [Reset Password](https://github.com/zerabyte88/web-hs15/blob/main/php/reset_password.php): `php/reset_password.php`
- [Account Settings](https://github.com/zerabyte88/web-hs15/blob/main/php/account.php): `php/account.php`
- [Profile Images](https://github.com/zerabyte88/web-hs15/blob/main/php/profile_image.php): `php/profile_image.php`
- [Sign Out](https://github.com/zerabyte88/web-hs15/blob/main/php/logout.php): `php/logout.php`

### Archive Browsing

- [Private Hub](https://github.com/zerabyte88/web-hs15/blob/main/php/choose.php): `php/choose.php`
- [Photo Gallery](https://github.com/zerabyte88/web-hs15/blob/main/php/gallery.php): `php/gallery.php`
- [Video Gallery](https://github.com/zerabyte88/web-hs15/blob/main/php/vidgallery.php): `php/vidgallery.php`

### Media Handling

- [Protected Media Gateway](https://github.com/zerabyte88/web-hs15/blob/main/php/media.php): `php/media.php`
- [Video Poster Upload](https://github.com/zerabyte88/web-hs15/blob/main/php/video_thumb.php): `php/video_thumb.php`
- [Media Files and Thumbnails](https://github.com/zerabyte88/web-hs15/tree/main/media): `media`

### Administration

- [Admin Panel](https://github.com/zerabyte88/web-hs15/blob/main/php/admin.php): `php/admin.php`

### Shared Services

- [MySQL Database](https://github.com/zerabyte88/web-hs15/blob/main/php/connect.php): `php/connect.php`
- [Security Services](https://github.com/zerabyte88/web-hs15/blob/main/php/security_helper.php): `php/security_helper.php`
- [Gallery Statistics](https://github.com/zerabyte88/web-hs15/blob/main/php/stats_helper.php): `php/stats_helper.php`

### Other components

- **Member or Admin**
- **MySQL**

## Connections

- Member or Admin → Sign In: opens (evidence: `README.md`)
- Sign In → Authentication: submits credentials (evidence: `README.md`)
- Authentication → Private Hub: signs in
- Sign In → Security Services: uses session security (evidence: `php/index.php`)
- Registration → MySQL Database: creates account (evidence: `php/register.php`)
- Password Recovery → Security Services: creates reset token (evidence: `php/fgpass.php`)
- Password Recovery → Reset Password: provides reset link (evidence: `php/fgpass.php`)
- Account Settings → MySQL Database: updates account (evidence: `php/account.php`)
- Account Settings → Security Services: uses security checks (evidence: `php/account.php`)
- Member or Admin → Private Hub: browses archive (evidence: `README.md`)
- Private Hub → Photo Gallery: opens photos (evidence: `php/choose.php`)
- Private Hub → Video Gallery: opens videos (evidence: `php/choose.php`)
- Photo Gallery → Gallery Statistics: gets counts (evidence: `php/gallery.php`)
- Video Gallery → Gallery Statistics: gets counts (evidence: `php/vidgallery.php`)
- Photo Gallery → Protected Media Gateway: loads protected media (evidence: `README.md`)
- Video Gallery → Protected Media Gateway: streams video (evidence: `README.md`)
- Protected Media Gateway → Security Services: checks access (evidence: `php/media.php`)
- Protected Media Gateway → Media Files and Thumbnails: reads files (evidence: `README.md`)
- Video Gallery → Video Poster Upload: uploads browser poster (evidence: `README.md`)
- Video Poster Upload → Media Files and Thumbnails: writes poster (evidence: `php/video_thumb.php`)
- Member or Admin → Admin Panel: administers archive (evidence: `README.md`)
- Admin Panel → MySQL Database: manages users and media (evidence: `php/admin.php`)
- Admin Panel → Security Services: requires admin role (evidence: `php/admin.php`)
- Admin Panel → Gallery Statistics: gets counts (evidence: `php/admin.php`)
- MySQL Database → MySQL: connects to (evidence: `php/connect.php`)
