# devalous17/pobchecker architecture

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

- Interactive diagram: https://gitdiagram.com/devalous17/pobchecker
- Repository: https://github.com/devalous17/pobchecker

## Overview

PoB Reality Check imports a Path of Building export, turns it into a structured build report, and presents ratings, stats, conditions, and practical advice. The main route accepts either a pobb.in URL or pasted import code; a separate optional route asks an isolated PoB worker to recalculate controlled combat scenarios and timelines. The UI also offers a PoE Ninja identity reference. The graph follows the sampled route and client code; detailed scoring internals and some documented report capabilities are represented at their enclosing feature paths because their source was not sampled.

Main entry points: [`app/api/analyze/route.ts`](https://github.com/devalous17/pobchecker/blob/main/app/api/analyze/route.ts) (Analysis endpoint), [`app/api/scenarios/route.ts`](https://github.com/devalous17/pobchecker/blob/main/app/api/scenarios/route.ts) (Scenario endpoint), [`components/Analyzer.tsx`](https://github.com/devalous17/pobchecker/blob/main/components/Analyzer.tsx) (Analyzer interface), [`src/features/engine/client.ts`](https://github.com/devalous17/pobchecker/blob/main/src/features/engine/client.ts) (Worker client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web_ui["Analyzer interface<br/>[Analyzer.tsx]"]
  node_home["Home page<br/>[page.tsx]"]
  node_poe_ninja_ui["PoE Ninja panel<br/>[Analyzer.tsx]"]
end

subgraph group_import_analysis["Import and analysis"]
  node_analyze_api["Analysis endpoint<br/>[route.ts]"]
  node_import_fetch["URL import<br/>[fetch-raw.ts]"]
  node_decode["Export decoder<br/>[decode.ts]"]
  node_parse["Build parser<br/>[parse.ts]"]
  node_gem_data["Gem metadata<br/>[gem-data.ts]"]
  node_unique_data["Unique metadata<br/>[unique-data.ts]"]
  node_support_evidence["Support evidence"]
  node_assets["Asset enrichment<br/>[assets.ts]"]
  node_main_skill["Main skill selection<br/>[main-skill.ts]"]
  node_conditions["Condition detection<br/>[registry.ts]"]
  node_report["Build report<br/>[report.ts]"]
  node_analysis_rules["Ratings and advice"]
  node_domain["Build data model<br/>[domain.ts]"]
end

subgraph group_scenarios["Combat scenarios"]
  node_scenario_api["Scenario endpoint<br/>[route.ts]"]
  node_scenario_model["Scenario profiles<br/>[model.ts]"]
  node_scenario_report["Scenario report<br/>[report.ts]"]
  node_timeline["Encounter timeline<br/>[timeline.ts]"]
  node_engine_client["Worker client<br/>[client.ts]"]
  node_engine_protocol["Worker protocol<br/>[protocol.ts]"]
  node_engine_service["PoB calculation worker<br/>[server.mjs]"]
end

subgraph group_integrations["External references"]
  node_pobb(("PoB export host"))
  node_poe_ninja_api["PoE Ninja endpoint<br/>[route.ts]"]
  node_comparison["Character reference<br/>[comparison.ts]"]
end

node_player(("Build reviewer"))
node_poe_ninja(("PoE Ninja"))

node_player -->|"submits build"| node_web_ui
node_home -->|"renders"| node_web_ui
node_web_ui -->|"posts export"| node_analyze_api
node_analyze_api -->|"fetches URL"| node_import_fetch
node_import_fetch -->|"retrieves export"| node_pobb
node_analyze_api -->|"decodes input"| node_decode
node_analyze_api -->|"parses XML"| node_parse
node_analyze_api -->|"enriches gems"| node_gem_data
node_analyze_api -->|"enriches uniques"| node_unique_data
node_analyze_api -->|"adds evidence"| node_support_evidence
node_analyze_api -->|"enriches assets"| node_assets
node_analyze_api -->|"selects skill"| node_main_skill
node_analyze_api -->|"detects conditions"| node_conditions
node_analyze_api -->|"builds report"| node_report
node_report -->|"uses analysis"| node_analysis_rules
node_analyze_api -->|"returns report"| node_web_ui
node_parse -->|"creates build data"| node_domain
node_web_ui -->|"requests scenarios"| node_scenario_api
node_scenario_api -->|"parses build XML"| node_parse
node_scenario_api -->|"detects conditions"| node_conditions
node_scenario_api -->|"builds profiles"| node_scenario_model
node_scenario_api -->|"calculates profiles"| node_engine_client
node_engine_client -->|"validates messages"| node_engine_protocol
node_engine_client -->|"posts calculations"| node_engine_service
node_scenario_api -->|"assembles results"| node_scenario_report
node_scenario_api -->|"builds timeline"| node_timeline
node_scenario_api -->|"returns scenarios"| node_web_ui
node_web_ui -->|"checks worker status"| node_engine_client
node_web_ui -->|"requests reference"| node_poe_ninja_api
node_poe_ninja_api -->|"resolves character"| node_comparison
node_comparison -.->|"looks up page"| node_poe_ninja

click node_web_ui "https://github.com/devalous17/pobchecker/blob/main/components/Analyzer.tsx"
click node_home "https://github.com/devalous17/pobchecker/blob/main/app/page.tsx"
click node_analyze_api "https://github.com/devalous17/pobchecker/blob/main/app/api/analyze/route.ts"
click node_import_fetch "https://github.com/devalous17/pobchecker/blob/main/src/features/import/fetch-raw.ts"
click node_decode "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/decode.ts"
click node_parse "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/parse.ts"
click node_gem_data "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/gem-data.ts"
click node_unique_data "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/unique-data.ts"
click node_support_evidence "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/socketed-supports.ts"
click node_assets "https://github.com/devalous17/pobchecker/blob/main/src/features/poeninja/assets.ts"
click node_main_skill "https://github.com/devalous17/pobchecker/blob/main/src/features/pob/main-skill.ts"
click node_conditions "https://github.com/devalous17/pobchecker/blob/main/src/features/conditions/registry.ts"
click node_report "https://github.com/devalous17/pobchecker/blob/main/src/features/analysis/report.ts"
click node_analysis_rules "https://github.com/devalous17/pobchecker/tree/main/src/features/analysis"
click node_domain "https://github.com/devalous17/pobchecker/blob/main/src/types/domain.ts"
click node_scenario_api "https://github.com/devalous17/pobchecker/blob/main/app/api/scenarios/route.ts"
click node_scenario_model "https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/model.ts"
click node_scenario_report "https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/report.ts"
click node_timeline "https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/timeline.ts"
click node_engine_client "https://github.com/devalous17/pobchecker/blob/main/src/features/engine/client.ts"
click node_engine_protocol "https://github.com/devalous17/pobchecker/blob/main/src/features/engine/protocol.ts"
click node_engine_service "https://github.com/devalous17/pobchecker/blob/main/services/pob-engine/server.mjs"
click node_poe_ninja_ui "https://github.com/devalous17/pobchecker/blob/main/components/Analyzer.tsx"
click node_poe_ninja_api "https://github.com/devalous17/pobchecker/blob/main/app/api/poe-ninja/route.ts"
click node_comparison "https://github.com/devalous17/pobchecker/blob/main/src/features/poeninja/comparison.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_web_ui,node_home,node_poe_ninja_ui,node_player toneBlue
class node_analyze_api,node_import_fetch,node_decode,node_parse,node_gem_data,node_unique_data,node_support_evidence,node_assets,node_main_skill,node_conditions,node_report,node_analysis_rules,node_domain toneAmber
class node_scenario_api,node_scenario_model,node_scenario_report,node_timeline,node_engine_client,node_engine_protocol,node_engine_service toneMint
class node_pobb,node_poe_ninja_api,node_comparison toneRose
class node_poe_ninja toneIndigo
```

## Components

### User experience

- [Analyzer interface](https://github.com/devalous17/pobchecker/blob/main/components/Analyzer.tsx): `components/Analyzer.tsx`
- [Home page](https://github.com/devalous17/pobchecker/blob/main/app/page.tsx): `app/page.tsx`
- [PoE Ninja panel](https://github.com/devalous17/pobchecker/blob/main/components/Analyzer.tsx): `components/Analyzer.tsx`

### Import and analysis

- [Analysis endpoint](https://github.com/devalous17/pobchecker/blob/main/app/api/analyze/route.ts): `app/api/analyze/route.ts`
- [URL import](https://github.com/devalous17/pobchecker/blob/main/src/features/import/fetch-raw.ts): `src/features/import/fetch-raw.ts`
- [Export decoder](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/decode.ts): `src/features/pob/decode.ts`
- [Build parser](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/parse.ts): `src/features/pob/parse.ts`
- [Gem metadata](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/gem-data.ts): `src/features/pob/gem-data.ts`
- [Unique metadata](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/unique-data.ts): `src/features/pob/unique-data.ts`
- [Support evidence](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/socketed-supports.ts): `src/features/pob/socketed-supports.ts`
- [Asset enrichment](https://github.com/devalous17/pobchecker/blob/main/src/features/poeninja/assets.ts): `src/features/poeninja/assets.ts`
- [Main skill selection](https://github.com/devalous17/pobchecker/blob/main/src/features/pob/main-skill.ts): `src/features/pob/main-skill.ts`
- [Condition detection](https://github.com/devalous17/pobchecker/blob/main/src/features/conditions/registry.ts): `src/features/conditions/registry.ts`
- [Build report](https://github.com/devalous17/pobchecker/blob/main/src/features/analysis/report.ts): `src/features/analysis/report.ts`
- [Ratings and advice](https://github.com/devalous17/pobchecker/tree/main/src/features/analysis): `src/features/analysis`
- [Build data model](https://github.com/devalous17/pobchecker/blob/main/src/types/domain.ts): `src/types/domain.ts`

### Combat scenarios

- [Scenario endpoint](https://github.com/devalous17/pobchecker/blob/main/app/api/scenarios/route.ts): `app/api/scenarios/route.ts`
- [Scenario profiles](https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/model.ts): `src/features/scenarios/model.ts`
- [Scenario report](https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/report.ts): `src/features/scenarios/report.ts`
- [Encounter timeline](https://github.com/devalous17/pobchecker/blob/main/src/features/scenarios/timeline.ts): `src/features/scenarios/timeline.ts`
- [Worker client](https://github.com/devalous17/pobchecker/blob/main/src/features/engine/client.ts): `src/features/engine/client.ts`
- [Worker protocol](https://github.com/devalous17/pobchecker/blob/main/src/features/engine/protocol.ts): `src/features/engine/protocol.ts`
- [PoB calculation worker](https://github.com/devalous17/pobchecker/blob/main/services/pob-engine/server.mjs): `services/pob-engine/server.mjs`

### External references

- **PoB export host**
- [PoE Ninja endpoint](https://github.com/devalous17/pobchecker/blob/main/app/api/poe-ninja/route.ts): `app/api/poe-ninja/route.ts`
- [Character reference](https://github.com/devalous17/pobchecker/blob/main/src/features/poeninja/comparison.ts): `src/features/poeninja/comparison.ts`

### Other components

- **Build reviewer**
- **PoE Ninja**

## Connections

- Build reviewer → Analyzer interface: submits build
- Home page → Analyzer interface: renders
- Analyzer interface → Analysis endpoint: posts export
- Analysis endpoint → URL import: fetches URL
- URL import → PoB export host: retrieves export
- Analysis endpoint → Export decoder: decodes input
- Analysis endpoint → Build parser: parses XML
- Analysis endpoint → Gem metadata: enriches gems
- Analysis endpoint → Unique metadata: enriches uniques
- Analysis endpoint → Support evidence: adds evidence
- Analysis endpoint → Asset enrichment: enriches assets
- Analysis endpoint → Main skill selection: selects skill
- Analysis endpoint → Condition detection: detects conditions
- Analysis endpoint → Build report: builds report
- Build report → Ratings and advice: uses analysis
- Analysis endpoint → Analyzer interface: returns report
- Build parser → Build data model: creates build data
- Analyzer interface → Scenario endpoint: requests scenarios
- Scenario endpoint → Build parser: parses build XML
- Scenario endpoint → Condition detection: detects conditions
- Scenario endpoint → Scenario profiles: builds profiles
- Scenario endpoint → Worker client: calculates profiles
- Worker client → Worker protocol: validates messages
- Worker client → PoB calculation worker: posts calculations
- Scenario endpoint → Scenario report: assembles results
- Scenario endpoint → Encounter timeline: builds timeline
- Scenario endpoint → Analyzer interface: returns scenarios
- Analyzer interface → Worker client: checks worker status
- Analyzer interface → PoE Ninja endpoint: requests reference
- PoE Ninja endpoint → Character reference: resolves character
- Character reference → PoE Ninja: looks up page
