# maartenharms/fitting-room architecture

> Architecture diagram of the GitHub repository maartenharms/fitting-room, 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/maartenharms/fitting-room
- Repository: https://github.com/maartenharms/fitting-room

## Overview

Fitting Room is a Skyrim SKSE transmog plugin: players author and save outfits, then wear those visuals over their real equipment so gameplay continues to use the actual gear. The graph also preserves documented and tree-evident capabilities for rule-driven looks, dyes, overlays, previews, presets, profiles, and body morphs. Sampled source confirms the preview cache’s rendering dependencies and WorldWatch’s rule-state role; wiring for several other subsystems is not shown, so uncertain links are omitted.

Main entry points: [`src/EditorWindow.cpp`](https://github.com/maartenharms/fitting-room/blob/main/src/EditorWindow.cpp) (Outfit editor), [`src/PreviewCache.cpp`](https://github.com/maartenharms/fitting-room/blob/main/src/PreviewCache.cpp) (Preview cache), [`src/OutfitSession.cpp`](https://github.com/maartenharms/fitting-room/blob/main/src/OutfitSession.cpp) (Outfit session), [`src/Requip.cpp`](https://github.com/maartenharms/fitting-room/blob/main/src/Requip.cpp) (Visual equipment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Outfit runtime"]
  node_plugin["SKSE plugin<br/>[plugin.cpp]"]
  node_outfit_session["Outfit session<br/>[OutfitSession.cpp]"]
  node_requip["Visual equipment<br/>[Requip.cpp]"]
  node_persistence[("Saved data<br/>[Persistence.cpp]")]
end

subgraph group_editor["Editor and previews"]
  node_editor["Outfit editor<br/>[EditorWindow.cpp]"]
  node_preview[("Preview cache<br/>[PreviewCache.cpp]")]
  node_mesh["Mesh extraction<br/>[MeshExtractor.cpp]"]
  node_mannequin["Mannequin scenes<br/>[Mannequin.cpp]"]
  node_presets["Preset browser<br/>[PresetBrowse.cpp]"]
  node_profiles["Profiles<br/>[ProfilesUI.cpp]"]
end

subgraph group_automation["Rules and dyes"]
  node_rules_ui["Rule editor<br/>[RulesUI.cpp]"]
  node_rule_engine["Rule engine<br/>[RuleEngine.cpp]"]
  node_rule_store[("Rule data<br/>[RuleStore.cpp]")]
  node_world_watch["World state<br/>[WorldWatch.cpp]"]
  node_dye_ui["Dye editor<br/>[DyeGrid.cpp]"]
  node_dye_rules["Dye unlocks<br/>[DyeUnlocks.cpp]"]
end

subgraph group_appearance["Appearance tools"]
  node_overlays["Overlays<br/>[OverlaysUI.cpp]"]
  node_body_morph["Body morphs<br/>[BodyMorphData.cpp]"]
  node_appearance_hooks["Appearance hooks<br/>[BipedHooks.cpp]"]
end

node_player(("Player"))
node_game["Skyrim"]
node_obody["OBody<br/>[OBody_API.h]"]
node_flick["FLICK framework<br/>[FUCK_API.h]"]

node_player -->|"uses"| node_plugin
node_plugin -->|"opens"| node_editor
node_editor -->|"edits"| node_outfit_session
node_outfit_session -->|"saves"| node_persistence
node_outfit_session -->|"selects look"| node_requip
node_requip -->|"shows over gear"| node_game
node_game -->|"retains real gear"| node_requip
node_editor -->|"configures"| node_rules_ui
node_rules_ui -->|"stores rules"| node_rule_store
node_world_watch -->|"provides state"| node_rule_engine
node_rule_engine -->|"evaluates rules"| node_rule_store
node_editor -->|"customizes dyes"| node_dye_ui
node_dye_ui -->|"checks unlocks"| node_dye_rules
node_editor -->|"edits"| node_overlays
node_editor -->|"requests scene"| node_preview
node_preview -->|"extracts meshes"| node_mesh
node_preview -->|"composes scene"| node_mannequin
node_preview -->|"reads morph source"| node_body_morph
node_editor -->|"browses"| node_presets
node_editor -->|"manages profiles"| node_profiles
node_appearance_hooks -->|"updates appearance"| node_game
node_editor -->|"draws UI through"| node_flick
node_body_morph -.->|"integrates optionally"| node_obody

click node_plugin "https://github.com/maartenharms/fitting-room/blob/main/src/plugin.cpp"
click node_editor "https://github.com/maartenharms/fitting-room/blob/main/src/EditorWindow.cpp"
click node_outfit_session "https://github.com/maartenharms/fitting-room/blob/main/src/OutfitSession.cpp"
click node_requip "https://github.com/maartenharms/fitting-room/blob/main/src/Requip.cpp"
click node_persistence "https://github.com/maartenharms/fitting-room/blob/main/src/Persistence.cpp"
click node_rules_ui "https://github.com/maartenharms/fitting-room/blob/main/src/RulesUI.cpp"
click node_rule_engine "https://github.com/maartenharms/fitting-room/blob/main/src/RuleEngine.cpp"
click node_rule_store "https://github.com/maartenharms/fitting-room/blob/main/src/RuleStore.cpp"
click node_world_watch "https://github.com/maartenharms/fitting-room/blob/main/src/WorldWatch.cpp"
click node_dye_ui "https://github.com/maartenharms/fitting-room/blob/main/src/DyeGrid.cpp"
click node_dye_rules "https://github.com/maartenharms/fitting-room/blob/main/src/DyeUnlocks.cpp"
click node_overlays "https://github.com/maartenharms/fitting-room/blob/main/src/OverlaysUI.cpp"
click node_preview "https://github.com/maartenharms/fitting-room/blob/main/src/PreviewCache.cpp"
click node_mesh "https://github.com/maartenharms/fitting-room/blob/main/src/MeshExtractor.cpp"
click node_mannequin "https://github.com/maartenharms/fitting-room/blob/main/src/Mannequin.cpp"
click node_presets "https://github.com/maartenharms/fitting-room/blob/main/src/PresetBrowse.cpp"
click node_profiles "https://github.com/maartenharms/fitting-room/blob/main/src/ProfilesUI.cpp"
click node_body_morph "https://github.com/maartenharms/fitting-room/blob/main/src/BodyMorphData.cpp"
click node_appearance_hooks "https://github.com/maartenharms/fitting-room/blob/main/src/BipedHooks.cpp"
click node_obody "https://github.com/maartenharms/fitting-room/blob/main/extern/OBody_API.h"
click node_flick "https://github.com/maartenharms/fitting-room/blob/main/extern/FUCK_API.h"

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_plugin,node_outfit_session,node_requip,node_persistence toneBlue
class node_editor,node_preview,node_mesh,node_mannequin,node_presets,node_profiles toneAmber
class node_rules_ui,node_rule_engine,node_rule_store,node_world_watch,node_dye_ui,node_dye_rules toneMint
class node_overlays,node_body_morph,node_appearance_hooks toneRose
class node_player,node_game toneIndigo
class node_obody,node_flick toneTeal
```

## Components

### Outfit runtime

- [SKSE plugin](https://github.com/maartenharms/fitting-room/blob/main/src/plugin.cpp): `src/plugin.cpp`
- [Outfit session](https://github.com/maartenharms/fitting-room/blob/main/src/OutfitSession.cpp): `src/OutfitSession.cpp`
- [Visual equipment](https://github.com/maartenharms/fitting-room/blob/main/src/Requip.cpp): `src/Requip.cpp`
- [Saved data](https://github.com/maartenharms/fitting-room/blob/main/src/Persistence.cpp): `src/Persistence.cpp`

### Editor and previews

- [Outfit editor](https://github.com/maartenharms/fitting-room/blob/main/src/EditorWindow.cpp): `src/EditorWindow.cpp`
- [Preview cache](https://github.com/maartenharms/fitting-room/blob/main/src/PreviewCache.cpp): `src/PreviewCache.cpp`
- [Mesh extraction](https://github.com/maartenharms/fitting-room/blob/main/src/MeshExtractor.cpp): `src/MeshExtractor.cpp`
- [Mannequin scenes](https://github.com/maartenharms/fitting-room/blob/main/src/Mannequin.cpp): `src/Mannequin.cpp`
- [Preset browser](https://github.com/maartenharms/fitting-room/blob/main/src/PresetBrowse.cpp): `src/PresetBrowse.cpp`
- [Profiles](https://github.com/maartenharms/fitting-room/blob/main/src/ProfilesUI.cpp): `src/ProfilesUI.cpp`

### Rules and dyes

- [Rule editor](https://github.com/maartenharms/fitting-room/blob/main/src/RulesUI.cpp): `src/RulesUI.cpp`
- [Rule engine](https://github.com/maartenharms/fitting-room/blob/main/src/RuleEngine.cpp): `src/RuleEngine.cpp`
- [Rule data](https://github.com/maartenharms/fitting-room/blob/main/src/RuleStore.cpp): `src/RuleStore.cpp`
- [World state](https://github.com/maartenharms/fitting-room/blob/main/src/WorldWatch.cpp): `src/WorldWatch.cpp`
- [Dye editor](https://github.com/maartenharms/fitting-room/blob/main/src/DyeGrid.cpp): `src/DyeGrid.cpp`
- [Dye unlocks](https://github.com/maartenharms/fitting-room/blob/main/src/DyeUnlocks.cpp): `src/DyeUnlocks.cpp`

### Appearance tools

- [Overlays](https://github.com/maartenharms/fitting-room/blob/main/src/OverlaysUI.cpp): `src/OverlaysUI.cpp`
- [Body morphs](https://github.com/maartenharms/fitting-room/blob/main/src/BodyMorphData.cpp): `src/BodyMorphData.cpp`
- [Appearance hooks](https://github.com/maartenharms/fitting-room/blob/main/src/BipedHooks.cpp): `src/BipedHooks.cpp`

### Other components

- **Player**
- **Skyrim**
- [OBody](https://github.com/maartenharms/fitting-room/blob/main/extern/OBody_API.h): `extern/OBody_API.h`
- [FLICK framework](https://github.com/maartenharms/fitting-room/blob/main/extern/FUCK_API.h): `extern/FUCK_API.h`

## Connections

- Player → SKSE plugin: uses
- SKSE plugin → Outfit editor: opens
- Outfit editor → Outfit session: edits
- Outfit session → Saved data: saves
- Outfit session → Visual equipment: selects look
- Visual equipment → Skyrim: shows over gear
- Skyrim → Visual equipment: retains real gear
- Outfit editor → Rule editor: configures
- Rule editor → Rule data: stores rules
- World state → Rule engine: provides state
- Rule engine → Rule data: evaluates rules
- Outfit editor → Dye editor: customizes dyes
- Dye editor → Dye unlocks: checks unlocks
- Outfit editor → Overlays: edits
- Outfit editor → Preview cache: requests scene
- Preview cache → Mesh extraction: extracts meshes
- Preview cache → Mannequin scenes: composes scene
- Preview cache → Body morphs: reads morph source
- Outfit editor → Preset browser: browses
- Outfit editor → Profiles: manages profiles
- Appearance hooks → Skyrim: updates appearance
- Outfit editor → FLICK framework: draws UI through
- Body morphs → OBody: integrates optionally
