# bhaveshnama/playwright-apiautomation architecture

> Architecture diagram of the GitHub repository bhaveshnama/playwright-apiautomation, 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/bhaveshnama/playwright-apiautomation
- Repository: https://github.com/bhaveshnama/playwright-apiautomation

## Overview

This repository is a Playwright-based automation suite, not an application server: its user-facing workflow is running tests against the configured ReqRes API and exercising documented API, accessibility, mocking, and visual-testing capabilities. The config excerpt establishes the test directory and API base URL; individual test implementations were not sampled, so feature-level calls and integrations are not inferred.

Main entry points: [`playwright.config.js`](https://github.com/bhaveshnama/playwright-apiautomation/blob/main/playwright.config.js) (Runner config), [`tests`](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests) (Test suite)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Test runtime"]
  node_runner(("Playwright runner"))
  node_config["Runner config"]
  node_suite["Test suite"]
end

subgraph group_api["API scenarios"]
  node_get["GET requests"]
  node_post["POST requests"]
  node_put["PUT requests"]
  node_delete["DELETE requests"]
  node_auth["Authentication"]
  node_mock["API mocking"]
end

subgraph group_quality["Quality scenarios"]
  node_accessibility["Accessibility checks"]
  node_visual["Visual checks"]
end

node_reqres["ReqRes API"]

node_runner -->|"loads config"| node_config
node_config -->|"selects tests"| node_suite
node_config -->|"sets base URL"| node_reqres

click node_config "https://github.com/bhaveshnama/playwright-apiautomation/blob/main/playwright.config.js"
click node_suite "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests"
click node_get "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/GET"
click node_post "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/POST"
click node_put "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/PUT"
click node_delete "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/DELETE"
click node_auth "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/AUTH"
click node_mock "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/MOCK"
click node_accessibility "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/ACCESSIBILITY"
click node_visual "https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/VISUAL"

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_runner,node_config,node_suite toneBlue
class node_get,node_post,node_put,node_delete,node_auth,node_mock toneAmber
class node_accessibility,node_visual,node_reqres toneMint
```

## Components

### Test runtime

- **Playwright runner**
- [Runner config](https://github.com/bhaveshnama/playwright-apiautomation/blob/main/playwright.config.js): `playwright.config.js`
- [Test suite](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests): `tests`

### API scenarios

- [GET requests](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/GET): `tests/GET`
- [POST requests](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/POST): `tests/POST`
- [PUT requests](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/PUT): `tests/PUT`
- [DELETE requests](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/DELETE): `tests/DELETE`
- [Authentication](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/AUTH): `tests/AUTH`
- [API mocking](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/MOCK): `tests/MOCK`

### Quality scenarios

- [Accessibility checks](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/ACCESSIBILITY): `tests/ACCESSIBILITY`
- [Visual checks](https://github.com/bhaveshnama/playwright-apiautomation/tree/main/tests/VISUAL): `tests/VISUAL`

### Other components

- **ReqRes API**

## Connections

- Playwright runner → Runner config: loads config (evidence: `playwright.config.js`)
- Runner config → Test suite: selects tests (evidence: `playwright.config.js`)
- Runner config → ReqRes API: sets base URL (evidence: `playwright.config.js`)
