# greydust/where-builds-meet architecture

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

- Interactive diagram: https://gitdiagram.com/greydust/where-builds-meet
- Repository: https://github.com/greydust/where-builds-meet

## Overview

Where Builds Meet is a client-side character-build and combat-rotation simulator. A player configures character stats, equipment, effects, and skills; authors a timed rotation; then the app resolves a calculation bundle, runs it in a Web Worker, and presents damage, DPS, and comparison results. Separate branches support stochastic simulations, rotation-timeline editing and inspection, gear import/OCR, and browser-persisted settings. The README documents the main calculation flow; sampled worker source confirms its dispatch, while some feature wiring is represented only at the documented subsystem level.

Main entry points: [`src/App.tsx`](https://github.com/greydust/where-builds-meet/blob/main/src/App.tsx) (App shell), [`src/features/rotations/RotationEditorTab.tsx`](https://github.com/greydust/where-builds-meet/blob/main/src/features/rotations/RotationEditorTab.tsx) (Rotation editor), [`src/calculations/rotationWorkerClient.ts`](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationWorkerClient.ts) (Rotation worker client), [`src/calculations/rotationCalculator.ts`](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationCalculator.ts) (Rotation calculator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Application experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_rotationeditor["Rotation editor"]
  node_timelineview["Timeline display"]
  node_analysis["Breakdown analysis<br/>[BreakdownTab.tsx]"]
  node_simulationui["Simulation controls<br/>[SimulationTab.tsx]"]
end

subgraph group_build["Build configuration"]
  node_stats["Character stats<br/>[StatsTab.tsx]"]
  node_skills["Skill editor<br/>[SkillEditorTab.tsx]"]
  node_gear["Gear and effects<br/>[gear.ts]"]
  node_buildsetup["Build setup"]
end

subgraph group_combat["Combat calculation"]
  node_calcbundle["Calculation bundle<br/>[App.tsx]"]
  node_workerclient["Rotation worker client"]
  node_rotationworker["Rotation worker<br/>[rotationWorker.ts]"]
  node_rotcalc["Rotation calculator"]
  node_timeline["Combat timeline"]
  node_damage["Damage and metrics<br/>[damage.ts]"]
  node_simclient["Simulation worker client"]
  node_simworker["Simulation worker"]
  node_simcalc["Rotation simulator"]
end

subgraph group_persistence["Browser state"]
  node_storage[("Persistent storage")]
  node_schemas["Storage schemas<br/>[storage.ts]"]
end

subgraph group_integrations["Import and presentation"]
  node_gearimport["Gear import OCR<br/>[gearOcr.ts]"]
  node_officialimport["Official gear import"]
end

node_player(("Player"))
node_browser[("Browser storage")]

node_player -->|"uses"| node_app
node_app -->|"presents"| node_stats
node_app -->|"presents"| node_skills
node_app -->|"presents"| node_rotationeditor
node_app -->|"presents"| node_simulationui
node_app -->|"resolves setup"| node_buildsetup
node_app -->|"resolves gear"| node_gear
node_app -->|"loads and saves"| node_storage
node_stats -->|"edits character"| node_app
node_skills -->|"edits skills"| node_app
node_rotationeditor -->|"edits rotation"| node_app
node_app -->|"assembles inputs"| node_calcbundle
node_calcbundle -->|"submits"| node_workerclient
node_workerclient -->|"dispatches requests"| node_rotationworker
node_rotationworker -->|"dispatches calculation"| node_rotcalc
node_rotcalc -->|"builds timeline"| node_timeline
node_rotcalc -->|"calculates damage"| node_damage
node_workerclient -->|"returns results"| node_analysis
node_rotationeditor -->|"requests editor timeline"| node_workerclient
node_rotationeditor -->|"provides rotation"| node_timelineview
node_timelineview -->|"uses timeline model"| node_timeline
node_simulationui -->|"starts simulation"| node_simclient
node_simclient -->|"posts task"| node_simworker
node_simworker -->|"runs trials"| node_simcalc
node_simclient -->|"returns summary"| node_simulationui
node_storage -->|"reads and writes"| node_browser
node_storage -->|"checks storage keys"| node_schemas
node_player -.->|"imports gear"| node_gearimport
node_gearimport -.->|"supplies gear data"| node_app
node_player -.->|"imports gear"| node_officialimport
node_officialimport -.->|"supplies gear data"| node_app

click node_app "https://github.com/greydust/where-builds-meet/blob/main/src/App.tsx"
click node_stats "https://github.com/greydust/where-builds-meet/blob/main/src/features/character/StatsTab.tsx"
click node_skills "https://github.com/greydust/where-builds-meet/blob/main/src/features/skills/SkillEditorTab.tsx"
click node_gear "https://github.com/greydust/where-builds-meet/blob/main/src/gear.ts"
click node_buildsetup "https://github.com/greydust/where-builds-meet/blob/main/src/application/characterComposition.ts"
click node_rotationeditor "https://github.com/greydust/where-builds-meet/blob/main/src/features/rotations/RotationEditorTab.tsx"
click node_timelineview "https://github.com/greydust/where-builds-meet/blob/main/src/features/rotations/useRotationTimelineDisplay.ts"
click node_calcbundle "https://github.com/greydust/where-builds-meet/blob/main/src/App.tsx"
click node_workerclient "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationWorkerClient.ts"
click node_rotationworker "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationWorker.ts"
click node_rotcalc "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationCalculator.ts"
click node_timeline "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationTimeline.ts"
click node_damage "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/damage.ts"
click node_analysis "https://github.com/greydust/where-builds-meet/blob/main/src/features/analysis/BreakdownTab.tsx"
click node_simulationui "https://github.com/greydust/where-builds-meet/blob/main/src/features/simulation/SimulationTab.tsx"
click node_simclient "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationWorkerClient.ts"
click node_simworker "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationWorker.ts"
click node_simcalc "https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationCalculator.ts"
click node_storage "https://github.com/greydust/where-builds-meet/blob/main/src/persistentStorage.ts"
click node_schemas "https://github.com/greydust/where-builds-meet/blob/main/src/schemas/storage.ts"
click node_gearimport "https://github.com/greydust/where-builds-meet/blob/main/src/gearOcr.ts"
click node_officialimport "https://github.com/greydust/where-builds-meet/blob/main/src/officialGearImport.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_app,node_rotationeditor,node_timelineview,node_analysis,node_simulationui toneBlue
class node_stats,node_skills,node_gear,node_buildsetup,node_browser toneAmber
class node_calcbundle,node_workerclient,node_rotationworker,node_rotcalc,node_timeline,node_damage,node_simclient,node_simworker,node_simcalc toneMint
class node_storage,node_schemas toneRose
class node_gearimport,node_officialimport,node_player toneIndigo
```

## Components

### Application experience

- [App shell](https://github.com/greydust/where-builds-meet/blob/main/src/App.tsx): `src/App.tsx`
- [Rotation editor](https://github.com/greydust/where-builds-meet/blob/main/src/features/rotations/RotationEditorTab.tsx): `src/features/rotations/RotationEditorTab.tsx`
- [Timeline display](https://github.com/greydust/where-builds-meet/blob/main/src/features/rotations/useRotationTimelineDisplay.ts): `src/features/rotations/useRotationTimelineDisplay.ts`
- [Breakdown analysis](https://github.com/greydust/where-builds-meet/blob/main/src/features/analysis/BreakdownTab.tsx): `src/features/analysis/BreakdownTab.tsx`
- [Simulation controls](https://github.com/greydust/where-builds-meet/blob/main/src/features/simulation/SimulationTab.tsx): `src/features/simulation/SimulationTab.tsx`

### Build configuration

- [Character stats](https://github.com/greydust/where-builds-meet/blob/main/src/features/character/StatsTab.tsx): `src/features/character/StatsTab.tsx`
- [Skill editor](https://github.com/greydust/where-builds-meet/blob/main/src/features/skills/SkillEditorTab.tsx): `src/features/skills/SkillEditorTab.tsx`
- [Gear and effects](https://github.com/greydust/where-builds-meet/blob/main/src/gear.ts): `src/gear.ts`
- [Build setup](https://github.com/greydust/where-builds-meet/blob/main/src/application/characterComposition.ts): `src/application/characterComposition.ts`

### Combat calculation

- [Calculation bundle](https://github.com/greydust/where-builds-meet/blob/main/src/App.tsx): `src/App.tsx`
- [Rotation worker client](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationWorkerClient.ts): `src/calculations/rotationWorkerClient.ts`
- [Rotation worker](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationWorker.ts): `src/calculations/rotationWorker.ts`
- [Rotation calculator](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationCalculator.ts): `src/calculations/rotationCalculator.ts`
- [Combat timeline](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/rotationTimeline.ts): `src/calculations/rotationTimeline.ts`
- [Damage and metrics](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/damage.ts): `src/calculations/damage.ts`
- [Simulation worker client](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationWorkerClient.ts): `src/calculations/simulationWorkerClient.ts`
- [Simulation worker](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationWorker.ts): `src/calculations/simulationWorker.ts`
- [Rotation simulator](https://github.com/greydust/where-builds-meet/blob/main/src/calculations/simulationCalculator.ts): `src/calculations/simulationCalculator.ts`

### Browser state

- [Persistent storage](https://github.com/greydust/where-builds-meet/blob/main/src/persistentStorage.ts): `src/persistentStorage.ts`
- [Storage schemas](https://github.com/greydust/where-builds-meet/blob/main/src/schemas/storage.ts): `src/schemas/storage.ts`

### Import and presentation

- [Gear import OCR](https://github.com/greydust/where-builds-meet/blob/main/src/gearOcr.ts): `src/gearOcr.ts`
- [Official gear import](https://github.com/greydust/where-builds-meet/blob/main/src/officialGearImport.ts): `src/officialGearImport.ts`

### Other components

- **Player**
- **Browser storage**

## Connections

- Player → App shell: uses
- App shell → Character stats: presents
- App shell → Skill editor: presents
- App shell → Rotation editor: presents
- App shell → Simulation controls: presents
- App shell → Build setup: resolves setup
- App shell → Gear and effects: resolves gear
- App shell → Persistent storage: loads and saves
- Character stats → App shell: edits character
- Skill editor → App shell: edits skills
- Rotation editor → App shell: edits rotation
- App shell → Calculation bundle: assembles inputs
- Calculation bundle → Rotation worker client: submits
- Rotation worker client → Rotation worker: dispatches requests
- Rotation worker → Rotation calculator: dispatches calculation
- Rotation calculator → Combat timeline: builds timeline
- Rotation calculator → Damage and metrics: calculates damage
- Rotation worker client → Breakdown analysis: returns results
- Rotation editor → Rotation worker client: requests editor timeline
- Rotation editor → Timeline display: provides rotation
- Timeline display → Combat timeline: uses timeline model
- Simulation controls → Simulation worker client: starts simulation
- Simulation worker client → Simulation worker: posts task
- Simulation worker → Rotation simulator: runs trials
- Simulation worker client → Simulation controls: returns summary
- Persistent storage → Browser storage: reads and writes
- Persistent storage → Storage schemas: checks storage keys
- Player → Gear import OCR: imports gear
- Gear import OCR → App shell: supplies gear data
- Player → Official gear import: imports gear
- Official gear import → App shell: supplies gear data
