How pathofbuildingcommunity/pathofbuilding works
1. This repository is a standalone desktop application: an offline build planner for Path of Exile called Path of Building Community. The shipped product is not a browser app; it is a Lua application packaged with a bundled Windows runtime and launcher binaries in runtime/ plus install/update support.
2. The core runtime is organized around a custom UI framework in src/Classes. These files define reusable controls, tab views, dialogs, lists, sliders, tooltips, and tree/item-specific widgets. The UI is stateful and event-driven, with the major screens implemented as tab classes such as TreeTab, SkillsTab, ItemsTab, CalcsTab, ImportTab, ConfigTab, and NotesTab.
3. Application behavior and domain logic live in src/Modules. This is the main orchestration layer: build state, calculation pipelines, import/export helpers, stat description formatting, configuration, mod parsing, item tools, and notifications. src/Modules/Main.lua is the top-level entry point for the app logic, while Build.lua and the Calc* modules are the main computational boundary.
4. The central data model is a “build” composed of passive tree choices, equipped items, skill gems, and configuration. The UI edits this model; the calculation modules read it to derive offense, defense, trigger behavior, resource reservation, and other derived stats. The calculations are split by concern into offense, defense, triggers, active skills, breakdowns, and setup.
5. Static game knowledge is stored in src/Data. This includes item bases, uniques, modifiers, gems, bosses, minions, pantheons, tattoos, cluster jewels, essences, stat description tables, and numerous game-version-specific lookup tables. These tables are the canonical source for parsing items and skills and for translating raw modifiers into meaningful stats.
6. The passive skill tree is versioned separately in src/TreeData. Each game version and variant has its own tree file, with special variants for Ruthless and Alternate. This boundary matters because tree layout, node ids, sprites, and ascendancy positions change by version, so tree rendering and node lookup are data-driven rather than hardcoded.
7. Tree import/export and external data generation are handled by the src/Export subsystem. It produces text/Lua assets for bases, skills, bosses, minions, passives, stat descriptions, and GGPK/tree-related data. This looks like a build-time content pipeline that converts raw game data into the normalized tables consumed by the app.
8. Item handling is a major subsystem. Item parsing, crafting templates, unique databases, rare item templates, socketed gem effects, and mod resolution are all coordinated through ItemsTab, Item/ItemTools, and the mod database classes. The app supports importing pasted item text and then feeds those parsed items into the same build model used by calculators.
9. Skill handling is parallel to item handling. Skills and supports are represented in data tables and UI controls, then merged into the build model so calculations can account for linked supports, auras, curses, buffs, minions, and socket-inherited modifiers. The app also models gem-granted supports from items.
10. The import surface includes passive tree links, character import, item paste import, and build share codes. These inputs enter through the import/UI layer, are normalized into build state, and then recomputed by the calculation engine. This creates a clear flow: external source data → parsed build state → recalculated stats → displayed breakdowns.
11. Trade integration is present as its own set of classes: TradeQuery, TradeQueryGenerator, TradeQueryRateLimiter, and TradeQueryRequests. This boundary suggests the app can generate and send queries to the Path of Exile trade ecosystem, then use returned results to suggest impactful upgrades inside the item planner.
12. The bundled runtime under runtime/ includes the executable, update binary, font assets, Lua libraries, and a custom graphics layer (SimpleGraphic). That means rendering, text, and UI controls are part of the packaged desktop environment rather than relying on a system browser or standard game engine.
13. Update and release automation is first-class. UpdateCheck, UpdateApply, LaunchInstall, Dockerfile, docker-compose.yml, and GitHub Actions workflows support automatic updates, build packaging, and release generation. The application is designed to self-update and to be distributed as both installer and portable builds.
14. Verification is split between Lua specs and a small Python test. spec/ uses Busted for system-level coverage of builds, skills, items, triggers, trade queries, and calculations, while tests/test_fix_ascendancy_positions.py covers a maintenance script. This makes the test boundary centered on deterministic game-data and calculation behavior rather than UI rendering.
15. For an architecture diagram, the most important high-level boundaries are: bundled runtime/UI, build state, calculation engine, static game-data tables, versioned passive-tree assets, import/trade/update integrations, and export/tooling pipelines. The app’s core loop is “load data → edit build in UI → recalculate derived stats → show breakdowns / import or export data.”
Main entry points: Build.lua Build model · Calcs.lua Calc engine · Main.lua Main · TreeTab.lua Build tabs
Components 20
Bundled runtime & UI
Packaged desktop runtime plus the stateful Lua UI layer.
- Launch · Starts the packaged app and hands off into the Lua application.
src/Launch.lua - Runtime · Windows executable, update binary, Lua libraries, fonts, and SimpleGraphic runtime.
runtime/Path{space}of{space}Building.exe - UI core · Reusable controls, dialogs, layout, and event-hosting primitives.
src/Classes/Control.lua - Build tabs · Main stateful screens for tree, skills, items, calcs, import, config, and notes.
src/Classes/TreeTab.lua - Trade UI · Trade query generation, throttling, requests, and results integration.
src/Classes/TradeQuery.lua
Build logic & calculations
Build state, orchestration, and derived-stat pipelines.
- Main · Top-level application logic and coordination entry point.
src/Modules/Main.lua - Build model · Central build state for passive tree, items, skills, and config.
src/Modules/Build.lua - Calc engine · Orchestrates offense, defence, triggers, setup, sections, and breakdowns.
src/Modules/Calcs.lua - Offence · Offence and active-skill damage calculations.
src/Modules/CalcOffence.lua - Defence · Defence, resource, and survivability calculations.
src/Modules/CalcDefence.lua - Triggers · Trigger behavior, mirages, and proc-driven skill interactions.
src/Modules/CalcTriggers.lua - Items · Item parsing, templates, mod resolution, and item-specific tools.
src/Modules/ItemTools.lua - Mods · Modifier parsing, stat tools, and representation helpers.
src/Modules/ModParser.lua
Static game data
Canonical tables and versioned tree assets.
Import, export & updates
External integrations, generation pipelines, and self-update flow.
Verification
Automated specs and maintenance tests.
- Specs · System-level Lua coverage for builds, skills, items, triggers, and trade queries.
spec/System/TestBuilds_spec.lua - Maintenance test · Python maintenance check for ascendancy position fixing.
tests/test_fix_ascendancy_positions.py
Connections 22
- Runtime → Launch: executes · Bundled binaries launch the desktop application.
- Launch → Main: boots · Startup hands control to the main application module.
- Main → UI core: builds · Main wires the UI framework and event host.
- Main → Build tabs: opens · Main instantiates the primary build-editing screens.
- Main → Build model: owns · Main coordinates the central build state.
- Build tabs → Build model: edits · Tabs mutate the shared build model.
- UI core → Build tabs: renders · Reusable controls compose the major screens.
- Build model → Calc engine: feeds · The current build state is recalculated into derived stats.
- Calc engine → Offence: delegates · Offence is one major calculation boundary.
- Calc engine → Defence: delegates · Defence is one major calculation boundary.
- Calc engine → Triggers: delegates · Trigger and proc behavior are calculated separately.
- Build model → Items: contains · Items are parsed into and stored on the build.
- Items → Mods: resolves · Item logic depends on modifier parsing and stat interpretation.
- Mods → Game data: reads · Mod parsing is grounded in static game tables.
- Build model → Tree data: uses · Passive-tree choices are versioned by game tree assets.
- Import → Build model: imports · External build data is normalized into build state.
- Trade UI → Items: suggests · Trade queries support item upgrade evaluation.
- Export → Game data: generates from · Exports are produced from normalized game data.
- Export → Tree data: generates from · Tree export assets are derived from tree data.
- Updates → Runtime: updates · Updater and installer manage the packaged runtime.
- Specs → Calc engine: verifies · Specs focus on deterministic calculation behavior.
- Maintenance test → Tree data: checks · Maintenance test validates tree-related position data.