# haloapping/saucedemo architecture

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

- Interactive diagram: https://gitdiagram.com/haloapping/saucedemo
- Repository: https://github.com/haloapping/saucedemo

## Overview

This is a small Playwright page-object layer for automating the SauceDemo shopping site. Its domain stages are login, inventory/cart, and checkout information, overview, and completion; the page modules expose helpers for those stages but do not show an orchestrating caller. Edges capture selector usage and direct site interactions. Test files are excluded, so the exact scenario wiring is not represented.

Main entry points: [`page/auth_page.py`](https://github.com/haloapping/saucedemo/blob/main/page/auth_page.py) (Authentication), [`page/inventory_page.py`](https://github.com/haloapping/saucedemo/blob/main/page/inventory_page.py) (Inventory), [`page/cart_page.py`](https://github.com/haloapping/saucedemo/blob/main/page/cart_page.py) (Cart), [`page/checkout_page.py`](https://github.com/haloapping/saucedemo/blob/main/page/checkout_page.py) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Page actions"]
  node_auth["Authentication<br/>[auth_page.py]"]
  node_inventory["Inventory<br/>[inventory_page.py]"]
  node_cart["Cart<br/>[cart_page.py]"]
  node_checkout["Checkout<br/>[checkout_page.py]"]
end

subgraph group_selectors["Selectors"]
  node_auth_selectors["Auth selectors"]
  node_inventory_selectors["Inventory selectors"]
  node_cart_selectors["Cart selectors"]
  node_checkout_selectors["Checkout selectors"]
end

node_caller(("Automation caller"))
node_site(("SauceDemo site"))

node_auth -->|"uses selectors"| node_auth_selectors
node_inventory -->|"uses selectors"| node_inventory_selectors
node_cart -->|"uses selectors"| node_cart_selectors
node_checkout -->|"uses selectors"| node_checkout_selectors
node_auth -->|"navigates and acts"| node_site
node_inventory -->|"acts on"| node_site
node_cart -->|"acts on"| node_site
node_checkout -->|"acts on"| node_site

click node_auth "https://github.com/haloapping/saucedemo/blob/main/page/auth_page.py"
click node_inventory "https://github.com/haloapping/saucedemo/blob/main/page/inventory_page.py"
click node_cart "https://github.com/haloapping/saucedemo/blob/main/page/cart_page.py"
click node_checkout "https://github.com/haloapping/saucedemo/blob/main/page/checkout_page.py"
click node_auth_selectors "https://github.com/haloapping/saucedemo/blob/main/selector/auth_page_selector.py"
click node_inventory_selectors "https://github.com/haloapping/saucedemo/blob/main/selector/inventory_page_selector.py"
click node_cart_selectors "https://github.com/haloapping/saucedemo/blob/main/selector/cart_page_selector.py"
click node_checkout_selectors "https://github.com/haloapping/saucedemo/blob/main/selector/checkout_page_selector.py"

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_auth,node_inventory,node_cart,node_checkout toneBlue
class node_auth_selectors,node_inventory_selectors,node_cart_selectors,node_checkout_selectors toneAmber
class node_caller,node_site toneIndigo
```

## Components

### Page actions

- [Authentication](https://github.com/haloapping/saucedemo/blob/main/page/auth_page.py): `page/auth_page.py`
- [Inventory](https://github.com/haloapping/saucedemo/blob/main/page/inventory_page.py): `page/inventory_page.py`
- [Cart](https://github.com/haloapping/saucedemo/blob/main/page/cart_page.py): `page/cart_page.py`
- [Checkout](https://github.com/haloapping/saucedemo/blob/main/page/checkout_page.py): `page/checkout_page.py`

### Selectors

- [Auth selectors](https://github.com/haloapping/saucedemo/blob/main/selector/auth_page_selector.py): `selector/auth_page_selector.py`
- [Inventory selectors](https://github.com/haloapping/saucedemo/blob/main/selector/inventory_page_selector.py): `selector/inventory_page_selector.py`
- [Cart selectors](https://github.com/haloapping/saucedemo/blob/main/selector/cart_page_selector.py): `selector/cart_page_selector.py`
- [Checkout selectors](https://github.com/haloapping/saucedemo/blob/main/selector/checkout_page_selector.py): `selector/checkout_page_selector.py`

### Other components

- **Automation caller**
- **SauceDemo site**

## Connections

- Authentication → Auth selectors: uses selectors
- Inventory → Inventory selectors: uses selectors
- Cart → Cart selectors: uses selectors
- Checkout → Checkout selectors: uses selectors
- Authentication → SauceDemo site: navigates and acts
- Inventory → SauceDemo site: acts on
- Cart → SauceDemo site: acts on
- Checkout → SauceDemo site: acts on
