# hippoverflow/solvup architecture

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

- Interactive diagram: https://gitdiagram.com/hippoverflow/solvup
- Repository: https://github.com/hippoverflow/solvup

## Overview

SolvUp’s engine turns a cash-game hand history into street-by-street solver verdicts. The principal flow parses a supported site format, maps the hand to a six-seat table and preflop line, derives ranges, then uses a stored flop record when suitable or solves the spot locally before pricing decisions and producing a report. Separate capabilities include limp re-solves, three-way pots, and realization-adjusted preflop solutions. The README documents the product flow; sampled source confirms core solver and review behavior, but not every integration or runtime call.

Main entry points: [`engine/crates/review/src/postflop.rs`](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/postflop.rs) (Street solving), [`engine/crates/review/src/preflop.rs`](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/preflop.rs) (Preflop mapping), [`engine/crates/review/src/flopstore.rs`](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/flopstore.rs) (Flop records), [`engine/crates/core/src/holdem/sixmax.rs`](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/sixmax.rs) (Six-max solution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Hand ingestion"]
  node_cli_review["Review command<br/>[review.rs]"]
  node_hh_parse["History parser<br/>[parse.rs]"]
  node_hh_model["Hand model<br/>[model.rs]"]
end

subgraph group_review["Review workflow"]
  node_review_table["Table mapping<br/>[table.rs]"]
  node_preflop["Preflop mapping<br/>[preflop.rs]"]
  node_limp["Limp re-solve<br/>[limp.rs]"]
  node_flopstore[("Flop records<br/>[flopstore.rs]")]
  node_postflop["Street solving<br/>[postflop.rs]"]
end

subgraph group_solver["Solver engine"]
  node_tree["Game tree<br/>[tree.rs]"]
  node_cfr["Discounted CFR<br/>[cfr.rs]"]
  node_handspace["Hold’em hands<br/>[hands.rs]"]
  node_combo["Card combos<br/>[combo.rs]"]
  node_sixmax["Six-max solution<br/>[sixmax.rs]"]
  node_sixmax_hands["Preflop hand space<br/>[sixmax_hands.rs]"]
  node_realization["Realization factors<br/>[realization.rs]"]
  node_multiway["Three-way pots<br/>[multiway.rs]"]
  node_equity["Equity calculations<br/>[equity.rs]"]
end

subgraph group_outputs["Review results"]
  node_judge["Decision judging<br/>[judge.rs]"]
  node_report["Review report<br/>[report.rs]"]
end

node_player(("Hand reviewer"))
node_stored_server[("Flop-record service")]

node_player -->|"submits hand"| node_cli_review
node_cli_review -->|"parses history"| node_hh_parse
node_hh_parse -->|"builds hand"| node_hh_model
node_hh_model -->|"maps table"| node_review_table
node_review_table -->|"maps line"| node_preflop
node_preflop -->|"re-solves limps"| node_limp
node_preflop -->|"checks record"| node_flopstore
node_flopstore -.->|"fetches record"| node_stored_server
node_flopstore -->|"supplies flop data"| node_postflop
node_preflop -->|"provides ranges"| node_postflop
node_postflop -->|"builds subgame"| node_tree
node_postflop -->|"runs solver"| node_cfr
node_cfr -->|"evaluates hands"| node_handspace
node_handspace -->|"uses combos"| node_combo
node_preflop -->|"uses solution"| node_sixmax
node_sixmax -->|"uses hand space"| node_sixmax_hands
node_sixmax -->|"applies factors"| node_realization
node_postflop -.->|"handles three-way"| node_multiway
node_postflop -->|"prices decisions"| node_judge
node_judge -->|"feeds verdicts"| node_report
node_postflop -.->|"uses equity"| node_equity

click node_cli_review "https://github.com/hippoverflow/solvup/blob/main/engine/crates/cli/src/review.rs"
click node_hh_parse "https://github.com/hippoverflow/solvup/blob/main/engine/crates/hh/src/parse.rs"
click node_hh_model "https://github.com/hippoverflow/solvup/blob/main/engine/crates/hh/src/model.rs"
click node_review_table "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/table.rs"
click node_preflop "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/preflop.rs"
click node_limp "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/limp.rs"
click node_flopstore "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/flopstore.rs"
click node_postflop "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/postflop.rs"
click node_judge "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/judge.rs"
click node_report "https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/report.rs"
click node_tree "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/tree.rs"
click node_cfr "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/cfr.rs"
click node_handspace "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/hands.rs"
click node_combo "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/combo.rs"
click node_sixmax "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/sixmax.rs"
click node_sixmax_hands "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/sixmax_hands.rs"
click node_realization "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/realization.rs"
click node_multiway "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/multiway.rs"
click node_equity "https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/equity.rs"

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_cli_review,node_hh_parse,node_hh_model,node_player toneBlue
class node_review_table,node_preflop,node_limp,node_flopstore,node_postflop,node_stored_server toneAmber
class node_tree,node_cfr,node_handspace,node_combo,node_sixmax,node_sixmax_hands,node_realization,node_multiway,node_equity toneMint
class node_judge,node_report toneRose
```

## Components

### Hand ingestion

- [Review command](https://github.com/hippoverflow/solvup/blob/main/engine/crates/cli/src/review.rs): `engine/crates/cli/src/review.rs`
- [History parser](https://github.com/hippoverflow/solvup/blob/main/engine/crates/hh/src/parse.rs): `engine/crates/hh/src/parse.rs`
- [Hand model](https://github.com/hippoverflow/solvup/blob/main/engine/crates/hh/src/model.rs): `engine/crates/hh/src/model.rs`

### Review workflow

- [Table mapping](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/table.rs): `engine/crates/review/src/table.rs`
- [Preflop mapping](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/preflop.rs): `engine/crates/review/src/preflop.rs`
- [Limp re-solve](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/limp.rs): `engine/crates/review/src/limp.rs`
- [Flop records](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/flopstore.rs): `engine/crates/review/src/flopstore.rs`
- [Street solving](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/postflop.rs): `engine/crates/review/src/postflop.rs`

### Solver engine

- [Game tree](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/tree.rs): `engine/crates/core/src/tree.rs`
- [Discounted CFR](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/cfr.rs): `engine/crates/core/src/cfr.rs`
- [Hold’em hands](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/hands.rs): `engine/crates/core/src/holdem/hands.rs`
- [Card combos](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/combo.rs): `engine/crates/core/src/holdem/combo.rs`
- [Six-max solution](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/sixmax.rs): `engine/crates/core/src/holdem/sixmax.rs`
- [Preflop hand space](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/sixmax_hands.rs): `engine/crates/core/src/holdem/sixmax_hands.rs`
- [Realization factors](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/realization.rs): `engine/crates/core/src/holdem/realization.rs`
- [Three-way pots](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/multiway.rs): `engine/crates/core/src/holdem/multiway.rs`
- [Equity calculations](https://github.com/hippoverflow/solvup/blob/main/engine/crates/core/src/holdem/equity.rs): `engine/crates/core/src/holdem/equity.rs`

### Review results

- [Decision judging](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/judge.rs): `engine/crates/review/src/judge.rs`
- [Review report](https://github.com/hippoverflow/solvup/blob/main/engine/crates/review/src/report.rs): `engine/crates/review/src/report.rs`

### Other components

- **Hand reviewer**
- **Flop-record service**

## Connections

- Hand reviewer → Review command: submits hand (evidence: `README.md`)
- Review command → History parser: parses history (evidence: `README.md`)
- History parser → Hand model: builds hand (evidence: `engine/crates/hh/src/parse.rs`)
- Hand model → Table mapping: maps table (evidence: `engine/crates/review/src/table.rs`)
- Table mapping → Preflop mapping: maps line (evidence: `README.md`)
- Preflop mapping → Limp re-solve: re-solves limps (evidence: `engine/crates/review/src/limp.rs`)
- Preflop mapping → Flop records: checks record (evidence: `engine/crates/review/src/flopstore.rs`)
- Flop records → Flop-record service: fetches record (evidence: `README.md`)
- Flop records → Street solving: supplies flop data (evidence: `engine/crates/review/src/flopstore.rs`)
- Preflop mapping → Street solving: provides ranges (evidence: `README.md`)
- Street solving → Game tree: builds subgame (evidence: `engine/crates/review/src/postflop.rs`)
- Street solving → Discounted CFR: runs solver (evidence: `engine/crates/review/src/postflop.rs`)
- Discounted CFR → Hold’em hands: evaluates hands (evidence: `engine/crates/core/src/cfr.rs`)
- Hold’em hands → Card combos: uses combos (evidence: `engine/crates/core/src/holdem/hands.rs`)
- Preflop mapping → Six-max solution: uses solution (evidence: `engine/crates/review/src/preflop.rs`)
- Six-max solution → Preflop hand space: uses hand space (evidence: `engine/crates/core/src/holdem/sixmax_hands.rs`)
- Six-max solution → Realization factors: applies factors (evidence: `engine/crates/core/src/holdem/realization.rs`)
- Street solving → Three-way pots: handles three-way (evidence: `README.md`)
- Street solving → Decision judging: prices decisions (evidence: `README.md`)
- Decision judging → Review report: feeds verdicts (evidence: `engine/crates/review/src/report.rs`)
- Street solving → Equity calculations: uses equity
