Skip to content

Key Modules

The single source of truth for all shared TypeScript types. Every other module imports from here. See the Types Reference for the full type definitions.

Parses the SimC addon export string into a SimcProfile object.

Input: Raw text string from the SimC addon Output: SimcProfile with character metadata, talent string, equipped gear, and bag items

Key behaviors:

  • Lines starting with a class name (e.g., shaman="Thrall") are character declarations
  • Uncommented gear lines (e.g., head=,id=235602,...) are equipped items
  • Commented gear lines (e.g., # head=,id=229379,...) are bag items
  • All original lines preserved in rawLines for profile reconstruction

Pure function that takes OptimizationAxis[] and returns the cartesian product as CombinationSpec[].

Input: Array of optimization axes (gear, gems, enchants) Output: Array of combination specs, each with a unique name and override lines

Key behaviors:

  • Produces the cartesian product of all axis options
  • Gem axes are conditional — only included when their parent item is selected
  • Enforces the 1000-combination hard cap
  • combo_0000 is reserved for the baseline (currently equipped)

profileset-builder.ts — ProfileSet Builder

Section titled “profileset-builder.ts — ProfileSet Builder”

Pure function that generates the complete .simc file content from combinations and the base profile.

Input: CombinationSpec[] + SimcProfile + SimSettings Output: Complete .simc file string + manifest Map<string, CombinationSpec>

The generated file has four sections:

  1. Global options (fight_style, iterations, threads, etc.)
  2. Base character profile (from rawLines, unmodified)
  3. Enemy definitions (if >1 target)
  4. ProfileSet entries (one per non-baseline combination)

Also exports parseSimCResults() for parsing the json2 output back into SimResult[].

optimization-assembler.ts — Axis Collector

Section titled “optimization-assembler.ts — Axis Collector”

Collects OptimizationAxis[] from all UI sections (gear, gems, enchants) and exposes the live combination count for the counter widget.

Prefetches item names via invoke("fetch_item_data") and caches them in Tauri store with a 7-day TTL. Falls back to “Item #ID” if offline.

Simple boolean flags for partially-built features:

export const FEATURES = {
GEM_OPTIMIZATION: true,
ENCHANT_OPTIMIZATION: true,
EMBELLISHMENT_COMPARISON: false,
TALENT_COMPARISON: false,
} as const;

presets/season-config.ts — Season Configuration

Section titled “presets/season-config.ts — Season Configuration”

The only file edited for seasonal updates. Contains:

  • GEAR_TRACKS — gear tracks with bonus IDs and ilvl ranges
  • GEM_PRESETS — current-season gems
  • ENCHANT_PRESETS — current-season enchants per slot
  • SOCKET_BONUS_ID — bonus ID that adds an extra socket
  • CURRENT_SEASON — season metadata (name, start date, SimC branch)

The core Tauri command that runs simulations:

  1. Writes the .simc content to a temp file
  2. Spawns the SimC sidecar via app.shell().sidecar("simc")
  3. Waits for completion — checks for json2 output file (not exit code)
  4. Returns the json2 content
  5. Cleans up temp files

Reads and writes user configuration (SimC binary path override, thread count) via Tauri’s store plugin. Persists across sessions.

  • fetch_item_data — Fetches item names from Wowhead XML API
  • search_items — Searches the bundled items.db SQLite database using FTS5 full-text search
components/
├── FirstRun.tsx ← First launch / binary error screen
├── PasteScreen.tsx ← Main input area
├── gear/
│ ├── GearSlotCard.tsx ← One card per gear slot
│ └── ItemSearch.tsx ← Inline unowned item search
├── optimizations/
│ ├── GemSelector.tsx ← Gem options per socket
│ └── EnchantSelector.tsx ← Enchant options per slot
├── results/
│ ├── ResultsTable.tsx ← Main results display
│ └── ResultRow.tsx ← Individual result row
└── settings/
└── SimSettings.tsx ← Fight style, duration, etc.
  • useSimulation.ts — Manages simulation run state and Tauri invoke calls
  • useProfile.ts — Manages the parsed SimcProfile state