# xiv-venue-manager/xvm-plugin architecture

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

- Interactive diagram: https://gitdiagram.com/xiv-venue-manager/xvm-plugin
- Repository: https://github.com/xiv-venue-manager/xvm-plugin

## Overview

XIV Venue Manager Sync is a Dalamud plugin for tracking patrons at FFXIV venues and syncing venue operations with an XIVVenueManager server. The main workflow starts with in-game location and patron events, updates venue-specific guest state, and can report visits to the server; users also manage venues, log sales, and clock shifts through the plugin UI or commands. The graph includes these documented product branches and the shared API and persistence layers. Some tab and event wiring is based on README capabilities; unsampled implementation details are not asserted.

Main entry points: [`VenueManager/Windows/MainWindow.cs`](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Windows/MainWindow.cs) (Main window), [`VenueManager/Plugin.cs`](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Plugin.cs) (Plugin runtime), [`VenueManager/XIVAppApiClient.cs`](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppApiClient.cs) (API client), [`VenueManager/UI/Tabs/SettingsTab.cs`](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/SettingsTab.cs) (Settings tab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin entry"]
  node_plugin["Plugin runtime<br/>[Plugin.cs]"]
  node_mainwin["Main window<br/>[MainWindow.cs]"]
  node_commands["Slash commands<br/>[Plugin.cs]"]
end

subgraph group_tracking["Venue tracking"]
  node_guests["Guest tracking<br/>[GuestList.cs]"]
  node_presence["Event presence"]
  node_guesttab["Guests tab<br/>[GuestsTab.cs]"]
  node_guestlog["Guest log tab<br/>[GuestLogTab.cs]"]
  node_venues["Venue registry<br/>[VenueList.cs]"]
  node_venuestab["Venues tab<br/>[VenuesTab.cs]"]
  node_sound["Alert sounds<br/>[Sound.cs]"]
  node_lifestream["Lifestream IPC<br/>[LifestreamIpc.cs]"]
end

subgraph group_operations["Venue operations"]
  node_sales["Sales tab<br/>[SalesTab.cs]"]
  node_shifts["Shifts tab<br/>[ShiftsTab.cs]"]
  node_inventory["Inventory tab<br/>[InventoryTab.cs]"]
  node_rooms["Rooms tab<br/>[RoomsTab.cs]"]
  node_settings["Settings tab<br/>[SettingsTab.cs]"]
end

subgraph group_integration["Server integration"]
  node_client["API client<br/>[XIVAppApiClient.cs]"]
  node_venueapi["Venue API<br/>[XIVAppVenueApi.cs]"]
  node_patronapi["Patron API<br/>[XIVAppPatronApi.cs]"]
  node_shiftapi["Shift API<br/>[XIVAppShiftApi.cs]"]
end

subgraph group_state["Local state"]
  node_config[("Configuration<br/>[Configuration.cs]")]
  node_store["File store<br/>[FileStore.cs]"]
  node_state["Plugin state<br/>[PluginState.cs]"]
end

node_player(("Player"))
node_game["FFXIV game"]
node_server["XIVVenueManager"]

node_player -->|"issues commands"| node_commands
node_game -->|"reports events"| node_plugin
node_commands -->|"dispatches"| node_plugin
node_plugin -->|"opens window"| node_mainwin
node_mainwin -->|"shows tab"| node_guesttab
node_mainwin -->|"shows tab"| node_guestlog
node_mainwin -->|"shows tab"| node_venuestab
node_mainwin -->|"shows tab"| node_sales
node_mainwin -->|"shows tab"| node_shifts
node_mainwin -->|"shows tab"| node_inventory
node_mainwin -->|"shows tab"| node_rooms
node_mainwin -->|"shows tab"| node_settings
node_plugin -->|"updates location"| node_state
node_plugin -->|"updates visits"| node_guests
node_plugin -->|"checks event"| node_presence
node_plugin -->|"plays alerts"| node_sound
node_plugin -->|"syncs visits"| node_patronapi
node_plugin -->|"fetches venue data"| node_venueapi
node_commands -->|"clocks shifts"| node_shiftapi
node_sales -.->|"logs transactions"| node_patronapi
node_shifts -.->|"manages shifts"| node_shiftapi
node_settings -->|"configures sync"| node_client
node_settings -->|"loads venue data"| node_venueapi
node_client -->|"sends HTTP requests"| node_server
node_venueapi -->|"uses HTTP helpers"| node_client
node_patronapi -->|"uses HTTP helpers"| node_client
node_shiftapi -->|"uses HTTP helpers"| node_client
node_venuestab -->|"manages venues"| node_venues
node_venuestab -->|"requests teleport"| node_lifestream
node_guests -.->|"persists guest data"| node_store
node_venues -.->|"persists venues"| node_store
node_config -.->|"persists settings"| node_store
node_settings -->|"saves preferences"| node_config

click node_plugin "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Plugin.cs"
click node_mainwin "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Windows/MainWindow.cs"
click node_commands "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Plugin.cs"
click node_guests "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/GuestList.cs"
click node_presence "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/EventPresenceCache.cs"
click node_guesttab "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/GuestsTab.cs"
click node_guestlog "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/GuestLogTab.cs"
click node_venues "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/VenueList.cs"
click node_venuestab "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/VenuesTab.cs"
click node_sales "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/SalesTab.cs"
click node_shifts "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/ShiftsTab.cs"
click node_inventory "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/InventoryTab.cs"
click node_rooms "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/RoomsTab.cs"
click node_settings "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/SettingsTab.cs"
click node_client "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppApiClient.cs"
click node_venueapi "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppVenueApi.cs"
click node_patronapi "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppPatronApi.cs"
click node_shiftapi "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppShiftApi.cs"
click node_config "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Configuration.cs"
click node_store "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Utils/FileStore.cs"
click node_state "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/PluginState.cs"
click node_sound "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Sound.cs"
click node_lifestream "https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/LifestreamIpc.cs"

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_mainwin,node_commands toneBlue
class node_guests,node_presence,node_guesttab,node_guestlog,node_venues,node_venuestab,node_sound,node_lifestream toneAmber
class node_sales,node_shifts,node_inventory,node_rooms,node_settings toneMint
class node_client,node_venueapi,node_patronapi,node_shiftapi toneRose
class node_config,node_store,node_state,node_player,node_game,node_server toneIndigo
```

## Components

### Plugin entry

- [Plugin runtime](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Plugin.cs): `VenueManager/Plugin.cs`
- [Main window](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Windows/MainWindow.cs): `VenueManager/Windows/MainWindow.cs`
- [Slash commands](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Plugin.cs): `VenueManager/Plugin.cs`

### Venue tracking

- [Guest tracking](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/GuestList.cs): `VenueManager/GuestList.cs`
- [Event presence](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/EventPresenceCache.cs): `VenueManager/EventPresenceCache.cs`
- [Guests tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/GuestsTab.cs): `VenueManager/UI/Tabs/GuestsTab.cs`
- [Guest log tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/GuestLogTab.cs): `VenueManager/UI/Tabs/GuestLogTab.cs`
- [Venue registry](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/VenueList.cs): `VenueManager/VenueList.cs`
- [Venues tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/VenuesTab.cs): `VenueManager/UI/Tabs/VenuesTab.cs`
- [Alert sounds](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Sound.cs): `VenueManager/Sound.cs`
- [Lifestream IPC](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/LifestreamIpc.cs): `VenueManager/LifestreamIpc.cs`

### Venue operations

- [Sales tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/SalesTab.cs): `VenueManager/UI/Tabs/SalesTab.cs`
- [Shifts tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/ShiftsTab.cs): `VenueManager/UI/Tabs/ShiftsTab.cs`
- [Inventory tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/InventoryTab.cs): `VenueManager/UI/Tabs/InventoryTab.cs`
- [Rooms tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/RoomsTab.cs): `VenueManager/UI/Tabs/RoomsTab.cs`
- [Settings tab](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/UI/Tabs/SettingsTab.cs): `VenueManager/UI/Tabs/SettingsTab.cs`

### Server integration

- [API client](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppApiClient.cs): `VenueManager/XIVAppApiClient.cs`
- [Venue API](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppVenueApi.cs): `VenueManager/XIVAppVenueApi.cs`
- [Patron API](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppPatronApi.cs): `VenueManager/XIVAppPatronApi.cs`
- [Shift API](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/XIVAppShiftApi.cs): `VenueManager/XIVAppShiftApi.cs`

### Local state

- [Configuration](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Configuration.cs): `VenueManager/Configuration.cs`
- [File store](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/Utils/FileStore.cs): `VenueManager/Utils/FileStore.cs`
- [Plugin state](https://github.com/xiv-venue-manager/xvm-plugin/blob/master/VenueManager/PluginState.cs): `VenueManager/PluginState.cs`

### Other components

- **Player**
- **FFXIV game**
- **XIVVenueManager**

## Connections

- Player → Slash commands: issues commands
- FFXIV game → Plugin runtime: reports events
- Slash commands → Plugin runtime: dispatches
- Plugin runtime → Main window: opens window
- Main window → Guests tab: shows tab
- Main window → Guest log tab: shows tab
- Main window → Venues tab: shows tab
- Main window → Sales tab: shows tab
- Main window → Shifts tab: shows tab
- Main window → Inventory tab: shows tab
- Main window → Rooms tab: shows tab
- Main window → Settings tab: shows tab
- Plugin runtime → Plugin state: updates location
- Plugin runtime → Guest tracking: updates visits
- Plugin runtime → Event presence: checks event
- Plugin runtime → Alert sounds: plays alerts
- Plugin runtime → Patron API: syncs visits
- Plugin runtime → Venue API: fetches venue data
- Slash commands → Shift API: clocks shifts
- Sales tab → Patron API: logs transactions
- Shifts tab → Shift API: manages shifts
- Settings tab → API client: configures sync
- Settings tab → Venue API: loads venue data
- API client → XIVVenueManager: sends HTTP requests
- Venue API → API client: uses HTTP helpers
- Patron API → API client: uses HTTP helpers
- Shift API → API client: uses HTTP helpers
- Venues tab → Venue registry: manages venues
- Venues tab → Lifestream IPC: requests teleport
- Guest tracking → File store: persists guest data
- Venue registry → File store: persists venues
- Configuration → File store: persists settings
- Settings tab → Configuration: saves preferences
