# hanggaa/benchmark architecture

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

- Interactive diagram: https://gitdiagram.com/hanggaa/benchmark
- Repository: https://github.com/hanggaa/benchmark

## Overview

The repository combines an AI-assisted MVP workflow (research through build) with a benchmark suite and its results dashboard. The documented workflow is represented from its prompt/template artifacts; the sampled frontend shows dashboard composition and local-runner dispatch instructions. Benchmark runner internals were not sampled, so the graph does not infer their internal call chain.

Main entry points: [`src/App.tsx`](https://github.com/hanggaa/benchmark/blob/main/src/App.tsx) (Dashboard App), [`src/types.ts`](https://github.com/hanggaa/benchmark/blob/main/src/types.ts) (Benchmark Types), [`src/components/LeaderboardTable.tsx`](https://github.com/hanggaa/benchmark/blob/main/src/components/LeaderboardTable.tsx) (Leaderboard), [`src/components/CaseInspectorModal.tsx`](https://github.com/hanggaa/benchmark/blob/main/src/components/CaseInspectorModal.tsx) (Case Inspector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["MVP Workflow"]
  node_research["Idea Research"]
  node_prd["MVP Requirements<br/>[part2-prd-mvp.md]"]
  node_techdesign["Technical Design"]
end

subgraph group_artifacts["Project Artifacts"]
  node_agentdocs["Agent Instructions"]
  node_adapters["Tool Adapters"]
end

subgraph group_benchmark["Benchmark Suite"]
  node_localrunner["Benchmark Runner"]
  node_results["Benchmark Results"]
end

subgraph group_dashboard["Results Dashboard"]
  node_app["Dashboard App<br/>[App.tsx]"]
  node_leaderboard["Leaderboard"]
  node_caseinspector["Case Inspector"]
  node_rankcard["Top Model Card<br/>[HeroRankCard.tsx]"]
  node_scatter["Cost Accuracy Chart<br/>[ScatterChart.tsx]"]
  node_categories["Benchmark Categories<br/>[CategoryCards.tsx]"]
  node_dispatch["CLI Quick Start<br/>[CLIQuickStart.tsx]"]
  node_types["Benchmark Types<br/>[types.ts]"]
end

node_builder(("Product Builder"))
node_ide(("AI IDE"))
node_mvp["Working MVP"]

node_builder -->|"frames idea"| node_research
node_research -->|"informs requirements"| node_prd
node_prd -->|"defines scope"| node_techdesign
node_techdesign -->|"guides setup"| node_agentdocs
node_agentdocs -->|"provides context"| node_ide
node_adapters -->|"adapts instructions"| node_ide
node_ide -->|"builds"| node_mvp
node_localrunner -.->|"records runs"| node_results
node_results -->|"loads data"| node_app
node_app -->|"renders"| node_leaderboard
node_app -->|"renders"| node_rankcard
node_app -->|"renders"| node_scatter
node_app -->|"renders"| node_categories
node_app -->|"renders"| node_dispatch
node_app -->|"opens selected case"| node_caseinspector
node_dispatch -->|"shows command"| node_localrunner
node_leaderboard -.->|"selects case"| node_caseinspector
node_app -->|"uses data types"| node_types
node_caseinspector -->|"reads item fields"| node_types
node_leaderboard -->|"uses summaries"| node_types
node_rankcard -->|"uses summary"| node_types
node_scatter -->|"uses summaries"| node_types

click node_research "https://github.com/hanggaa/benchmark/blob/main/part1-deepresearch.md"
click node_prd "https://github.com/hanggaa/benchmark/blob/main/part2-prd-mvp.md"
click node_techdesign "https://github.com/hanggaa/benchmark/blob/main/part3-tech-design-mvp.md"
click node_agentdocs "https://github.com/hanggaa/benchmark/tree/main/templates"
click node_adapters "https://github.com/hanggaa/benchmark/tree/main/templates/tool-adapters"
click node_localrunner "https://github.com/hanggaa/benchmark/tree/main/benchmarks"
click node_results "https://github.com/hanggaa/benchmark/blob/main/src/data/benchmark-data.json"
click node_app "https://github.com/hanggaa/benchmark/blob/main/src/App.tsx"
click node_leaderboard "https://github.com/hanggaa/benchmark/blob/main/src/components/LeaderboardTable.tsx"
click node_caseinspector "https://github.com/hanggaa/benchmark/blob/main/src/components/CaseInspectorModal.tsx"
click node_rankcard "https://github.com/hanggaa/benchmark/blob/main/src/components/HeroRankCard.tsx"
click node_scatter "https://github.com/hanggaa/benchmark/blob/main/src/components/ScatterChart.tsx"
click node_categories "https://github.com/hanggaa/benchmark/blob/main/src/components/CategoryCards.tsx"
click node_dispatch "https://github.com/hanggaa/benchmark/blob/main/src/components/CLIQuickStart.tsx"
click node_types "https://github.com/hanggaa/benchmark/blob/main/src/types.ts"

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_research,node_prd,node_techdesign toneBlue
class node_agentdocs,node_adapters toneAmber
class node_localrunner,node_results toneMint
class node_app,node_leaderboard,node_caseinspector,node_rankcard,node_scatter,node_categories,node_dispatch,node_types toneRose
class node_builder,node_ide,node_mvp toneIndigo
```

## Components

### MVP Workflow

- [Idea Research](https://github.com/hanggaa/benchmark/blob/main/part1-deepresearch.md): `part1-deepresearch.md`
- [MVP Requirements](https://github.com/hanggaa/benchmark/blob/main/part2-prd-mvp.md): `part2-prd-mvp.md`
- [Technical Design](https://github.com/hanggaa/benchmark/blob/main/part3-tech-design-mvp.md): `part3-tech-design-mvp.md`

### Project Artifacts

- [Agent Instructions](https://github.com/hanggaa/benchmark/tree/main/templates): `templates`
- [Tool Adapters](https://github.com/hanggaa/benchmark/tree/main/templates/tool-adapters): `templates/tool-adapters`

### Benchmark Suite

- [Benchmark Runner](https://github.com/hanggaa/benchmark/tree/main/benchmarks): `benchmarks`
- [Benchmark Results](https://github.com/hanggaa/benchmark/blob/main/src/data/benchmark-data.json): `src/data/benchmark-data.json`

### Results Dashboard

- [Dashboard App](https://github.com/hanggaa/benchmark/blob/main/src/App.tsx): `src/App.tsx`
- [Leaderboard](https://github.com/hanggaa/benchmark/blob/main/src/components/LeaderboardTable.tsx): `src/components/LeaderboardTable.tsx`
- [Case Inspector](https://github.com/hanggaa/benchmark/blob/main/src/components/CaseInspectorModal.tsx): `src/components/CaseInspectorModal.tsx`
- [Top Model Card](https://github.com/hanggaa/benchmark/blob/main/src/components/HeroRankCard.tsx): `src/components/HeroRankCard.tsx`
- [Cost Accuracy Chart](https://github.com/hanggaa/benchmark/blob/main/src/components/ScatterChart.tsx): `src/components/ScatterChart.tsx`
- [Benchmark Categories](https://github.com/hanggaa/benchmark/blob/main/src/components/CategoryCards.tsx): `src/components/CategoryCards.tsx`
- [CLI Quick Start](https://github.com/hanggaa/benchmark/blob/main/src/components/CLIQuickStart.tsx): `src/components/CLIQuickStart.tsx`
- [Benchmark Types](https://github.com/hanggaa/benchmark/blob/main/src/types.ts): `src/types.ts`

### Other components

- **Product Builder**
- **AI IDE**
- **Working MVP**

## Connections

- Product Builder → Idea Research: frames idea (evidence: `README.md`)
- Idea Research → MVP Requirements: informs requirements (evidence: `README.md`)
- MVP Requirements → Technical Design: defines scope (evidence: `README.md`)
- Technical Design → Agent Instructions: guides setup (evidence: `README.md`)
- Agent Instructions → AI IDE: provides context (evidence: `README.md`)
- Tool Adapters → AI IDE: adapts instructions (evidence: `README.md`)
- AI IDE → Working MVP: builds (evidence: `README.md`)
- Benchmark Runner → Benchmark Results: records runs
- Benchmark Results → Dashboard App: loads data (evidence: `src/App.tsx`)
- Dashboard App → Leaderboard: renders (evidence: `src/App.tsx`)
- Dashboard App → Top Model Card: renders (evidence: `src/App.tsx`)
- Dashboard App → Cost Accuracy Chart: renders (evidence: `src/App.tsx`)
- Dashboard App → Benchmark Categories: renders (evidence: `src/App.tsx`)
- Dashboard App → CLI Quick Start: renders (evidence: `src/App.tsx`)
- Dashboard App → Case Inspector: opens selected case (evidence: `src/App.tsx`)
- CLI Quick Start → Benchmark Runner: shows command (evidence: `src/components/CLIQuickStart.tsx`)
- Leaderboard → Case Inspector: selects case
- Dashboard App → Benchmark Types: uses data types (evidence: `src/App.tsx`)
- Case Inspector → Benchmark Types: reads item fields (evidence: `src/components/CaseInspectorModal.tsx`)
- Leaderboard → Benchmark Types: uses summaries (evidence: `src/components/LeaderboardTable.tsx`)
- Top Model Card → Benchmark Types: uses summary (evidence: `src/App.tsx`)
- Cost Accuracy Chart → Benchmark Types: uses summaries (evidence: `src/components/ScatterChart.tsx`)
