# print1username/cos30020-assignment-1 architecture

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

- Interactive diagram: https://gitdiagram.com/print1username/cos30020-assignment-1
- Repository: https://github.com/print1username/cos30020-assignment-1

## Overview

Boardgame Hub is a PHP website for discovering board games and activities, registering for sessions, and managing an account. The visible journey starts at the home page, branches into catalogue browsing or activity discovery, and lets signed-in users submit activity registrations and edit their profile. The map also preserves community pages and authentication, though their implementations were not sampled. Edges are limited to links and file access visible in excerpts or the source index; community and authentication internals remain uncertain.

Main entry points: [`components/navbar.js`](https://github.com/print1username/cos30020-assignment-1/blob/main/components/navbar.js) (Navigation UI), [`index.php`](https://github.com/print1username/cos30020-assignment-1/blob/main/index.php) (Home), [`activities.php`](https://github.com/print1username/cos30020-assignment-1/blob/main/activities.php) (Activity listings), [`update_profile.php`](https://github.com/print1username/cos30020-assignment-1/blob/main/update_profile.php) (Profile update)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery"]
  node_home["Home<br/>[index.php]"]
  node_menu["Main menu<br/>[main_menu.php]"]
  node_catalog["Game catalogue<br/>[catalog.php]"]
  node_catalog_ui["Catalogue filters<br/>[catalog.js]"]
  node_community["Community pages<br/>[community.php]"]
  node_community_detail["Community detail"]
  node_catalog_data[("Catalogue data<br/>[catalog.json]")]
end

subgraph group_activities["Activities"]
  node_activities_page["Activity listings<br/>[activities.php]"]
  node_pagination["Pagination<br/>[pagination.js]"]
  node_activity_registration["Activity registration<br/>[activity_reg.php]"]
  node_activity_form["Registration UI<br/>[activitiy_reg.js]"]
  node_activity_data[("Activity data<br/>[activities.json]")]
end

subgraph group_accounts["Accounts"]
  node_login["Login<br/>[login.php]"]
  node_registration["Sign up<br/>[registration.php]"]
  node_registration_handler["Registration handler"]
  node_profile["Profile<br/>[profile.php]"]
  node_profile_update["Profile update<br/>[update_profile.php]"]
  node_profile_crop["Image cropper<br/>[profile_crop.js]"]
  node_user_data[("User records<br/>[user.txt]")]
  node_profile_images[("Profile images")]
end

subgraph group_shared["Shared UI"]
  node_navbar_php["Session navbar<br/>[navbar.php]"]
  node_navbar_js["Navigation UI<br/>[navbar.js]"]
  node_about["About page<br/>[about.php]"]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens"| node_home
node_home -->|"links to"| node_menu
node_home -->|"links to"| node_catalog
node_home -->|"links to"| node_community
node_catalog -->|"reads"| node_catalog_data
node_activities_page -->|"reads"| node_activity_data
node_activities_page -->|"calls"| node_pagination
node_activities_page -->|"links to"| node_activity_registration
node_activity_registration -.->|"reads or writes"| node_user_data
node_login -.->|"offers signup"| node_registration
node_registration -.->|"submits to"| node_registration_handler
node_profile -->|"reads"| node_user_data
node_profile_update -->|"updates"| node_user_data
node_profile_update -->|"stores image"| node_profile_images
node_profile_update -.->|"renders crop UI"| node_profile_crop
node_navbar_php -->|"loads"| node_navbar_js
node_navbar_js -->|"links to"| node_login
node_navbar_js -->|"links to"| node_registration
node_navbar_js -->|"links to"| node_profile
node_navbar_js -->|"links to"| node_activities_page
node_navbar_js -->|"links to"| node_community
node_navbar_js -->|"links to"| node_about

click node_home "https://github.com/print1username/cos30020-assignment-1/blob/main/index.php"
click node_menu "https://github.com/print1username/cos30020-assignment-1/blob/main/main_menu.php"
click node_catalog "https://github.com/print1username/cos30020-assignment-1/blob/main/catalog.php"
click node_catalog_ui "https://github.com/print1username/cos30020-assignment-1/blob/main/components/catalog.js"
click node_community "https://github.com/print1username/cos30020-assignment-1/blob/main/community.php"
click node_community_detail "https://github.com/print1username/cos30020-assignment-1/blob/main/community_detail.php"
click node_activities_page "https://github.com/print1username/cos30020-assignment-1/blob/main/activities.php"
click node_pagination "https://github.com/print1username/cos30020-assignment-1/blob/main/components/pagination.js"
click node_activity_registration "https://github.com/print1username/cos30020-assignment-1/blob/main/activity_reg.php"
click node_activity_form "https://github.com/print1username/cos30020-assignment-1/blob/main/components/activitiy_reg.js"
click node_login "https://github.com/print1username/cos30020-assignment-1/blob/main/login.php"
click node_registration "https://github.com/print1username/cos30020-assignment-1/blob/main/registration.php"
click node_registration_handler "https://github.com/print1username/cos30020-assignment-1/blob/main/process_registration.php"
click node_profile "https://github.com/print1username/cos30020-assignment-1/blob/main/profile.php"
click node_profile_update "https://github.com/print1username/cos30020-assignment-1/blob/main/update_profile.php"
click node_profile_crop "https://github.com/print1username/cos30020-assignment-1/blob/main/components/profile_crop.js"
click node_user_data "https://github.com/print1username/cos30020-assignment-1/blob/main/data/User/user.txt"
click node_activity_data "https://github.com/print1username/cos30020-assignment-1/blob/main/data/activities.json"
click node_catalog_data "https://github.com/print1username/cos30020-assignment-1/blob/main/data/catalog.json"
click node_profile_images "https://github.com/print1username/cos30020-assignment-1/tree/main/profile_images"
click node_navbar_php "https://github.com/print1username/cos30020-assignment-1/blob/main/navbar.php"
click node_navbar_js "https://github.com/print1username/cos30020-assignment-1/blob/main/components/navbar.js"
click node_about "https://github.com/print1username/cos30020-assignment-1/blob/main/about.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_home,node_menu,node_catalog,node_catalog_ui,node_community,node_community_detail,node_catalog_data toneBlue
class node_activities_page,node_pagination,node_activity_registration,node_activity_form,node_activity_data toneAmber
class node_login,node_registration,node_registration_handler,node_profile,node_profile_update,node_profile_crop,node_user_data,node_profile_images toneMint
class node_navbar_php,node_navbar_js,node_about toneRose
class node_visitor toneIndigo
```

## Components

### Discovery

- [Home](https://github.com/print1username/cos30020-assignment-1/blob/main/index.php): `index.php`
- [Main menu](https://github.com/print1username/cos30020-assignment-1/blob/main/main_menu.php): `main_menu.php`
- [Game catalogue](https://github.com/print1username/cos30020-assignment-1/blob/main/catalog.php): `catalog.php`
- [Catalogue filters](https://github.com/print1username/cos30020-assignment-1/blob/main/components/catalog.js): `components/catalog.js`
- [Community pages](https://github.com/print1username/cos30020-assignment-1/blob/main/community.php): `community.php`
- [Community detail](https://github.com/print1username/cos30020-assignment-1/blob/main/community_detail.php): `community_detail.php`
- [Catalogue data](https://github.com/print1username/cos30020-assignment-1/blob/main/data/catalog.json): `data/catalog.json`

### Activities

- [Activity listings](https://github.com/print1username/cos30020-assignment-1/blob/main/activities.php): `activities.php`
- [Pagination](https://github.com/print1username/cos30020-assignment-1/blob/main/components/pagination.js): `components/pagination.js`
- [Activity registration](https://github.com/print1username/cos30020-assignment-1/blob/main/activity_reg.php): `activity_reg.php`
- [Registration UI](https://github.com/print1username/cos30020-assignment-1/blob/main/components/activitiy_reg.js): `components/activitiy_reg.js`
- [Activity data](https://github.com/print1username/cos30020-assignment-1/blob/main/data/activities.json): `data/activities.json`

### Accounts

- [Login](https://github.com/print1username/cos30020-assignment-1/blob/main/login.php): `login.php`
- [Sign up](https://github.com/print1username/cos30020-assignment-1/blob/main/registration.php): `registration.php`
- [Registration handler](https://github.com/print1username/cos30020-assignment-1/blob/main/process_registration.php): `process_registration.php`
- [Profile](https://github.com/print1username/cos30020-assignment-1/blob/main/profile.php): `profile.php`
- [Profile update](https://github.com/print1username/cos30020-assignment-1/blob/main/update_profile.php): `update_profile.php`
- [Image cropper](https://github.com/print1username/cos30020-assignment-1/blob/main/components/profile_crop.js): `components/profile_crop.js`
- [User records](https://github.com/print1username/cos30020-assignment-1/blob/main/data/User/user.txt): `data/User/user.txt`
- [Profile images](https://github.com/print1username/cos30020-assignment-1/tree/main/profile_images): `profile_images`

### Shared UI

- [Session navbar](https://github.com/print1username/cos30020-assignment-1/blob/main/navbar.php): `navbar.php`
- [Navigation UI](https://github.com/print1username/cos30020-assignment-1/blob/main/components/navbar.js): `components/navbar.js`
- [About page](https://github.com/print1username/cos30020-assignment-1/blob/main/about.php): `about.php`

### Other components

- **Visitor**

## Connections

- Visitor → Home: opens
- Home → Main menu: links to (evidence: `index.php`)
- Home → Game catalogue: links to (evidence: `index.php`)
- Home → Community pages: links to (evidence: `index.php`)
- Game catalogue → Catalogue data: reads (evidence: `catalog.php`)
- Activity listings → Activity data: reads (evidence: `activities.php`)
- Activity listings → Pagination: calls (evidence: `activities.php`)
- Activity listings → Activity registration: links to (evidence: `activities.php`)
- Activity registration → User records: reads or writes
- Login → Sign up: offers signup
- Sign up → Registration handler: submits to
- Profile → User records: reads (evidence: `profile.php`)
- Profile update → User records: updates (evidence: `update_profile.php`)
- Profile update → Profile images: stores image (evidence: `update_profile.php`)
- Profile update → Image cropper: renders crop UI
- Session navbar → Navigation UI: loads (evidence: `navbar.php`)
- Navigation UI → Login: links to (evidence: `components/navbar.js`)
- Navigation UI → Sign up: links to (evidence: `components/navbar.js`)
- Navigation UI → Profile: links to (evidence: `components/navbar.js`)
- Navigation UI → Activity listings: links to (evidence: `components/navbar.js`)
- Navigation UI → Community pages: links to (evidence: `components/navbar.js`)
- Navigation UI → About page: links to (evidence: `components/navbar.js`)
