# sweetpea004/comp4092-93-purvis-templates architecture

> Architecture diagram of the GitHub repository sweetpea004/comp4092-93-purvis-templates, 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/sweetpea004/comp4092-93-purvis-templates
- Repository: https://github.com/sweetpea004/comp4092-93-purvis-templates

## Overview

This repository is a thesis benchmark comparing two food-ordering applications: an accessibility-refactored version and a deliberately naive baseline. In each, users browse meals, manage a cart, enter checkout details, confirm an order, and receive a result. Both frontends use shared-pattern cart and progress state, while the checkout submits to a local backend. The README also documents runtime and static accessibility scans. Edges follow shown imports, calls, or README statements; backend implementation details and scanner wiring are limited to the available evidence.

Main entry points: [`Accessible/src/App.jsx`](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/App.jsx) (App composition), [`Naive/src/App.jsx`](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/App.jsx) (App composition), [`Accessible/src/components/Checkout.jsx`](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Checkout.jsx) (Checkout), [`Naive/src/components/Checkout.jsx`](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Checkout.jsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accessible["Accessible app"]
  node_a_app["App composition<br/>[App.jsx]"]
  node_a_meals["Meal browsing<br/>[Meals.jsx]"]
  node_a_meal["Meal item<br/>[Meal.jsx]"]
  node_a_cart["Cart<br/>[Cart.jsx]"]
  node_a_cartitem["Cart item<br/>[CartItem.jsx]"]
  node_a_checkout["Checkout<br/>[Checkout.jsx]"]
  node_a_state["Cart state<br/>[CartContent.jsx]"]
  node_a_progress["Dialog progress"]
  node_a_http["HTTP requests<br/>[useHttp.js]"]
end

subgraph group_naive["Naive app"]
  node_n_app["App composition<br/>[App.jsx]"]
  node_n_meals["Meal browsing<br/>[Meals.jsx]"]
  node_n_meal["Meal item<br/>[Meal.jsx]"]
  node_n_cart["Cart<br/>[Cart.jsx]"]
  node_n_cartitem["Cart item<br/>[CartItem.jsx]"]
  node_n_checkout["Checkout<br/>[Checkout.jsx]"]
  node_n_state["Cart state<br/>[CartContent.jsx]"]
  node_n_progress["Dialog progress"]
  node_n_http["HTTP requests<br/>[useHttp.js]"]
end

subgraph group_services["Order service"]
  node_backend["Order backend<br/>[app.js]"]
end

subgraph group_evaluation["Accessibility evaluation"]
  node_scanner["Runtime scanners<br/>[axe.mjs]"]
  node_static_scan["Static scanner<br/>[eslint.config.js]"]
end

node_user(("Customer"))
node_evaluator(("Evaluator"))

node_user -->|"uses"| node_a_app
node_a_app -->|"renders"| node_a_meals
node_a_app -->|"renders"| node_a_cart
node_a_app -->|"renders"| node_a_checkout
node_a_meals -->|"renders"| node_a_meal
node_a_meals -->|"loads meals"| node_a_http
node_a_meal -->|"adds meal"| node_a_state
node_a_cart -->|"renders"| node_a_cartitem
node_a_cart -->|"reads and updates"| node_a_state
node_a_checkout -->|"reads and clears"| node_a_state
node_a_checkout -->|"reads progress"| node_a_progress
node_a_checkout -->|"submits order"| node_a_http
node_a_http -.->|"sends request"| node_backend
node_user -->|"uses"| node_n_app
node_n_app -->|"renders"| node_n_meals
node_n_app -->|"renders"| node_n_cart
node_n_app -->|"renders"| node_n_checkout
node_n_meals -->|"renders"| node_n_meal
node_n_meals -->|"loads meals"| node_n_http
node_n_meal -->|"adds meal"| node_n_state
node_n_cart -->|"renders"| node_n_cartitem
node_n_cart -->|"reads and updates"| node_n_state
node_n_checkout -->|"reads and clears"| node_n_state
node_n_checkout -->|"reads progress"| node_n_progress
node_n_checkout -->|"submits order"| node_n_http
node_n_http -.->|"sends request"| node_backend
node_evaluator -->|"runs scans"| node_scanner
node_evaluator -->|"runs lint"| node_static_scan
node_scanner -->|"scans runtime"| node_a_app
node_scanner -->|"scans runtime"| node_n_app
node_static_scan -->|"checks AST"| node_a_app
node_static_scan -->|"checks AST"| node_n_app

click node_a_app "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/App.jsx"
click node_a_meals "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Meals.jsx"
click node_a_meal "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Meal.jsx"
click node_a_cart "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Cart.jsx"
click node_a_cartitem "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/CartItem.jsx"
click node_a_checkout "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Checkout.jsx"
click node_a_state "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/store/CartContent.jsx"
click node_a_progress "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/store/UserProgressContext.jsx"
click node_a_http "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/hooks/useHttp.js"
click node_n_app "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/App.jsx"
click node_n_meals "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Meals.jsx"
click node_n_meal "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Meal.jsx"
click node_n_cart "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Cart.jsx"
click node_n_cartitem "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/CartItem.jsx"
click node_n_checkout "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Checkout.jsx"
click node_n_state "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/store/CartContent.jsx"
click node_n_progress "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/store/UserProgressContext.jsx"
click node_n_http "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/hooks/useHttp.js"
click node_backend "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/backend/app.js"
click node_scanner "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/testing/axe.mjs"
click node_static_scan "https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/testing/eslint.config.js"

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_a_app,node_a_meals,node_a_meal,node_a_cart,node_a_cartitem,node_a_checkout,node_a_state,node_a_progress,node_a_http toneBlue
class node_n_app,node_n_meals,node_n_meal,node_n_cart,node_n_cartitem,node_n_checkout,node_n_state,node_n_progress,node_n_http toneAmber
class node_backend toneMint
class node_scanner,node_static_scan toneRose
class node_user,node_evaluator toneIndigo
```

## Components

### Accessible app

- [App composition](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/App.jsx): `Accessible/src/App.jsx`
- [Meal browsing](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Meals.jsx): `Accessible/src/components/Meals.jsx`
- [Meal item](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Meal.jsx): `Accessible/src/components/Meal.jsx`
- [Cart](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Cart.jsx): `Accessible/src/components/Cart.jsx`
- [Cart item](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/CartItem.jsx): `Accessible/src/components/CartItem.jsx`
- [Checkout](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/components/Checkout.jsx): `Accessible/src/components/Checkout.jsx`
- [Cart state](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/store/CartContent.jsx): `Accessible/src/store/CartContent.jsx`
- [Dialog progress](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/store/UserProgressContext.jsx): `Accessible/src/store/UserProgressContext.jsx`
- [HTTP requests](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/src/hooks/useHttp.js): `Accessible/src/hooks/useHttp.js`

### Naive app

- [App composition](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/App.jsx): `Naive/src/App.jsx`
- [Meal browsing](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Meals.jsx): `Naive/src/components/Meals.jsx`
- [Meal item](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Meal.jsx): `Naive/src/components/Meal.jsx`
- [Cart](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Cart.jsx): `Naive/src/components/Cart.jsx`
- [Cart item](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/CartItem.jsx): `Naive/src/components/CartItem.jsx`
- [Checkout](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/components/Checkout.jsx): `Naive/src/components/Checkout.jsx`
- [Cart state](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/store/CartContent.jsx): `Naive/src/store/CartContent.jsx`
- [Dialog progress](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/store/UserProgressContext.jsx): `Naive/src/store/UserProgressContext.jsx`
- [HTTP requests](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Naive/src/hooks/useHttp.js): `Naive/src/hooks/useHttp.js`

### Order service

- [Order backend](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/Accessible/backend/app.js): `Accessible/backend/app.js`

### Accessibility evaluation

- [Runtime scanners](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/testing/axe.mjs): `testing/axe.mjs`
- [Static scanner](https://github.com/sweetpea004/comp4092-93-purvis-templates/blob/master/testing/eslint.config.js): `testing/eslint.config.js`

### Other components

- **Customer**
- **Evaluator**

## Connections

- Customer → App composition: uses (evidence: `Accessible/src/App.jsx`)
- App composition → Meal browsing: renders (evidence: `Accessible/src/App.jsx`)
- App composition → Cart: renders (evidence: `Accessible/src/App.jsx`)
- App composition → Checkout: renders (evidence: `Accessible/src/App.jsx`)
- Meal browsing → Meal item: renders (evidence: `Accessible/src/components/Meals.jsx`)
- Meal browsing → HTTP requests: loads meals (evidence: `Accessible/src/components/Meals.jsx`)
- Meal item → Cart state: adds meal (evidence: `Accessible/src/components/Meal.jsx`)
- Cart → Cart item: renders (evidence: `Accessible/src/components/Cart.jsx`)
- Cart → Cart state: reads and updates (evidence: `Accessible/src/components/Cart.jsx`)
- Checkout → Cart state: reads and clears (evidence: `Accessible/src/components/Checkout.jsx`)
- Checkout → Dialog progress: reads progress (evidence: `Accessible/src/components/Checkout.jsx`)
- Checkout → HTTP requests: submits order (evidence: `Accessible/src/components/Checkout.jsx`)
- HTTP requests → Order backend: sends request
- Customer → App composition: uses (evidence: `Naive/src/App.jsx`)
- App composition → Meal browsing: renders (evidence: `Naive/src/App.jsx`)
- App composition → Cart: renders (evidence: `Naive/src/App.jsx`)
- App composition → Checkout: renders (evidence: `Naive/src/App.jsx`)
- Meal browsing → Meal item: renders (evidence: `Naive/src/components/Meals.jsx`)
- Meal browsing → HTTP requests: loads meals (evidence: `Naive/src/components/Meals.jsx`)
- Meal item → Cart state: adds meal (evidence: `Naive/src/components/Meal.jsx`)
- Cart → Cart item: renders (evidence: `Naive/src/components/Cart.jsx`)
- Cart → Cart state: reads and updates (evidence: `Naive/src/components/Cart.jsx`)
- Checkout → Cart state: reads and clears (evidence: `Naive/src/components/Checkout.jsx`)
- Checkout → Dialog progress: reads progress (evidence: `Naive/src/components/Checkout.jsx`)
- Checkout → HTTP requests: submits order (evidence: `Naive/src/components/Checkout.jsx`)
- HTTP requests → Order backend: sends request
- Evaluator → Runtime scanners: runs scans (evidence: `README.md`)
- Evaluator → Static scanner: runs lint (evidence: `README.md`)
- Runtime scanners → App composition: scans runtime (evidence: `README.md`)
- Runtime scanners → App composition: scans runtime (evidence: `README.md`)
- Static scanner → App composition: checks AST (evidence: `README.md`)
- Static scanner → App composition: checks AST (evidence: `README.md`)
