# naveenanimation20/opencartwebapiframework architecture

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

- Interactive diagram: https://gitdiagram.com/naveenanimation20/opencartwebapiframework
- Repository: https://github.com/naveenanimation20/opencartwebapiframework

## Overview

OpenCartWebAPIFramework is a reusable Playwright/TypeScript testing framework. A consumer can use its exported fixtures and page objects to exercise OpenCart pages, call APIs through a helper, and load data through CSV, Excel, or JSON utilities. Page objects share common browser operations through BasePage; the API helper returns response status and, where applicable, JSON bodies. The README documents fixtures and helpers, while the excerpts do not show fixture internals or data-helper callers, so those relationships are left out.

Main entry points: [`src/index.ts`](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/index.ts) (Public entry point), [`src/pages/BasePage.ts`](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/BasePage.ts) (Base page), [`src/pages/HomePage.ts`](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/HomePage.ts) (Home page), [`src/pages/LoginPage.ts`](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/LoginPage.ts) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Page objects"]
  node_base["Base page<br/>[BasePage.ts]"]
  node_home["Home page<br/>[HomePage.ts]"]
  node_login["Login page<br/>[LoginPage.ts]"]
  node_search["Search results"]
  node_product["Product details<br/>[ProductInfoPage.ts]"]
end

subgraph group_api["API access"]
  node_api_helper["API helper<br/>[ApiHelper.ts]"]
end

subgraph group_data["Data helpers"]
  node_csv["CSV reader<br/>[CsvHelper.ts]"]
  node_excel["Excel reader<br/>[ExcelHelper.ts]"]
  node_json["JSON reader<br/>[JsonHelper.ts]"]
end

subgraph group_exports["Public exports"]
  node_entry["Public entry point<br/>[index.ts]"]
  node_fixtures["Playwright fixtures"]
  node_reporting["Report settings"]
end

node_consumer(("Framework consumer"))
node_browser["Playwright browser"]
node_api_service["API service"]

node_consumer -->|"imports"| node_entry
node_entry -->|"exports"| node_base
node_entry -->|"exports"| node_home
node_entry -->|"exports"| node_login
node_entry -->|"exports"| node_search
node_entry -->|"exports"| node_api_helper
node_entry -->|"exports"| node_csv
node_entry -->|"exports"| node_excel
node_entry -->|"exports"| node_json
node_entry -->|"exports"| node_fixtures
node_home -->|"extends"| node_base
node_login -->|"extends"| node_base
node_search -->|"extends"| node_base
node_product -->|"extends"| node_base
node_base -->|"uses"| node_browser
node_home -->|"searches"| node_browser
node_login -->|"logs in"| node_browser
node_search -->|"selects products"| node_browser
node_product -->|"reads details"| node_browser
node_api_helper -->|"sends requests"| node_api_service

click node_entry "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/index.ts"
click node_fixtures "https://github.com/naveenanimation20/opencartwebapiframework/tree/main/src/fixtures"
click node_base "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/BasePage.ts"
click node_home "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/HomePage.ts"
click node_login "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/LoginPage.ts"
click node_search "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/SearchResultsPage.ts"
click node_product "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/ProductInfoPage.ts"
click node_api_helper "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/api/ApiHelper.ts"
click node_csv "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/CsvHelper.ts"
click node_excel "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/ExcelHelper.ts"
click node_json "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/JsonHelper.ts"
click node_reporting "https://github.com/naveenanimation20/opencartwebapiframework/blob/main/reporting-labs.config.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_base,node_home,node_login,node_search,node_product,node_browser toneBlue
class node_api_helper toneAmber
class node_csv,node_excel,node_json,node_api_service toneMint
class node_entry,node_fixtures,node_reporting toneRose
class node_consumer toneIndigo
```

## Components

### Page objects

- [Base page](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/BasePage.ts): `src/pages/BasePage.ts`
- [Home page](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/HomePage.ts): `src/pages/HomePage.ts`
- [Login page](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/LoginPage.ts): `src/pages/LoginPage.ts`
- [Search results](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/SearchResultsPage.ts): `src/pages/SearchResultsPage.ts`
- [Product details](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/pages/ProductInfoPage.ts): `src/pages/ProductInfoPage.ts`

### API access

- [API helper](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/api/ApiHelper.ts): `src/api/ApiHelper.ts`

### Data helpers

- [CSV reader](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/CsvHelper.ts): `src/utils/CsvHelper.ts`
- [Excel reader](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/ExcelHelper.ts): `src/utils/ExcelHelper.ts`
- [JSON reader](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/utils/JsonHelper.ts): `src/utils/JsonHelper.ts`

### Public exports

- [Public entry point](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/src/index.ts): `src/index.ts`
- [Playwright fixtures](https://github.com/naveenanimation20/opencartwebapiframework/tree/main/src/fixtures): `src/fixtures`
- [Report settings](https://github.com/naveenanimation20/opencartwebapiframework/blob/main/reporting-labs.config.ts): `reporting-labs.config.ts`

### Other components

- **Framework consumer**
- **Playwright browser**
- **API service**

## Connections

- Framework consumer → Public entry point: imports (evidence: `README.md`)
- Public entry point → Base page: exports (evidence: `src/index.ts`)
- Public entry point → Home page: exports (evidence: `src/index.ts`)
- Public entry point → Login page: exports (evidence: `src/index.ts`)
- Public entry point → Search results: exports (evidence: `src/index.ts`)
- Public entry point → API helper: exports (evidence: `src/index.ts`)
- Public entry point → CSV reader: exports (evidence: `src/index.ts`)
- Public entry point → Excel reader: exports (evidence: `src/index.ts`)
- Public entry point → JSON reader: exports (evidence: `src/index.ts`)
- Public entry point → Playwright fixtures: exports (evidence: `src/index.ts`)
- Home page → Base page: extends (evidence: `src/pages/HomePage.ts`)
- Login page → Base page: extends (evidence: `src/pages/LoginPage.ts`)
- Search results → Base page: extends (evidence: `src/pages/SearchResultsPage.ts`)
- Product details → Base page: extends (evidence: `src/pages/ProductInfoPage.ts`)
- Base page → Playwright browser: uses (evidence: `src/pages/BasePage.ts`)
- Home page → Playwright browser: searches (evidence: `src/pages/HomePage.ts`)
- Login page → Playwright browser: logs in (evidence: `src/pages/LoginPage.ts`)
- Search results → Playwright browser: selects products (evidence: `src/pages/SearchResultsPage.ts`)
- Product details → Playwright browser: reads details (evidence: `src/pages/ProductInfoPage.ts`)
- API helper → API service: sends requests (evidence: `src/api/ApiHelper.ts`)
