# divyam20014/qtest_manager architecture

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

- Interactive diagram: https://gitdiagram.com/divyam20014/qtest_manager
- Repository: https://github.com/divyam20014/qtest_manager

## Overview

This repository implements a multi-tenant quality and test-management SaaS: users work with projects and test assets, execute test runs, track defects, and review dashboards and reports. The backend exposes those capabilities through FastAPI and domain services; the frontend provides the application shell and feature routes. Authentication, tenant isolation, authorization, and persistence underpin the product, with separate platform-admin and CI/service-token access planes. The tree and source index establish major feature areas, but most feature implementations were not sampled, so their internal call paths are not asserted.

Main entry points: [`backend/app/api`](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/api) (Feature endpoints), [`backend/app/services`](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/services) (Domain services), [`backend/app/models`](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/models) (Domain records), [`frontend/src/App.tsx`](https://github.com/divyam20014/qtest_manager/blob/main/frontend/src/App.tsx) (Web app shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["Web app shell<br/>[App.tsx]"]
  node_webfeatures["Feature routes"]
  node_webapi["API client<br/>[client.ts]"]
end

subgraph group_api["API surface"]
  node_apiapp["HTTP application<br/>[main.py]"]
  node_routes["Feature endpoints"]
end

subgraph group_quality["Quality workflows"]
  node_services["Domain services"]
  node_testassets["Test assets"]
  node_execution["Test execution"]
  node_defects["Defect tracking<br/>[defect_service.py]"]
  node_requirements["Requirements"]
  node_projects["Projects<br/>[project_service.py]"]
end

subgraph group_insights["Insights and integrations"]
  node_reporting["Dashboards and reports"]
  node_search["Cross-entity search<br/>[search_service.py]"]
  node_ci["CI result ingestion<br/>[ci.py]"]
  node_worker["Background jobs<br/>[worker.py]"]
end

subgraph group_platform["Identity and platform"]
  node_auth["Tenant authentication<br/>[auth_service.py]"]
  node_platformauth["Platform-admin MFA"]
  node_authorization["Session authorization<br/>[auth.py]"]
  node_tokenauth["Service-token auth"]
  node_models[("Domain records")]
  node_core["Runtime foundations"]
end

node_user(("Product user"))
node_database[("SQL database")]

node_user -->|"uses"| node_webapp
node_webapp -.->|"renders"| node_webfeatures
node_webapp -.->|"calls"| node_webapi
node_webapp -.->|"requests"| node_apiapp
node_apiapp -->|"registers"| node_routes
node_routes -->|"dispatches"| node_services
node_routes -->|"dispatches"| node_services
node_routes -->|"dispatches"| node_services
node_routes -->|"dispatches"| node_services
node_routes -->|"submits results"| node_execution
node_routes -->|"manages tokens"| node_services
node_tokenauth -->|"authenticates with"| node_services
node_search -->|"checks project access"| node_reporting
node_search -->|"queries"| node_models
node_search -->|"scopes cases"| node_services
node_worker -->|"runs jobs"| node_services
node_auth -->|"reads and writes"| node_models
node_platformauth -->|"manages sessions"| node_models
node_authorization -->|"loads identity"| node_models
node_models -->|"persists"| node_database
node_core -->|"provides sessions"| node_database
node_core -->|"loads settings"| node_core

click node_webapp "https://github.com/divyam20014/qtest_manager/blob/main/frontend/src/App.tsx"
click node_webfeatures "https://github.com/divyam20014/qtest_manager/tree/main/frontend/src/routes"
click node_webapi "https://github.com/divyam20014/qtest_manager/blob/main/frontend/src/api/client.ts"
click node_apiapp "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/main.py"
click node_routes "https://github.com/divyam20014/qtest_manager/tree/main/backend/app/api"
click node_services "https://github.com/divyam20014/qtest_manager/tree/main/backend/app/services"
click node_testassets "https://github.com/divyam20014/qtest_manager/tree/main/backend/app/services"
click node_execution "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/execution_service.py"
click node_defects "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/defect_service.py"
click node_requirements "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/requirement_service.py"
click node_projects "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/project_service.py"
click node_reporting "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/reporting_service.py"
click node_search "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/search_service.py"
click node_ci "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/api/ci.py"
click node_worker "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/worker.py"
click node_auth "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/auth_service.py"
click node_platformauth "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/platform_auth_service.py"
click node_authorization "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/core/auth.py"
click node_tokenauth "https://github.com/divyam20014/qtest_manager/blob/main/backend/app/core/service_token_auth.py"
click node_models "https://github.com/divyam20014/qtest_manager/tree/main/backend/app/models"
click node_core "https://github.com/divyam20014/qtest_manager/tree/main/backend/app/core"

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_webapp,node_webfeatures,node_webapi,node_user toneBlue
class node_apiapp,node_routes,node_database toneAmber
class node_services,node_testassets,node_execution,node_defects,node_requirements,node_projects toneMint
class node_reporting,node_search,node_ci,node_worker toneRose
class node_auth,node_platformauth,node_authorization,node_tokenauth,node_models,node_core toneIndigo
```

## Components

### Web application

- [Web app shell](https://github.com/divyam20014/qtest_manager/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Feature routes](https://github.com/divyam20014/qtest_manager/tree/main/frontend/src/routes): `frontend/src/routes`
- [API client](https://github.com/divyam20014/qtest_manager/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API surface

- [HTTP application](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/main.py): `backend/app/main.py`
- [Feature endpoints](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/api): `backend/app/api`

### Quality workflows

- [Domain services](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/services): `backend/app/services`
- [Test assets](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/services): `backend/app/services`
- [Test execution](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/execution_service.py): `backend/app/services/execution_service.py`
- [Defect tracking](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/defect_service.py): `backend/app/services/defect_service.py`
- [Requirements](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/requirement_service.py): `backend/app/services/requirement_service.py`
- [Projects](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/project_service.py): `backend/app/services/project_service.py`

### Insights and integrations

- [Dashboards and reports](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/reporting_service.py): `backend/app/services/reporting_service.py`
- [Cross-entity search](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/search_service.py): `backend/app/services/search_service.py`
- [CI result ingestion](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/api/ci.py): `backend/app/api/ci.py`
- [Background jobs](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/worker.py): `backend/app/worker.py`

### Identity and platform

- [Tenant authentication](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Platform-admin MFA](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/services/platform_auth_service.py): `backend/app/services/platform_auth_service.py`
- [Session authorization](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/core/auth.py): `backend/app/core/auth.py`
- [Service-token auth](https://github.com/divyam20014/qtest_manager/blob/main/backend/app/core/service_token_auth.py): `backend/app/core/service_token_auth.py`
- [Domain records](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/models): `backend/app/models`
- [Runtime foundations](https://github.com/divyam20014/qtest_manager/tree/main/backend/app/core): `backend/app/core`

### Other components

- **Product user**
- **SQL database**

## Connections

- Product user → Web app shell: uses
- Web app shell → Feature routes: renders
- Web app shell → API client: calls
- Web app shell → HTTP application: requests
- HTTP application → Feature endpoints: registers (evidence: `backend/app/main.py`)
- Feature endpoints → Domain services: dispatches (evidence: `backend/app/api/access_rules.py`)
- Feature endpoints → Domain services: dispatches (evidence: `backend/app/api/ai.py`)
- Feature endpoints → Domain services: dispatches (evidence: `backend/app/api/audit.py`)
- Feature endpoints → Domain services: dispatches (evidence: `backend/app/api/auth.py`)
- Feature endpoints → Test execution: submits results (evidence: `backend/app/api/ci.py`)
- Feature endpoints → Domain services: manages tokens (evidence: `backend/app/api/service_tokens.py`)
- Service-token auth → Domain services: authenticates with (evidence: `backend/app/core/service_token_auth.py`)
- Cross-entity search → Dashboards and reports: checks project access (evidence: `backend/app/services/search_service.py`)
- Cross-entity search → Domain records: queries (evidence: `backend/app/services/search_service.py`)
- Cross-entity search → Domain services: scopes cases (evidence: `backend/app/services/search_service.py`)
- Background jobs → Domain services: runs jobs (evidence: `backend/app/worker.py`)
- Tenant authentication → Domain records: reads and writes (evidence: `backend/app/services/auth_service.py`)
- Platform-admin MFA → Domain records: manages sessions (evidence: `backend/app/services/platform_auth_service.py`)
- Session authorization → Domain records: loads identity (evidence: `backend/app/core/auth.py`)
- Domain records → SQL database: persists (evidence: `backend/app/models/identity.py`)
- Runtime foundations → SQL database: provides sessions (evidence: `backend/app/core/db.py`)
- Runtime foundations → Runtime foundations: loads settings (evidence: `backend/app/core/db.py`)
