# maqgdeveloper/videogamecenter architecture

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

- Interactive diagram: https://gitdiagram.com/maqgdeveloper/videogamecenter
- Repository: https://github.com/maqgdeveloper/videogamecenter

## Overview

VideoGame Center is a PHP/MySQL game storefront with a separate administrator dashboard. Customers browse games, submit a purchase, and the purchase handler creates a ticket; administrators navigate dashboard pages to manage catalog and operational records. The entity classes use a shared SQL connection. Source excerpts and the index show these paths, but several login and management handlers were not sampled, so their internal wiring is not inferred.

Main entry points: [`php/Entity/connection.php`](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/connection.php) (SQL connection), [`php/Entity/videogame.php`](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/videogame.php) (Game catalog), [`php/Entity/ticket.php`](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/ticket.php) (Purchase tickets), [`index.php`](https://github.com/maqgdeveloper/videogamecenter/blob/master/index.php) (Game storefront)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer storefront"]
  node_storefront["Game storefront<br/>[index.php]"]
end

subgraph group_admin["Admin management"]
  node_dashboard["Admin dashboard<br/>[dashboard.php]"]
  node_management_pages["Management pages"]
end

subgraph group_domain["Domain and sales"]
  node_catalog["Game catalog<br/>[videogame.php]"]
  node_purchase["Purchase handler<br/>[buyVideogame.php]"]
  node_tickets["Purchase tickets<br/>[ticket.php]"]
  node_user_accounts["User accounts<br/>[user.php]"]
  node_order_status["Order status<br/>[status.php]"]
  node_admin_accounts["Administrator accounts<br/>[Administrator.php]"]
  node_branches["Branch offices<br/>[branchoffice.php]"]
  node_categories["Game categories<br/>[category.php]"]
  node_consoles["Game consoles<br/>[console.php]"]
  node_providers["Game providers<br/>[provider.php]"]
  node_stock["Inventory stock<br/>[stock.php]"]
end

subgraph group_data["Persistence"]
  node_sql["SQL connection<br/>[connection.php]"]
  node_mysql[("MySQL database")]
end

node_shopper(("Customer"))
node_admin(("Administrator"))

node_shopper -->|"browses"| node_storefront
node_storefront -->|"renders games"| node_catalog
node_catalog -->|"posts purchase"| node_purchase
node_purchase -->|"creates ticket"| node_tickets
node_tickets -->|"creates status"| node_order_status
node_admin -->|"manages"| node_dashboard
node_dashboard -->|"opens pages"| node_management_pages
node_catalog -->|"queries"| node_sql
node_tickets -->|"queries"| node_sql
node_user_accounts -->|"queries"| node_sql
node_order_status -->|"queries"| node_sql
node_admin_accounts -->|"queries"| node_sql
node_branches -->|"queries"| node_sql
node_categories -->|"queries"| node_sql
node_consoles -->|"queries"| node_sql
node_providers -->|"queries"| node_sql
node_stock -->|"queries"| node_sql
node_sql -->|"connects"| node_mysql

click node_storefront "https://github.com/maqgdeveloper/videogamecenter/blob/master/index.php"
click node_catalog "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/videogame.php"
click node_purchase "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/buyVideogame.php"
click node_tickets "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/ticket.php"
click node_user_accounts "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/user.php"
click node_order_status "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/status.php"
click node_dashboard "https://github.com/maqgdeveloper/videogamecenter/blob/master/src/pages/dashboard.php"
click node_management_pages "https://github.com/maqgdeveloper/videogamecenter/tree/master/src/pages"
click node_admin_accounts "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/Administrator.php"
click node_branches "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/branchoffice.php"
click node_categories "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/category.php"
click node_consoles "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/console.php"
click node_providers "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/provider.php"
click node_stock "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/stock.php"
click node_sql "https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/connection.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_storefront toneBlue
class node_dashboard,node_management_pages toneAmber
class node_catalog,node_purchase,node_tickets,node_user_accounts,node_order_status,node_admin_accounts,node_branches,node_categories,node_consoles,node_providers,node_stock toneMint
class node_sql,node_mysql toneRose
class node_shopper,node_admin toneIndigo
```

## Components

### Customer storefront

- [Game storefront](https://github.com/maqgdeveloper/videogamecenter/blob/master/index.php): `index.php`

### Admin management

- [Admin dashboard](https://github.com/maqgdeveloper/videogamecenter/blob/master/src/pages/dashboard.php): `src/pages/dashboard.php`
- [Management pages](https://github.com/maqgdeveloper/videogamecenter/tree/master/src/pages): `src/pages`

### Domain and sales

- [Game catalog](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/videogame.php): `php/Entity/videogame.php`
- [Purchase handler](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/buyVideogame.php): `php/buyVideogame.php`
- [Purchase tickets](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/ticket.php): `php/Entity/ticket.php`
- [User accounts](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/user.php): `php/Entity/user.php`
- [Order status](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/status.php): `php/Entity/status.php`
- [Administrator accounts](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/Administrator.php): `php/Entity/Administrator.php`
- [Branch offices](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/branchoffice.php): `php/Entity/branchoffice.php`
- [Game categories](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/category.php): `php/Entity/category.php`
- [Game consoles](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/console.php): `php/Entity/console.php`
- [Game providers](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/provider.php): `php/Entity/provider.php`
- [Inventory stock](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/stock.php): `php/Entity/stock.php`

### Persistence

- [SQL connection](https://github.com/maqgdeveloper/videogamecenter/blob/master/php/Entity/connection.php): `php/Entity/connection.php`
- **MySQL database**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Game storefront: browses (evidence: `index.php`)
- Game storefront → Game catalog: renders games (evidence: `index.php`)
- Game catalog → Purchase handler: posts purchase (evidence: `php/Entity/videogame.php`)
- Purchase handler → Purchase tickets: creates ticket (evidence: `php/buyVideogame.php`)
- Purchase tickets → Order status: creates status (evidence: `php/Entity/ticket.php`)
- Administrator → Admin dashboard: manages (evidence: `src/pages/dashboard.php`)
- Admin dashboard → Management pages: opens pages (evidence: `src/pages/dashboard.php`)
- Game catalog → SQL connection: queries (evidence: `php/Entity/videogame.php`)
- Purchase tickets → SQL connection: queries (evidence: `php/Entity/ticket.php`)
- User accounts → SQL connection: queries (evidence: `php/Entity/user.php`)
- Order status → SQL connection: queries (evidence: `php/Entity/status.php`)
- Administrator accounts → SQL connection: queries (evidence: `php/Entity/Administrator.php`)
- Branch offices → SQL connection: queries (evidence: `php/Entity/branchoffice.php`)
- Game categories → SQL connection: queries (evidence: `php/Entity/category.php`)
- Game consoles → SQL connection: queries (evidence: `php/Entity/console.php`)
- Game providers → SQL connection: queries (evidence: `php/Entity/provider.php`)
- Inventory stock → SQL connection: queries (evidence: `php/Entity/stock.php`)
- SQL connection → MySQL database: connects (evidence: `php/Entity/connection.php`)
