# dharani-test-arch/fx-rates-test-automation architecture

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

- Interactive diagram: https://gitdiagram.com/dharani-test-arch/fx-rates-test-automation
- Repository: https://github.com/dharani-test-arch/fx-rates-test-automation

## Overview

fx-rates-test-automation combines a small currency-rates application with its quality-engineering framework. The user workflow runs from selecting a base currency and viewing filtered rates through GraphQL queries, deterministic rate calculation, and rendered results. Distinct supporting branches cover component, API/contract, browser/visual, and performance checks, plus Allure reporting and quality analytics. Runtime edges follow the shown calls/configuration; test and reporting links rely on README descriptions where implementation was not sampled.

Main entry points: [`apps/web/src/App.tsx`](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/App.tsx) (Rates screen), [`apps/graphql-server/src/index.ts`](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/index.ts) (GraphQL endpoint), [`scripts/merge-allure-results.mjs`](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/scripts/merge-allure-results.mjs) (Allure reporting), [`tests/api`](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/tests/api) (API contract checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Rates interface"]
  node_web_entry["Web bootstrap<br/>[main.tsx]"]
  node_app["Rates screen<br/>[App.tsx]"]
  node_currency_select["Base selector<br/>[CurrencySelect.tsx]"]
  node_query_defs["GraphQL queries<br/>[queries.ts]"]
  node_rates_list["Filtered rates<br/>[RatesList.tsx]"]
end

subgraph group_server["GraphQL service"]
  node_graphql_endpoint["GraphQL endpoint<br/>[index.ts]"]
  node_schema_resolvers["Schema and resolvers<br/>[schema.ts]"]
  node_rate_data[("Rate calculations<br/>[data.ts]")]
end

subgraph group_testing["Test automation"]
  node_component_checks["Component checks"]
  node_api_contract["API contract checks"]
  node_browser_checks["Browser and visual"]
end

subgraph group_quality["Performance and quality"]
  node_k6_scenarios["k6 scenarios"]
  node_lighthouse["Frontend performance"]
  node_allure_report["Allure reporting"]
  node_quality_metrics["Quality analytics"]
end

node_user(("Currency user"))

node_user -->|"uses"| node_app
node_web_entry -->|"mounts"| node_app
node_app -->|"renders"| node_currency_select
node_app -->|"renders"| node_rates_list
node_currency_select -->|"uses query"| node_query_defs
node_rates_list -->|"uses query"| node_query_defs
node_web_entry -->|"configures URI"| node_graphql_endpoint
node_graphql_endpoint -->|"registers"| node_schema_resolvers
node_schema_resolvers -->|"calculates rates"| node_rate_data
node_component_checks -->|"tests UI"| node_app
node_api_contract -->|"tests HTTP"| node_graphql_endpoint
node_api_contract -->|"validates queries"| node_query_defs
node_browser_checks -->|"tests journeys"| node_app
node_k6_scenarios -->|"loads API"| node_graphql_endpoint
node_lighthouse -->|"audits frontend"| node_web_entry
node_allure_report -->|"feeds metrics"| node_quality_metrics
node_component_checks -->|"reports results"| node_allure_report
node_api_contract -->|"reports results"| node_allure_report
node_browser_checks -->|"reports results"| node_allure_report

click node_web_entry "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/main.tsx"
click node_app "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/App.tsx"
click node_currency_select "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/components/CurrencySelect.tsx"
click node_query_defs "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/queries.ts"
click node_rates_list "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/components/RatesList.tsx"
click node_graphql_endpoint "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/index.ts"
click node_schema_resolvers "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/schema.ts"
click node_rate_data "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/data.ts"
click node_component_checks "https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/apps/web/src"
click node_api_contract "https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/tests/api"
click node_browser_checks "https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/tests/e2e"
click node_k6_scenarios "https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/perf/k6"
click node_lighthouse "https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/perf"
click node_allure_report "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/scripts/merge-allure-results.mjs"
click node_quality_metrics "https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/scripts/quality-metrics.mjs"

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_web_entry,node_app,node_currency_select,node_query_defs,node_rates_list,node_user toneBlue
class node_graphql_endpoint,node_schema_resolvers,node_rate_data toneAmber
class node_component_checks,node_api_contract,node_browser_checks toneMint
class node_k6_scenarios,node_lighthouse,node_allure_report,node_quality_metrics toneRose
```

## Components

### Rates interface

- [Web bootstrap](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/main.tsx): `apps/web/src/main.tsx`
- [Rates screen](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Base selector](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/components/CurrencySelect.tsx): `apps/web/src/components/CurrencySelect.tsx`
- [GraphQL queries](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/queries.ts): `apps/web/src/queries.ts`
- [Filtered rates](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/web/src/components/RatesList.tsx): `apps/web/src/components/RatesList.tsx`

### GraphQL service

- [GraphQL endpoint](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/index.ts): `apps/graphql-server/src/index.ts`
- [Schema and resolvers](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/schema.ts): `apps/graphql-server/src/schema.ts`
- [Rate calculations](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/apps/graphql-server/src/data.ts): `apps/graphql-server/src/data.ts`

### Test automation

- [Component checks](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/apps/web/src): `apps/web/src`
- [API contract checks](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/tests/api): `tests/api`
- [Browser and visual](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/tests/e2e): `tests/e2e`

### Performance and quality

- [k6 scenarios](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/perf/k6): `perf/k6`
- [Frontend performance](https://github.com/dharani-test-arch/fx-rates-test-automation/tree/main/perf): `perf`
- [Allure reporting](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/scripts/merge-allure-results.mjs): `scripts/merge-allure-results.mjs`
- [Quality analytics](https://github.com/dharani-test-arch/fx-rates-test-automation/blob/main/scripts/quality-metrics.mjs): `scripts/quality-metrics.mjs`

### Other components

- **Currency user**

## Connections

- Currency user → Rates screen: uses (evidence: `README.md`)
- Web bootstrap → Rates screen: mounts (evidence: `apps/web/src/main.tsx`)
- Rates screen → Base selector: renders (evidence: `apps/web/src/App.tsx`)
- Rates screen → Filtered rates: renders (evidence: `apps/web/src/App.tsx`)
- Base selector → GraphQL queries: uses query (evidence: `apps/web/src/components/CurrencySelect.tsx`)
- Filtered rates → GraphQL queries: uses query (evidence: `apps/web/src/components/RatesList.tsx`)
- Web bootstrap → GraphQL endpoint: configures URI (evidence: `apps/web/src/main.tsx`)
- GraphQL endpoint → Schema and resolvers: registers (evidence: `apps/graphql-server/src/index.ts`)
- Schema and resolvers → Rate calculations: calculates rates (evidence: `apps/graphql-server/src/schema.ts`)
- Component checks → Rates screen: tests UI (evidence: `README.md`)
- API contract checks → GraphQL endpoint: tests HTTP (evidence: `README.md`)
- API contract checks → GraphQL queries: validates queries (evidence: `README.md`)
- Browser and visual → Rates screen: tests journeys (evidence: `README.md`)
- k6 scenarios → GraphQL endpoint: loads API (evidence: `perf/k6/lib/graphql.js`)
- Frontend performance → Web bootstrap: audits frontend (evidence: `README.md`)
- Allure reporting → Quality analytics: feeds metrics (evidence: `README.md`)
- Component checks → Allure reporting: reports results (evidence: `README.md`)
- API contract checks → Allure reporting: reports results (evidence: `README.md`)
- Browser and visual → Allure reporting: reports results (evidence: `README.md`)
