# kiruban-raj/taskflow-qa architecture

> Architecture diagram of the GitHub repository kiruban-raj/taskflow-qa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kiruban-raj/taskflow-qa
- Repository: https://github.com/kiruban-raj/taskflow-qa

## Overview

TaskFlow QA combines a small multi-tenant task manager with a deliberately layered test architecture. A user signs in through the browser, receives a token, and uses the task page to list, create, update, filter, or delete tasks; the API resolves the tenant from the request host and applies authentication, domain rules, and persistence. The README also identifies unit, contract, component, and browser-journey testing as major product capabilities. Sampled excerpts are partial, so edges for unsampled internals are limited to documented relationships.

Main entry points: [`app/main.py`](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/main.py) (HTTP API), [`libs/testkit/src/testkit/transport.py`](https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/transport.py) (Test Transports), [`app/db.py`](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/db.py) (Database), [`app/static/app.js`](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/app.js) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Application API"]
  node_http_api["HTTP API<br/>[main.py]"]
  node_domain_rules["Domain Rules<br/>[rules.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_database[("Database<br/>[db.py]")]
  node_models["Data Models<br/>[models.py]"]
  node_schemas["API Schemas<br/>[schemas.py]"]
end

subgraph group_web["Browser UI"]
  node_browser_client["API Client<br/>[app.js]"]
  node_login_page["Login UI<br/>[login.js]"]
  node_task_page["Task UI<br/>[tasks.js]"]
end

subgraph group_tenancy["Tenant Configuration"]
  node_tenant_registry["Tenant Registry<br/>[tenants.py]"]
  node_tenant_files["Tenant Files"]
end

subgraph group_tests["Test Layers"]
  node_unit_layer["Unit Tests"]
  node_contract_layer["Contract Tests"]
  node_component_layer["Component Tests"]
  node_journey_layer["Journey Tests"]
  node_api_contract["OpenAPI Contract<br/>[openapi.yaml]"]
end

subgraph group_testkit["Test Substrate"]
  node_test_transport["Test Transports<br/>[transport.py]"]
  node_test_fixtures["Test Fixtures<br/>[fixtures.py]"]
  node_test_factories["Test Factories<br/>[factories.py]"]
  node_page_objects["Page Objects<br/>[pages.py]"]
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"submits login"| node_login_page
node_login_page -->|"calls"| node_browser_client
node_browser_client -->|"HTTP requests"| node_http_api
node_task_page -->|"calls"| node_browser_client
node_http_api -->|"verifies credentials and tokens"| node_auth
node_http_api -->|"applies rules"| node_domain_rules
node_http_api -->|"reads and writes"| node_database
node_http_api -->|"resolves tenant"| node_tenant_registry
node_tenant_registry -->|"loads configuration"| node_tenant_files
node_database -->|"persists entities"| node_models
node_http_api -->|"validates payloads"| node_schemas
node_unit_layer -->|"tests pure rules"| node_domain_rules
node_contract_layer -->|"checks agreement"| node_api_contract
node_contract_layer -->|"verifies responses"| node_http_api
node_component_layer -->|"tests endpoints"| node_http_api
node_component_layer -->|"exercises persistence"| node_database
node_journey_layer -->|"drives pages"| node_page_objects
node_page_objects -->|"controls"| node_browser
node_test_fixtures -->|"builds"| node_test_transport
node_test_fixtures -->|"provides"| node_test_factories
node_test_factories -->|"sends setup requests"| node_test_transport
node_test_transport -->|"in-process or HTTP"| node_http_api
node_journey_layer -->|"uses HTTP transport"| node_test_transport

click node_http_api "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/main.py"
click node_domain_rules "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/rules.py"
click node_auth "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/auth.py"
click node_database "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/db.py"
click node_models "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/models.py"
click node_schemas "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/schemas.py"
click node_tenant_registry "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/tenants.py"
click node_tenant_files "https://github.com/kiruban-raj/taskflow-qa/tree/main/tenants"
click node_browser_client "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/app.js"
click node_login_page "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/login.js"
click node_task_page "https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/tasks.js"
click node_unit_layer "https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/unit"
click node_contract_layer "https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/contract"
click node_component_layer "https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/component"
click node_journey_layer "https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/journey"
click node_api_contract "https://github.com/kiruban-raj/taskflow-qa/blob/main/contracts/openapi.yaml"
click node_test_transport "https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/transport.py"
click node_test_fixtures "https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/fixtures.py"
click node_test_factories "https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/factories.py"
click node_page_objects "https://github.com/kiruban-raj/taskflow-qa/blob/main/suites/journey/pages.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_http_api,node_domain_rules,node_auth,node_database,node_models,node_schemas,node_user,node_browser toneBlue
class node_browser_client,node_login_page,node_task_page toneAmber
class node_tenant_registry,node_tenant_files toneMint
class node_unit_layer,node_contract_layer,node_component_layer,node_journey_layer,node_api_contract toneRose
class node_test_transport,node_test_fixtures,node_test_factories,node_page_objects toneIndigo
```

## Components

### Application API

- [HTTP API](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/main.py): `app/main.py`
- [Domain Rules](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/rules.py): `app/rules.py`
- [Authentication](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/auth.py): `app/auth.py`
- [Database](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/db.py): `app/db.py`
- [Data Models](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/models.py): `app/models.py`
- [API Schemas](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/schemas.py): `app/schemas.py`

### Browser UI

- [API Client](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/app.js): `app/static/app.js`
- [Login UI](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/login.js): `app/static/login.js`
- [Task UI](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/static/tasks.js): `app/static/tasks.js`

### Tenant Configuration

- [Tenant Registry](https://github.com/kiruban-raj/taskflow-qa/blob/main/app/tenants.py): `app/tenants.py`
- [Tenant Files](https://github.com/kiruban-raj/taskflow-qa/tree/main/tenants): `tenants`

### Test Layers

- [Unit Tests](https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/unit): `suites/unit`
- [Contract Tests](https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/contract): `suites/contract`
- [Component Tests](https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/component): `suites/component`
- [Journey Tests](https://github.com/kiruban-raj/taskflow-qa/tree/main/suites/journey): `suites/journey`
- [OpenAPI Contract](https://github.com/kiruban-raj/taskflow-qa/blob/main/contracts/openapi.yaml): `contracts/openapi.yaml`

### Test Substrate

- [Test Transports](https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/transport.py): `libs/testkit/src/testkit/transport.py`
- [Test Fixtures](https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/fixtures.py): `libs/testkit/src/testkit/fixtures.py`
- [Test Factories](https://github.com/kiruban-raj/taskflow-qa/blob/main/libs/testkit/src/testkit/factories.py): `libs/testkit/src/testkit/factories.py`
- [Page Objects](https://github.com/kiruban-raj/taskflow-qa/blob/main/suites/journey/pages.py): `suites/journey/pages.py`

### Other components

- **User**
- **Browser**

## Connections

- User → Browser: uses
- Browser → Login UI: submits login
- Login UI → API Client: calls
- API Client → HTTP API: HTTP requests
- Task UI → API Client: calls
- HTTP API → Authentication: verifies credentials and tokens
- HTTP API → Domain Rules: applies rules
- HTTP API → Database: reads and writes
- HTTP API → Tenant Registry: resolves tenant
- Tenant Registry → Tenant Files: loads configuration
- Database → Data Models: persists entities
- HTTP API → API Schemas: validates payloads
- Unit Tests → Domain Rules: tests pure rules
- Contract Tests → OpenAPI Contract: checks agreement
- Contract Tests → HTTP API: verifies responses
- Component Tests → HTTP API: tests endpoints
- Component Tests → Database: exercises persistence
- Journey Tests → Page Objects: drives pages
- Page Objects → Browser: controls
- Test Fixtures → Test Transports: builds
- Test Fixtures → Test Factories: provides
- Test Factories → Test Transports: sends setup requests
- Test Transports → HTTP API: in-process or HTTP
- Journey Tests → Test Transports: uses HTTP transport
