# snaik-aziro/figma-to-testcases architecture

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

- Interactive diagram: https://gitdiagram.com/snaik-aziro/figma-to-testcases
- Repository: https://github.com/snaik-aziro/figma-to-testcases

## Overview

QA Test Generator turns Figma designs and requirement documents into functional, visual, accessibility, and edge-case tests, with requirement traceability and coverage reporting. The primary workflow is to supply design and PRD inputs, analyze them, generate tests for a screen, then review and export results; users can also give manual feedback for a one-shot re-evaluation. The repository has both an Angular client and a Streamlit interface backed by a FastAPI server. The documented baseline-knowledge capability is not represented by a source file in the supplied tree, so it is not mapped as an implementation node.

Main entry points: [`server.py`](https://github.com/snaik-aziro/figma-to-testcases/blob/main/server.py) (FastAPI Server), [`demo_ui.py`](https://github.com/snaik-aziro/figma-to-testcases/blob/main/demo_ui.py) (Streamlit UI), [`qa-ui/src/app/app.ts`](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/app.ts) (Angular App), [`qa-ui/src/app/components/design-files/design-files.ts`](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/design-files.ts) (Design Intake)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Interfaces"]
  node_angular["Angular App<br/>[app.ts]"]
  node_design_ui["Design Intake<br/>[design-files.ts]"]
  node_figma_panel["Figma Panel<br/>[df-figma-panel.ts]"]
  node_json_panel["JSON Panel"]
  node_prd_ui["PRD Upload<br/>[prd-upload.ts]"]
  node_review_ui["Review and Run<br/>[review-and-run.ts]"]
  node_api_client["API Client<br/>[api-service.ts]"]
  node_ui_storage[("Session Storage<br/>[storage-service.ts]")]
  node_streamlit["Streamlit UI<br/>[demo_ui.py]"]
end

subgraph group_ingest["Design and Requirements"]
  node_figma["Figma API<br/>[figma_client.py]"]
  node_figma_cache[("Figma Cache<br/>[cache_manager.py]")]
  node_document_parser["Document Parser<br/>[document_parser.py]"]
  node_prd_analyzer["PRD Analyzer<br/>[prd_analyzer.py]"]
end

subgraph group_generation["Test Generation"]
  node_test_generation["Test Generation"]
  node_evaluation["Test Evaluation<br/>[evaluator.py]"]
  node_feedback["Feedback Runs"]
end

subgraph group_platform["API and State"]
  node_fastapi["FastAPI Server<br/>[server.py]"]
  node_settings["Configuration<br/>[config.py]"]
  node_database_models[("Data Models<br/>[database.py]")]
end

node_user(("QA User"))

node_user -->|"uses"| node_angular
node_user -->|"uses"| node_streamlit
node_angular -->|"routes to"| node_design_ui
node_angular -->|"routes to"| node_prd_ui
node_angular -->|"routes to"| node_review_ui
node_design_ui -->|"renders"| node_figma_panel
node_design_ui -->|"renders"| node_json_panel
node_design_ui -->|"stores design data"| node_ui_storage
node_figma_panel -->|"fetches designs"| node_api_client
node_json_panel -->|"stores JSON"| node_ui_storage
node_prd_ui -->|"analyzes files"| node_api_client
node_prd_ui -->|"stores PRD metadata"| node_ui_storage
node_review_ui -->|"requests tests"| node_api_client
node_api_client -->|"HTTP requests"| node_fastapi
node_streamlit -->|"uses"| node_figma
node_streamlit -->|"uses"| node_figma_cache
node_streamlit -->|"uses"| node_document_parser
node_streamlit -->|"uses"| node_prd_analyzer
node_streamlit -->|"generates tests"| node_test_generation
node_streamlit -->|"evaluates tests"| node_evaluation
node_streamlit -->|"uses"| node_database_models
node_fastapi -->|"uses"| node_figma
node_fastapi -->|"reads and writes cache"| node_figma_cache
node_fastapi -->|"parses PRD"| node_document_parser
node_fastapi -->|"analyzes PRD"| node_prd_analyzer
node_fastapi -->|"generates tests"| node_test_generation
node_fastapi -->|"stores run metadata"| node_feedback
node_fastapi -->|"uses settings"| node_settings
node_document_parser -->|"uses models"| node_database_models
node_figma -->|"loads settings"| node_settings
node_evaluation -->|"loads settings"| node_settings
node_fastapi -.->|"evaluates runs"| node_evaluation

click node_angular "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/app.ts"
click node_design_ui "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/design-files.ts"
click node_figma_panel "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/df-figma-panel/df-figma-panel.ts"
click node_json_panel "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/df-json-panel.component/df-json-panel.component.ts"
click node_prd_ui "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/prd-upload/prd-upload.ts"
click node_review_ui "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/review-and-run/review-and-run.ts"
click node_api_client "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/services/api-service/api-service.ts"
click node_ui_storage "https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/shared/services/storage-service.ts"
click node_figma "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/figma_client.py"
click node_figma_cache "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/cache_manager.py"
click node_document_parser "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/document_parser.py"
click node_prd_analyzer "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/prd_analyzer.py"
click node_fastapi "https://github.com/snaik-aziro/figma-to-testcases/blob/main/server.py"
click node_settings "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/config.py"
click node_database_models "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/models/database.py"
click node_test_generation "https://github.com/snaik-aziro/figma-to-testcases/tree/main/app/services"
click node_evaluation "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/evaluator.py"
click node_feedback "https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/feedback_manager.py"
click node_streamlit "https://github.com/snaik-aziro/figma-to-testcases/blob/main/demo_ui.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_angular,node_design_ui,node_figma_panel,node_json_panel,node_prd_ui,node_review_ui,node_api_client,node_ui_storage,node_streamlit,node_user toneBlue
class node_figma,node_figma_cache,node_document_parser,node_prd_analyzer toneAmber
class node_test_generation,node_evaluation,node_feedback toneMint
class node_fastapi,node_settings,node_database_models toneRose
```

## Components

### User Interfaces

- [Angular App](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/app.ts): `qa-ui/src/app/app.ts`
- [Design Intake](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/design-files.ts): `qa-ui/src/app/components/design-files/design-files.ts`
- [Figma Panel](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/df-figma-panel/df-figma-panel.ts): `qa-ui/src/app/components/design-files/df-figma-panel/df-figma-panel.ts`
- [JSON Panel](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/design-files/df-json-panel.component/df-json-panel.component.ts): `qa-ui/src/app/components/design-files/df-json-panel.component/df-json-panel.component.ts`
- [PRD Upload](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/prd-upload/prd-upload.ts): `qa-ui/src/app/components/prd-upload/prd-upload.ts`
- [Review and Run](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/components/review-and-run/review-and-run.ts): `qa-ui/src/app/components/review-and-run/review-and-run.ts`
- [API Client](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/services/api-service/api-service.ts): `qa-ui/src/app/services/api-service/api-service.ts`
- [Session Storage](https://github.com/snaik-aziro/figma-to-testcases/blob/main/qa-ui/src/app/shared/services/storage-service.ts): `qa-ui/src/app/shared/services/storage-service.ts`
- [Streamlit UI](https://github.com/snaik-aziro/figma-to-testcases/blob/main/demo_ui.py): `demo_ui.py`

### Design and Requirements

- [Figma API](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/figma_client.py): `app/services/figma_client.py`
- [Figma Cache](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/cache_manager.py): `app/services/cache_manager.py`
- [Document Parser](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/document_parser.py): `app/services/document_parser.py`
- [PRD Analyzer](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/prd_analyzer.py): `app/services/prd_analyzer.py`

### Test Generation

- [Test Generation](https://github.com/snaik-aziro/figma-to-testcases/tree/main/app/services): `app/services`
- [Test Evaluation](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/evaluator.py): `app/services/evaluator.py`
- [Feedback Runs](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/services/feedback_manager.py): `app/services/feedback_manager.py`

### API and State

- [FastAPI Server](https://github.com/snaik-aziro/figma-to-testcases/blob/main/server.py): `server.py`
- [Configuration](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/config.py): `app/config.py`
- [Data Models](https://github.com/snaik-aziro/figma-to-testcases/blob/main/app/models/database.py): `app/models/database.py`

### Other components

- **QA User**

## Connections

- QA User → Angular App: uses (evidence: `README.md`)
- QA User → Streamlit UI: uses (evidence: `README.md`)
- Angular App → Design Intake: routes to
- Angular App → PRD Upload: routes to
- Angular App → Review and Run: routes to
- Design Intake → Figma Panel: renders (evidence: `qa-ui/src/app/components/design-files/design-files.ts`)
- Design Intake → JSON Panel: renders (evidence: `qa-ui/src/app/components/design-files/design-files.ts`)
- Design Intake → Session Storage: stores design data (evidence: `qa-ui/src/app/components/design-files/design-files.ts`)
- Figma Panel → API Client: fetches designs (evidence: `qa-ui/src/app/components/design-files/df-figma-panel/df-figma-panel.ts`)
- JSON Panel → Session Storage: stores JSON (evidence: `qa-ui/src/app/components/design-files/df-json-panel.component/df-json-panel.component.ts`)
- PRD Upload → API Client: analyzes files (evidence: `qa-ui/src/app/components/prd-upload/prd-upload.ts`)
- PRD Upload → Session Storage: stores PRD metadata (evidence: `qa-ui/src/app/components/prd-upload/prd-upload.ts`)
- Review and Run → API Client: requests tests (evidence: `qa-ui/src/app/components/review-and-run/review-and-run.ts`)
- API Client → FastAPI Server: HTTP requests (evidence: `qa-ui/src/app/services/api-service/api-service.ts`)
- Streamlit UI → Figma API: uses (evidence: `demo_ui.py`)
- Streamlit UI → Figma Cache: uses (evidence: `demo_ui.py`)
- Streamlit UI → Document Parser: uses (evidence: `demo_ui.py`)
- Streamlit UI → PRD Analyzer: uses (evidence: `demo_ui.py`)
- Streamlit UI → Test Generation: generates tests (evidence: `demo_ui.py`)
- Streamlit UI → Test Evaluation: evaluates tests (evidence: `demo_ui.py`)
- Streamlit UI → Data Models: uses (evidence: `demo_ui.py`)
- FastAPI Server → Figma API: uses (evidence: `server.py`)
- FastAPI Server → Figma Cache: reads and writes cache (evidence: `server.py`)
- FastAPI Server → Document Parser: parses PRD (evidence: `server.py`)
- FastAPI Server → PRD Analyzer: analyzes PRD (evidence: `server.py`)
- FastAPI Server → Test Generation: generates tests (evidence: `server.py`)
- FastAPI Server → Feedback Runs: stores run metadata (evidence: `server.py`)
- FastAPI Server → Configuration: uses settings (evidence: `server.py`)
- Document Parser → Data Models: uses models (evidence: `app/services/document_parser.py`)
- Figma API → Configuration: loads settings (evidence: `app/services/figma_client.py`)
- Test Evaluation → Configuration: loads settings (evidence: `app/services/evaluator.py`)
- FastAPI Server → Test Evaluation: evaluates runs
