# ricccc2023/goodbrew_shop architecture

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

- Interactive diagram: https://gitdiagram.com/ricccc2023/goodbrew_shop
- Repository: https://github.com/ricccc2023/goodbrew_shop

## Overview

Good Brew is a coffee-shop operations application. Staff use the POS to record transactions, while order-management screens track active orders; surrounding modules manage the menu, stock, promotions, employees, shifts, attendance, and reporting. Shared PHP configuration provides sessions, role checks, and PDO access to MySQL, and shared templates render the staff interface. The tree and sampled excerpts establish these capabilities, but do not expose enough of the transaction handler to verify its downstream dispatch to the kitchen or receipt flow; those links are therefore omitted.

Main entry points: [`includes/config.php`](https://github.com/ricccc2023/goodbrew_shop/blob/main/includes/config.php) (App Core), [`pos/index.php`](https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/index.php) (Point of Sale), [`pos/process.php`](https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/process.php) (Sale Processing), [`attendance/index.php`](https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/index.php) (Attendance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Staff Workspace"]
  node_config["App Core<br/>[config.php]"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_templates["Staff Templates<br/>[header.php]"]
  node_landing["Public Landing<br/>[landing.php]"]
end

subgraph group_commerce["Sales and Orders"]
  node_pos["Point of Sale<br/>[index.php]"]
  node_saleprocess["Sale Processing<br/>[process.php]"]
  node_sales["Sales History<br/>[index.php]"]
  node_refund["Refunds<br/>[refund.php]"]
  node_orders["Order Queue<br/>[index.php]"]
  node_kitchen["Kitchen View<br/>[kitchen.php]"]
end

subgraph group_catalog["Menu and Stock"]
  node_menu["Menu Editor<br/>[edit.php]"]
  node_categories["Categories<br/>[index.php]"]
  node_inventory["Inventory<br/>[index.php]"]
end

subgraph group_people["People Operations"]
  node_employees["Employee Records<br/>[index.php]"]
  node_schedules["Shift Scheduling<br/>[index.php]"]
  node_attendance["Attendance<br/>[index.php]"]
  node_portal["Employee Portal<br/>[index.php]"]
  node_hr["HR Records<br/>[hr_view.php]"]
end

subgraph group_insight["Reporting and Admin"]
  node_reports["Reports<br/>[index.php]"]
  node_analytics["Sales Analytics<br/>[analytics.php]"]
  node_promotions["Promotions<br/>[index.php]"]
  node_feedback["Feedback Review<br/>[index.php]"]
  node_settings["Settings and Users<br/>[users.php]"]
end

node_staff(("Staff"))
node_database[("MySQL Store")]

node_staff -->|"opens workspace"| node_dashboard
node_pos -->|"loads core"| node_config
node_pos -->|"renders through"| node_templates
node_pos -.->|"submits sale"| node_saleprocess
node_saleprocess -->|"loads core"| node_config
node_saleprocess -.->|"writes transaction"| node_database
node_sales -->|"queries sales"| node_database
node_refund -->|"loads core"| node_config
node_orders -->|"reads active orders"| node_database
node_orders -->|"renders through"| node_templates
node_kitchen -->|"loads core"| node_config
node_menu -->|"loads core"| node_config
node_menu -.->|"reads menu data"| node_database
node_inventory -.->|"manages stock"| node_database
node_employees -->|"queries employees"| node_database
node_schedules -->|"reads and writes shifts"| node_database
node_attendance -->|"loads core"| node_config
node_attendance -.->|"loads attendance"| node_database
node_portal -->|"loads core"| node_config
node_hr -->|"uses records"| node_attendance
node_reports -->|"queries metrics"| node_database
node_analytics -.->|"loads core"| node_config
node_promotions -->|"loads core"| node_config
node_feedback -->|"reads reviews"| node_database
node_landing -->|"loads core"| node_config
node_settings -->|"loads core"| node_config
node_dashboard -->|"loads core"| node_config

click node_config "https://github.com/ricccc2023/goodbrew_shop/blob/main/includes/config.php"
click node_dashboard "https://github.com/ricccc2023/goodbrew_shop/blob/main/dashboard.php"
click node_templates "https://github.com/ricccc2023/goodbrew_shop/blob/main/includes/header.php"
click node_landing "https://github.com/ricccc2023/goodbrew_shop/blob/main/landing.php"
click node_pos "https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/index.php"
click node_saleprocess "https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/process.php"
click node_sales "https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/index.php"
click node_refund "https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/refund.php"
click node_orders "https://github.com/ricccc2023/goodbrew_shop/blob/main/orders/index.php"
click node_kitchen "https://github.com/ricccc2023/goodbrew_shop/blob/main/orders/kitchen.php"
click node_menu "https://github.com/ricccc2023/goodbrew_shop/blob/main/menu/edit.php"
click node_categories "https://github.com/ricccc2023/goodbrew_shop/blob/main/categories/index.php"
click node_inventory "https://github.com/ricccc2023/goodbrew_shop/blob/main/inventory/index.php"
click node_employees "https://github.com/ricccc2023/goodbrew_shop/blob/main/employees/index.php"
click node_schedules "https://github.com/ricccc2023/goodbrew_shop/blob/main/schedules/index.php"
click node_attendance "https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/index.php"
click node_portal "https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/portal/index.php"
click node_hr "https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/hr_view.php"
click node_reports "https://github.com/ricccc2023/goodbrew_shop/blob/main/reports/index.php"
click node_analytics "https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/analytics.php"
click node_promotions "https://github.com/ricccc2023/goodbrew_shop/blob/main/promotions/index.php"
click node_feedback "https://github.com/ricccc2023/goodbrew_shop/blob/main/feedback/index.php"
click node_settings "https://github.com/ricccc2023/goodbrew_shop/blob/main/settings/users.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_config,node_dashboard,node_templates,node_landing toneBlue
class node_pos,node_saleprocess,node_sales,node_refund,node_orders,node_kitchen,node_database toneAmber
class node_menu,node_categories,node_inventory toneMint
class node_employees,node_schedules,node_attendance,node_portal,node_hr toneRose
class node_reports,node_analytics,node_promotions,node_feedback,node_settings,node_staff toneIndigo
```

## Components

### Staff Workspace

- [App Core](https://github.com/ricccc2023/goodbrew_shop/blob/main/includes/config.php): `includes/config.php`
- [Dashboard](https://github.com/ricccc2023/goodbrew_shop/blob/main/dashboard.php): `dashboard.php`
- [Staff Templates](https://github.com/ricccc2023/goodbrew_shop/blob/main/includes/header.php): `includes/header.php`
- [Public Landing](https://github.com/ricccc2023/goodbrew_shop/blob/main/landing.php): `landing.php`

### Sales and Orders

- [Point of Sale](https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/index.php): `pos/index.php`
- [Sale Processing](https://github.com/ricccc2023/goodbrew_shop/blob/main/pos/process.php): `pos/process.php`
- [Sales History](https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/index.php): `sales/index.php`
- [Refunds](https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/refund.php): `sales/refund.php`
- [Order Queue](https://github.com/ricccc2023/goodbrew_shop/blob/main/orders/index.php): `orders/index.php`
- [Kitchen View](https://github.com/ricccc2023/goodbrew_shop/blob/main/orders/kitchen.php): `orders/kitchen.php`

### Menu and Stock

- [Menu Editor](https://github.com/ricccc2023/goodbrew_shop/blob/main/menu/edit.php): `menu/edit.php`
- [Categories](https://github.com/ricccc2023/goodbrew_shop/blob/main/categories/index.php): `categories/index.php`
- [Inventory](https://github.com/ricccc2023/goodbrew_shop/blob/main/inventory/index.php): `inventory/index.php`

### People Operations

- [Employee Records](https://github.com/ricccc2023/goodbrew_shop/blob/main/employees/index.php): `employees/index.php`
- [Shift Scheduling](https://github.com/ricccc2023/goodbrew_shop/blob/main/schedules/index.php): `schedules/index.php`
- [Attendance](https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/index.php): `attendance/index.php`
- [Employee Portal](https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/portal/index.php): `attendance/portal/index.php`
- [HR Records](https://github.com/ricccc2023/goodbrew_shop/blob/main/attendance/hr_view.php): `attendance/hr_view.php`

### Reporting and Admin

- [Reports](https://github.com/ricccc2023/goodbrew_shop/blob/main/reports/index.php): `reports/index.php`
- [Sales Analytics](https://github.com/ricccc2023/goodbrew_shop/blob/main/sales/analytics.php): `sales/analytics.php`
- [Promotions](https://github.com/ricccc2023/goodbrew_shop/blob/main/promotions/index.php): `promotions/index.php`
- [Feedback Review](https://github.com/ricccc2023/goodbrew_shop/blob/main/feedback/index.php): `feedback/index.php`
- [Settings and Users](https://github.com/ricccc2023/goodbrew_shop/blob/main/settings/users.php): `settings/users.php`

### Other components

- **Staff**
- **MySQL Store**

## Connections

- Staff → Dashboard: opens workspace
- Point of Sale → App Core: loads core (evidence: `pos/index.php`)
- Point of Sale → Staff Templates: renders through (evidence: `pos/index.php`)
- Point of Sale → Sale Processing: submits sale
- Sale Processing → App Core: loads core (evidence: `pos/process.php`)
- Sale Processing → MySQL Store: writes transaction
- Sales History → MySQL Store: queries sales (evidence: `sales/index.php`)
- Refunds → App Core: loads core (evidence: `sales/refund.php`)
- Order Queue → MySQL Store: reads active orders (evidence: `orders/index.php`)
- Order Queue → Staff Templates: renders through (evidence: `orders/index.php`)
- Kitchen View → App Core: loads core (evidence: `orders/kitchen.php`)
- Menu Editor → App Core: loads core (evidence: `menu/edit.php`)
- Menu Editor → MySQL Store: reads menu data
- Inventory → MySQL Store: manages stock
- Employee Records → MySQL Store: queries employees (evidence: `employees/index.php`)
- Shift Scheduling → MySQL Store: reads and writes shifts (evidence: `schedules/index.php`)
- Attendance → App Core: loads core (evidence: `attendance/index.php`)
- Attendance → MySQL Store: loads attendance
- Employee Portal → App Core: loads core (evidence: `attendance/portal/index.php`)
- HR Records → Attendance: uses records (evidence: `attendance/hr_view.php`)
- Reports → MySQL Store: queries metrics (evidence: `reports/index.php`)
- Sales Analytics → App Core: loads core
- Promotions → App Core: loads core (evidence: `promotions/index.php`)
- Feedback Review → MySQL Store: reads reviews (evidence: `feedback/index.php`)
- Public Landing → App Core: loads core (evidence: `landing.php`)
- Settings and Users → App Core: loads core (evidence: `settings/users.php`)
- Dashboard → App Core: loads core (evidence: `dashboard.php`)
