# raneesh02/pw_starter architecture

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

- Interactive diagram: https://gitdiagram.com/raneesh02/pw_starter
- Repository: https://github.com/raneesh02/pw_starter

## Overview

This is a Playwright/TypeScript workshop starter for browser-testing the Practice Software Testing demo shop. Its documented workflow is to run the test suite against that shop; the sampled facade implements product search, cart additions, and guest checkout, while page objects encapsulate shop interactions. The tree also shows account, cart, checkout, and product test areas, but their specs were not sampled, so their detailed calls cannot be verified. The graph separates documented test execution from source-supported facade behavior.

Main entry points: [`common_actions/shop.facade.ts`](https://github.com/raneesh02/pw_starter/blob/main/common_actions/shop.facade.ts) (Shop facade), [`tests`](https://github.com/raneesh02/pw_starter/tree/main/tests) (Test scenarios), [`utils/helpers.ts`](https://github.com/raneesh02/pw_starter/blob/main/utils/helpers.ts) (UI helpers), [`pages/home.page.ts`](https://github.com/raneesh02/pw_starter/blob/main/pages/home.page.ts) (Catalog search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_test_suite["Test suite"]
  node_tests["Test scenarios"]
  node_account_tests["Account scenarios"]
  node_cart_tests["Cart scenarios"]
  node_checkout_tests["Checkout scenarios"]
  node_product_tests["Product scenarios"]
end

subgraph group_shop_workflows["Shop workflows"]
  node_facade["Shop facade<br/>[shop.facade.ts]"]
  node_home["Catalog search<br/>[home.page.ts]"]
  node_product["Product detail<br/>[product.page.ts]"]
  node_cart["Cart page<br/>[cart.page.ts]"]
  node_checkout["Guest checkout<br/>[checkout.page.ts]"]
  node_login["Login page<br/>[login.page.ts]"]
  node_account["Account page<br/>[account.page.ts]"]
end

subgraph group_support["Test support"]
  node_helpers["UI helpers<br/>[helpers.ts]"]
  node_user_data["User data<br/>[users.ts]"]
  node_product_data["Product cases<br/>[products.ts]"]
end

node_runner(("Playwright runner"))
node_shop["Demo shop"]

node_runner -->|"runs"| node_tests
node_tests -->|"tests against"| node_shop
node_facade -->|"calls"| node_home
node_facade -->|"calls"| node_product
node_facade -->|"calls"| node_checkout
node_facade -->|"navigates"| node_shop
node_helpers -->|"reads"| node_user_data

click node_tests "https://github.com/raneesh02/pw_starter/tree/main/tests"
click node_account_tests "https://github.com/raneesh02/pw_starter/tree/main/tests/account"
click node_cart_tests "https://github.com/raneesh02/pw_starter/tree/main/tests/cart"
click node_checkout_tests "https://github.com/raneesh02/pw_starter/tree/main/tests/checkout"
click node_product_tests "https://github.com/raneesh02/pw_starter/tree/main/tests/product"
click node_facade "https://github.com/raneesh02/pw_starter/blob/main/common_actions/shop.facade.ts"
click node_home "https://github.com/raneesh02/pw_starter/blob/main/pages/home.page.ts"
click node_product "https://github.com/raneesh02/pw_starter/blob/main/pages/product.page.ts"
click node_cart "https://github.com/raneesh02/pw_starter/blob/main/pages/cart.page.ts"
click node_checkout "https://github.com/raneesh02/pw_starter/blob/main/pages/checkout.page.ts"
click node_login "https://github.com/raneesh02/pw_starter/blob/main/pages/login.page.ts"
click node_account "https://github.com/raneesh02/pw_starter/blob/main/pages/account.page.ts"
click node_helpers "https://github.com/raneesh02/pw_starter/blob/main/utils/helpers.ts"
click node_user_data "https://github.com/raneesh02/pw_starter/blob/main/data/users.ts"
click node_product_data "https://github.com/raneesh02/pw_starter/blob/main/data/products.ts"

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_tests,node_account_tests,node_cart_tests,node_checkout_tests,node_product_tests toneBlue
class node_facade,node_home,node_product,node_cart,node_checkout,node_login,node_account toneAmber
class node_helpers,node_user_data,node_product_data toneMint
class node_runner,node_shop toneIndigo
```

## Components

### Test suite

- [Test scenarios](https://github.com/raneesh02/pw_starter/tree/main/tests): `tests`
- [Account scenarios](https://github.com/raneesh02/pw_starter/tree/main/tests/account): `tests/account`
- [Cart scenarios](https://github.com/raneesh02/pw_starter/tree/main/tests/cart): `tests/cart`
- [Checkout scenarios](https://github.com/raneesh02/pw_starter/tree/main/tests/checkout): `tests/checkout`
- [Product scenarios](https://github.com/raneesh02/pw_starter/tree/main/tests/product): `tests/product`

### Shop workflows

- [Shop facade](https://github.com/raneesh02/pw_starter/blob/main/common_actions/shop.facade.ts): `common_actions/shop.facade.ts`
- [Catalog search](https://github.com/raneesh02/pw_starter/blob/main/pages/home.page.ts): `pages/home.page.ts`
- [Product detail](https://github.com/raneesh02/pw_starter/blob/main/pages/product.page.ts): `pages/product.page.ts`
- [Cart page](https://github.com/raneesh02/pw_starter/blob/main/pages/cart.page.ts): `pages/cart.page.ts`
- [Guest checkout](https://github.com/raneesh02/pw_starter/blob/main/pages/checkout.page.ts): `pages/checkout.page.ts`
- [Login page](https://github.com/raneesh02/pw_starter/blob/main/pages/login.page.ts): `pages/login.page.ts`
- [Account page](https://github.com/raneesh02/pw_starter/blob/main/pages/account.page.ts): `pages/account.page.ts`

### Test support

- [UI helpers](https://github.com/raneesh02/pw_starter/blob/main/utils/helpers.ts): `utils/helpers.ts`
- [User data](https://github.com/raneesh02/pw_starter/blob/main/data/users.ts): `data/users.ts`
- [Product cases](https://github.com/raneesh02/pw_starter/blob/main/data/products.ts): `data/products.ts`

### Other components

- **Playwright runner**
- **Demo shop**

## Connections

- Playwright runner → Test scenarios: runs (evidence: `README.md`)
- Test scenarios → Demo shop: tests against (evidence: `README.md`)
- Shop facade → Catalog search: calls (evidence: `common_actions/shop.facade.ts`)
- Shop facade → Product detail: calls (evidence: `common_actions/shop.facade.ts`)
- Shop facade → Guest checkout: calls (evidence: `common_actions/shop.facade.ts`)
- Shop facade → Demo shop: navigates (evidence: `common_actions/shop.facade.ts`)
- UI helpers → User data: reads (evidence: `utils/helpers.ts`)
