# niran312/ai-qa-engineer-platform architecture

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

- Interactive diagram: https://gitdiagram.com/niran312/ai-qa-engineer-platform
- Repository: https://github.com/niran312/ai-qa-engineer-platform

## Overview

This is an AI-assisted web QA platform: a user submits a site and optional credentials or module scope, the backend crawls pages and explores behavior, then generates test cases and an Excel export for review. The frontend presents scan history, progress, the discovered application map, and test cases. The backend combines a static crawler with MCP behavioral exploration and a Playwright Core fallback, using SQLite for scan state and an optional OpenRouter model. The README is empty; edges reflect shown calls or SOURCE INDEX references, and unsampled implementation details are not inferred.

Main entry points: [`backend/app/main.py`](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/main.py) (Scan API), [`frontend/src/App.jsx`](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/App.jsx) (Scan workspace), [`backend/app/crawler.py`](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/crawler.py) (Static crawler), [`backend/app/mcp_explorer.py`](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/mcp_explorer.py) (Behavior explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Scan interface"]
  node_app["Scan workspace<br/>[App.jsx]"]
  node_dashboard["Scan dashboard<br/>[Dashboard.jsx]"]
  node_history["Scan history<br/>[HistoryList.jsx]"]
  node_map["Crawler map<br/>[CrawlerMap.jsx]"]
  node_cases["Test case table<br/>[TestCaseTable.jsx]"]
  node_prompts["Prompt library<br/>[prompts.js]"]
end

subgraph group_api["Scan orchestration"]
  node_api_client["API client<br/>[api.js]"]
  node_service["Scan API<br/>[main.py]"]
  node_schemas["Scan contracts<br/>[schemas.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_store[("Scan database<br/>[database.py]")]
end

subgraph group_discovery["Site discovery"]
  node_crawler["Static crawler<br/>[crawler.py]"]
  node_explorer["Behavior explorer<br/>[mcp_explorer.py]"]
  node_mcp_client["Playwright MCP client"]
  node_core_engine["Playwright fallback"]
end

subgraph group_generation["Test generation"]
  node_generator["Case and export generator<br/>[generator.py]"]
  node_ai["OpenRouter adapter<br/>[ai_provider.py]"]
end

node_user(("QA user"))
node_site(("Target website"))
node_openrouter(("OpenRouter"))

node_user -->|"submits scan"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_history
node_app -->|"renders"| node_map
node_app -->|"renders"| node_cases
node_dashboard -->|"uses prompts"| node_prompts
node_cases -->|"requests data"| node_api_client
node_app -->|"sends requests"| node_api_client
node_api_client -->|"calls API"| node_service
node_service -->|"validates requests"| node_schemas
node_service -->|"starts crawl"| node_crawler
node_service -->|"starts exploration"| node_explorer
node_service -->|"generates cases"| node_generator
node_service -->|"reads and writes"| node_store
node_crawler -->|"records progress"| node_store
node_crawler -->|"requests selectors"| node_ai
node_explorer -->|"uses browser tools"| node_mcp_client
node_explorer -->|"dispatches fallback"| node_core_engine
node_explorer -->|"requests analysis"| node_ai
node_generator -->|"requests generation"| node_ai
node_generator -->|"records progress"| node_store
node_crawler -->|"crawls pages"| node_site
node_mcp_client -.->|"drives browser"| node_site
node_ai -->|"sends prompts"| node_openrouter
node_crawler -->|"reads settings"| node_config
node_explorer -->|"reads settings"| node_config
node_service -->|"reads settings"| node_config

click node_app "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/Dashboard.jsx"
click node_history "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/HistoryList.jsx"
click node_map "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/CrawlerMap.jsx"
click node_cases "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/TestCaseTable.jsx"
click node_prompts "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/constants/prompts.js"
click node_api_client "https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/api.js"
click node_service "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/main.py"
click node_schemas "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/schemas.py"
click node_config "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/config.py"
click node_store "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/database.py"
click node_crawler "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/crawler.py"
click node_explorer "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/mcp_explorer.py"
click node_mcp_client "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/mcp/playwright_client.py"
click node_core_engine "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/playwright_core_engine.py"
click node_generator "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/generator.py"
click node_ai "https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/ai_provider.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_app,node_dashboard,node_history,node_map,node_cases,node_prompts,node_user toneBlue
class node_api_client,node_service,node_schemas,node_config,node_store toneAmber
class node_crawler,node_explorer,node_mcp_client,node_core_engine,node_openrouter toneMint
class node_generator,node_ai toneRose
class node_site toneIndigo
```

## Components

### Scan interface

- [Scan workspace](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Scan dashboard](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Scan history](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/HistoryList.jsx): `frontend/src/components/HistoryList.jsx`
- [Crawler map](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/CrawlerMap.jsx): `frontend/src/components/CrawlerMap.jsx`
- [Test case table](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/components/TestCaseTable.jsx): `frontend/src/components/TestCaseTable.jsx`
- [Prompt library](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/constants/prompts.js): `frontend/src/constants/prompts.js`

### Scan orchestration

- [API client](https://github.com/niran312/ai-qa-engineer-platform/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Scan API](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/main.py): `backend/app/main.py`
- [Scan contracts](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/schemas.py): `backend/app/schemas.py`
- [Runtime configuration](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/config.py): `backend/app/config.py`
- [Scan database](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/database.py): `backend/app/database.py`

### Site discovery

- [Static crawler](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/crawler.py): `backend/app/crawler.py`
- [Behavior explorer](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/mcp_explorer.py): `backend/app/mcp_explorer.py`
- [Playwright MCP client](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/mcp/playwright_client.py): `backend/app/mcp/playwright_client.py`
- [Playwright fallback](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/playwright_core_engine.py): `backend/app/playwright_core_engine.py`

### Test generation

- [Case and export generator](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/generator.py): `backend/app/generator.py`
- [OpenRouter adapter](https://github.com/niran312/ai-qa-engineer-platform/blob/main/backend/app/ai_provider.py): `backend/app/ai_provider.py`

### Other components

- **QA user**
- **Target website**
- **OpenRouter**

## Connections

- QA user → Scan workspace: submits scan (evidence: `frontend/src/App.jsx`)
- Scan workspace → Scan dashboard: renders (evidence: `frontend/src/App.jsx`)
- Scan workspace → Scan history: renders (evidence: `frontend/src/App.jsx`)
- Scan workspace → Crawler map: renders (evidence: `frontend/src/App.jsx`)
- Scan workspace → Test case table: renders (evidence: `frontend/src/App.jsx`)
- Scan dashboard → Prompt library: uses prompts (evidence: `frontend/src/components/Dashboard.jsx`)
- Test case table → API client: requests data (evidence: `frontend/src/components/TestCaseTable.jsx`)
- Scan workspace → API client: sends requests (evidence: `frontend/src/App.jsx`)
- API client → Scan API: calls API (evidence: `frontend/src/api.js`)
- Scan API → Scan contracts: validates requests (evidence: `backend/app/main.py`)
- Scan API → Static crawler: starts crawl (evidence: `backend/app/main.py`)
- Scan API → Behavior explorer: starts exploration (evidence: `backend/app/main.py`)
- Scan API → Case and export generator: generates cases (evidence: `backend/app/main.py`)
- Scan API → Scan database: reads and writes (evidence: `backend/app/main.py`)
- Static crawler → Scan database: records progress (evidence: `backend/app/crawler.py`)
- Static crawler → OpenRouter adapter: requests selectors (evidence: `backend/app/crawler.py`)
- Behavior explorer → Playwright MCP client: uses browser tools (evidence: `backend/app/mcp_explorer.py`)
- Behavior explorer → Playwright fallback: dispatches fallback (evidence: `backend/app/mcp_explorer.py`)
- Behavior explorer → OpenRouter adapter: requests analysis (evidence: `backend/app/mcp_explorer.py`)
- Case and export generator → OpenRouter adapter: requests generation (evidence: `backend/app/generator.py`)
- Case and export generator → Scan database: records progress (evidence: `backend/app/generator.py`)
- Static crawler → Target website: crawls pages (evidence: `backend/app/crawler.py`)
- Playwright MCP client → Target website: drives browser
- OpenRouter adapter → OpenRouter: sends prompts (evidence: `backend/app/ai_provider.py`)
- Static crawler → Runtime configuration: reads settings (evidence: `backend/app/crawler.py`)
- Behavior explorer → Runtime configuration: reads settings (evidence: `backend/app/mcp_explorer.py`)
- Scan API → Runtime configuration: reads settings (evidence: `backend/app/main.py`)
