# moodeus/gabs architecture

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

- Interactive diagram: https://gitdiagram.com/moodeus/gabs
- Repository: https://github.com/moodeus/gabs

## Overview

BakeShopOz is a role-based bakeshop operations web application. A user signs in, then accesses routed and role-gated workflows for orders, inventory, accounts, dashboards, reports, receipts, audits, and settings. Controllers coordinate models and return application responses; authentication refreshes role data from accounts on protected requests. The README provides no further capability detail. Relationships are limited to routes, calls, and view rendering supported by the excerpts or SOURCE INDEX; unsampled subsystems are represented without speculative internal links.

Main entry points: [`app/Config/Routes.php`](https://github.com/moodeus/gabs/blob/main/app/Config/Routes.php) (Routes and gates), [`app/Controllers/Dashboard.php`](https://github.com/moodeus/gabs/blob/main/app/Controllers/Dashboard.php) (Dashboard), [`app/Models/AccountModel.php`](https://github.com/moodeus/gabs/blob/main/app/Models/AccountModel.php) (Account records), [`app/Controllers/Auth.php`](https://github.com/moodeus/gabs/blob/main/app/Controllers/Auth.php) (Sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request and access"]
  node_routing["Routes and gates<br/>[Routes.php]"]
  node_auth["Sign-in<br/>[Auth.php]"]
  node_authfilter["Session authorization<br/>[AuthFilter.php]"]
  node_base["Controller base<br/>[BaseController.php]"]
  node_permissions["Permission panel"]
  node_config["Runtime configuration"]
  node_legacyauth["Legacy access helpers<br/>[auth_helpers.php]"]
end

subgraph group_operations["Shop operations"]
  node_accounts["Account management<br/>[Accounts.php]"]
  node_orders["Order handling<br/>[Orders.php]"]
  node_receipts["Delivery receipts"]
  node_inventory["Ingredient inventory"]
  node_productinventory["Product inventory"]
  node_settings["Settings<br/>[Settings.php]"]
end

subgraph group_insight["Reporting and oversight"]
  node_dashboard["Dashboard<br/>[Dashboard.php]"]
  node_sales["Sales reporting<br/>[SalesReport.php]"]
  node_audits["Inventory audits"]
  node_productaudit["Product audits<br/>[ProductAudit.php]"]
  node_accountreports["Account reports<br/>[AccountReports.php]"]
end

subgraph group_persistence["Application data"]
  node_accountmodel["Account records<br/>[AccountModel.php]"]
  node_ordermodel["Order records<br/>[OrderModel.php]"]
  node_dashboardmodel["Dashboard data<br/>[DashboardModel.php]"]
end

node_user(("Shop user"))

node_user -->|"requests pages"| node_routing
node_routing -->|"routes sign-in"| node_auth
node_routing -->|"routes dashboard"| node_dashboard
node_routing -->|"routes orders"| node_orders
node_routing -->|"routes receipts"| node_receipts
node_routing -->|"routes accounts"| node_accounts
node_routing -->|"routes inventory"| node_inventory
node_routing -->|"routes inventory"| node_productinventory
node_routing -->|"routes reports"| node_sales
node_routing -->|"routes audits"| node_audits
node_routing -->|"routes audits"| node_productaudit
node_routing -->|"routes settings"| node_settings
node_routing -->|"routes reports"| node_accountreports
node_routing -->|"registers routes"| node_permissions
node_auth -->|"checks credentials"| node_accountmodel
node_authfilter -->|"refreshes role"| node_accountmodel
node_accounts -->|"manages records"| node_accountmodel
node_settings -->|"accesses account"| node_accountmodel
node_orders -->|"handles orders"| node_ordermodel
node_dashboard -->|"loads dashboard data"| node_dashboardmodel
node_dashboard -->|"renders dashboard view"| node_dashboard

click node_routing "https://github.com/moodeus/gabs/blob/main/app/Config/Routes.php"
click node_auth "https://github.com/moodeus/gabs/blob/main/app/Controllers/Auth.php"
click node_authfilter "https://github.com/moodeus/gabs/blob/main/app/Filters/AuthFilter.php"
click node_base "https://github.com/moodeus/gabs/blob/main/app/Controllers/BaseController.php"
click node_permissions "https://github.com/moodeus/gabs/blob/main/app/Libraries/Support/Internal/Access/PermissionsPanel.php"
click node_accounts "https://github.com/moodeus/gabs/blob/main/app/Controllers/Accounts.php"
click node_orders "https://github.com/moodeus/gabs/blob/main/app/Controllers/Orders.php"
click node_receipts "https://github.com/moodeus/gabs/blob/main/app/Controllers/DeliveryReceipts.php"
click node_inventory "https://github.com/moodeus/gabs/blob/main/app/Controllers/IngredientInventory.php"
click node_productinventory "https://github.com/moodeus/gabs/blob/main/app/Controllers/ProductInventory.php"
click node_settings "https://github.com/moodeus/gabs/blob/main/app/Controllers/Settings.php"
click node_dashboard "https://github.com/moodeus/gabs/blob/main/app/Controllers/Dashboard.php"
click node_sales "https://github.com/moodeus/gabs/blob/main/app/Controllers/SalesReport.php"
click node_audits "https://github.com/moodeus/gabs/blob/main/app/Controllers/IngredientAudit.php"
click node_productaudit "https://github.com/moodeus/gabs/blob/main/app/Controllers/ProductAudit.php"
click node_accountreports "https://github.com/moodeus/gabs/blob/main/app/Controllers/AccountReports.php"
click node_accountmodel "https://github.com/moodeus/gabs/blob/main/app/Models/AccountModel.php"
click node_ordermodel "https://github.com/moodeus/gabs/blob/main/app/Models/OrderModel.php"
click node_dashboardmodel "https://github.com/moodeus/gabs/blob/main/app/Models/DashboardModel.php"
click node_config "https://github.com/moodeus/gabs/tree/main/app/Config"
click node_legacyauth "https://github.com/moodeus/gabs/blob/main/legacy/includes/auth_helpers.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_routing,node_auth,node_authfilter,node_base,node_permissions,node_config,node_legacyauth,node_user toneBlue
class node_accounts,node_orders,node_receipts,node_inventory,node_productinventory,node_settings toneAmber
class node_dashboard,node_sales,node_audits,node_productaudit,node_accountreports toneMint
class node_accountmodel,node_ordermodel,node_dashboardmodel toneRose
```

## Components

### Request and access

- [Routes and gates](https://github.com/moodeus/gabs/blob/main/app/Config/Routes.php): `app/Config/Routes.php`
- [Sign-in](https://github.com/moodeus/gabs/blob/main/app/Controllers/Auth.php): `app/Controllers/Auth.php`
- [Session authorization](https://github.com/moodeus/gabs/blob/main/app/Filters/AuthFilter.php): `app/Filters/AuthFilter.php`
- [Controller base](https://github.com/moodeus/gabs/blob/main/app/Controllers/BaseController.php): `app/Controllers/BaseController.php`
- [Permission panel](https://github.com/moodeus/gabs/blob/main/app/Libraries/Support/Internal/Access/PermissionsPanel.php): `app/Libraries/Support/Internal/Access/PermissionsPanel.php`
- [Runtime configuration](https://github.com/moodeus/gabs/tree/main/app/Config): `app/Config`
- [Legacy access helpers](https://github.com/moodeus/gabs/blob/main/legacy/includes/auth_helpers.php): `legacy/includes/auth_helpers.php`

### Shop operations

- [Account management](https://github.com/moodeus/gabs/blob/main/app/Controllers/Accounts.php): `app/Controllers/Accounts.php`
- [Order handling](https://github.com/moodeus/gabs/blob/main/app/Controllers/Orders.php): `app/Controllers/Orders.php`
- [Delivery receipts](https://github.com/moodeus/gabs/blob/main/app/Controllers/DeliveryReceipts.php): `app/Controllers/DeliveryReceipts.php`
- [Ingredient inventory](https://github.com/moodeus/gabs/blob/main/app/Controllers/IngredientInventory.php): `app/Controllers/IngredientInventory.php`
- [Product inventory](https://github.com/moodeus/gabs/blob/main/app/Controllers/ProductInventory.php): `app/Controllers/ProductInventory.php`
- [Settings](https://github.com/moodeus/gabs/blob/main/app/Controllers/Settings.php): `app/Controllers/Settings.php`

### Reporting and oversight

- [Dashboard](https://github.com/moodeus/gabs/blob/main/app/Controllers/Dashboard.php): `app/Controllers/Dashboard.php`
- [Sales reporting](https://github.com/moodeus/gabs/blob/main/app/Controllers/SalesReport.php): `app/Controllers/SalesReport.php`
- [Inventory audits](https://github.com/moodeus/gabs/blob/main/app/Controllers/IngredientAudit.php): `app/Controllers/IngredientAudit.php`
- [Product audits](https://github.com/moodeus/gabs/blob/main/app/Controllers/ProductAudit.php): `app/Controllers/ProductAudit.php`
- [Account reports](https://github.com/moodeus/gabs/blob/main/app/Controllers/AccountReports.php): `app/Controllers/AccountReports.php`

### Application data

- [Account records](https://github.com/moodeus/gabs/blob/main/app/Models/AccountModel.php): `app/Models/AccountModel.php`
- [Order records](https://github.com/moodeus/gabs/blob/main/app/Models/OrderModel.php): `app/Models/OrderModel.php`
- [Dashboard data](https://github.com/moodeus/gabs/blob/main/app/Models/DashboardModel.php): `app/Models/DashboardModel.php`

### Other components

- **Shop user**

## Connections

- Shop user → Routes and gates: requests pages (evidence: `app/Config/Routes.php`)
- Routes and gates → Sign-in: routes sign-in (evidence: `app/Config/Routes.php`)
- Routes and gates → Dashboard: routes dashboard (evidence: `app/Config/Routes.php`)
- Routes and gates → Order handling: routes orders (evidence: `app/Config/Routes.php`)
- Routes and gates → Delivery receipts: routes receipts (evidence: `app/Config/Routes.php`)
- Routes and gates → Account management: routes accounts (evidence: `app/Config/Routes.php`)
- Routes and gates → Ingredient inventory: routes inventory (evidence: `app/Config/Routes.php`)
- Routes and gates → Product inventory: routes inventory (evidence: `app/Config/Routes.php`)
- Routes and gates → Sales reporting: routes reports (evidence: `app/Config/Routes.php`)
- Routes and gates → Inventory audits: routes audits (evidence: `app/Config/Routes.php`)
- Routes and gates → Product audits: routes audits (evidence: `app/Config/Routes.php`)
- Routes and gates → Settings: routes settings (evidence: `app/Config/Routes.php`)
- Routes and gates → Account reports: routes reports (evidence: `app/Config/Routes.php`)
- Routes and gates → Permission panel: registers routes (evidence: `app/Config/Routes.php`)
- Sign-in → Account records: checks credentials (evidence: `app/Controllers/Auth.php`)
- Session authorization → Account records: refreshes role (evidence: `app/Filters/AuthFilter.php`)
- Account management → Account records: manages records (evidence: `app/Controllers/Accounts.php`)
- Settings → Account records: accesses account (evidence: `app/Controllers/Settings.php`)
- Order handling → Order records: handles orders (evidence: `app/Controllers/Orders.php`)
- Dashboard → Dashboard data: loads dashboard data (evidence: `app/Controllers/Dashboard.php`)
- Dashboard → Dashboard: renders dashboard view (evidence: `app/Controllers/Dashboard.php`)
