# napnapnapnap/nextdropexporter architecture

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

- Interactive diagram: https://gitdiagram.com/napnapnapnap/nextdropexporter
- Repository: https://github.com/napnapnapnap/nextdropexporter

## Overview

1. **Repository boundary**
   - This is a **World of Warcraft addon** named `NextDropExporter`, not a standalone app.
   - Its runtime boundary is the WoW 3.3.5a client: the addon reads character/game state from the game API, stores local addon settings, and emits a compact export string for an external website.

2. **Addon entry and load order**
   - `NextDropExporter.toc` is the root manifest that defines what Lua modules and libraries load into the WoW client.
   - The code is split into a small **core layer**, a set of **feature collectors**, and a **UI layer**. That separation is the main architectural boundary in the repo.

3. **Core layer**
   - `Core/NdCore.lua` appears to be the central bootstrap and shared runtime object.
   - `Core/NdLoading.lua` likely manages initialization/loading flow so modules only run when the game state is ready.
   - `Core/NdFunctions.lua` and `Core/Compat.lua` provide shared helpers and compatibility fixes for the older WotLK API.
   - `Core/NdAddonSettings.lua` handles addon-level configuration defaults and persistence hooks.

4. **State and persistence**
   - The addon uses **AceDB-3.0** for saved settings/state.
   - This means the architecture likely has a local persisted configuration store for user preferences, UI behavior, and possibly cached character metadata.
   - Persistence is client-side only; the export payload is generated from live game data plus local addon state.

5. **Feature collectors**
   - The `Features/` directory is the domain-data layer.
   - `Achievements.lua`, `Companions.lua`, `Professions.lua`, and `Talents.lua` collect specific character information from the WoW API.
   - `Exporter.lua` is the aggregation/serialization boundary that combines those feature outputs into the final export payload.

6. **Data categories captured**
   - Per the README, the addon collects:
     - achievements and criteria progress
     - professions
     - collections/companions
     - talents
     - stats, reputation, and armory-related character data
   - In architecture terms, the addon is a **character snapshot exporter**: it gathers several independent slices of the character profile and normalizes them into one compact payload.

7. **Export pipeline**
   - The likely flow is: **WoW API data → feature modules → exporter aggregator → compression/encoding → copyable string in UI**.
   - The presence of `LibCompress`, `LibDeflate`, and `LibBase64` indicates the export string is not raw JSON/text; it is compacted and encoded for transport.
   - `LibParse` suggests there is also a parsing/formatting component, likely used to structure or decode textual game data before export.

8. **User interface layer**
   - `UI/UI_MainFrame.lua` is the main window shell and tab container.
   - `UI/UI_Export.lua` is the export tab where the final string is shown for copying.
   - `UI/UI_MyCharacters.lua` and `UI/UI_CharacterStatus.lua` appear to present character list/status information.
   - `UI/UI_Utils.lua` contains reusable UI helpers and formatting utilities.
   - The UI is a thin presentation layer over the core/export logic; it should not own the data collection itself.

9. **User interaction model**
   - The addon exposes slash commands `/nd`, `/nextdrop`, and debug toggles `/nddebug`, `/nextdropdebug`.
   - This means the primary interaction path is in-game command-driven, with an optional minimap/button integration via `LibDBIcon-1.0`.
   - The interface is designed for a manual “open UI → copy export string” workflow rather than background syncing.

10. **Library dependencies and their architectural role**
   - `LibStub` and `CallbackHandler-1.0` support addon library registration/event patterns.
   - `AceDB-3.0` handles saved variables.
   - `LibDBIcon-1.0` adds a minimap launcher.
   - `LibCompress`, `LibDeflate`, and `LibBase64` provide the encoding stack for compact export strings.
   - These libraries materially affect the architecture because they replace custom persistence, callback, and compression code.

11. **External consumer**
   - The exported string is intended for `http://findmy.nextdrop.ovh/`, which is outside this repository.
   - So the repo’s output boundary is a single portable payload consumed by an external decoder/importer, not a direct API integration.

12. **What to diagram**
   - The most accurate architecture diagram would show:
     - WoW client runtime as the host
     - core bootstrap/loading and settings modules
     - feature collectors as parallel data sources
     - exporter as the aggregation/encoding stage
     - UI as the presentation/copy surface
     - AceDB and compression/base64 libraries as supporting infrastructure
     - external website as the downstream consumer of the export string

Main entry points: [`NextDropExporter/NextDropExporter.toc`](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/NextDropExporter.toc) (Addon TOC), [`NextDropExporter/Features/Exporter.lua`](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Exporter.lua) (Exporter), [`NextDropExporter/Core/NdCore.lua`](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdCore.lua) (Core), [`NextDropExporter/Core/NdLoading.lua`](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdLoading.lua) (Loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Runtime"]
  node_wow_client(("WoW Client<br/>host runtime"))
  node_nextdrop_site(("NextDrop Site<br/>external consumer"))
end

subgraph group_core["Core"]
  node_toc["Addon TOC<br/>manifest"]
  node_ndcore["Core<br/>bootstrap<br/>[NdCore.lua]"]
  node_ndloading["Loading<br/>init flow<br/>[NdLoading.lua]"]
  node_ndfunctions["Helpers<br/>shared utils<br/>[NdFunctions.lua]"]
  node_compat["Compat<br/>api shims<br/>[Compat.lua]"]
  node_settings[("Settings<br/>addon config")]
end

subgraph group_features["Features"]
  node_achievements["Achievements<br/>collector<br/>[Achievements.lua]"]
  node_companions["Companions<br/>collector<br/>[Companions.lua]"]
  node_professions["Professions<br/>collector<br/>[Professions.lua]"]
  node_talents["Talents<br/>collector<br/>[Talents.lua]"]
  node_exporter["Exporter<br/>aggregator<br/>[Exporter.lua]"]
end

subgraph group_ui["UI"]
  node_mainframe["Main Frame<br/>ui shell<br/>[UI_MainFrame.lua]"]
  node_export_ui["Export Tab<br/>ui view<br/>[UI_Export.lua]"]
  node_characters_ui["Characters<br/>ui view"]
  node_status_ui["Status<br/>ui view"]
  node_ui_utils["UI Utils<br/>ui helpers<br/>[UI_Utils.lua]"]
end

subgraph group_libs["Libraries"]
  node_acedb[("AceDB<br/>saved vars lib<br/>[AceDB-3.0.lua]")]
  node_callback["CallbackHandler<br/>event lib"]
  node_compress["Compress<br/>encoding lib<br/>[LibCompress.lua]"]
  node_deflate["Deflate<br/>encoding lib<br/>[LibDeflate.lua]"]
  node_base64["Base64<br/>encoding lib<br/>[LibBase64-1.0.lua]"]
  node_parse["Parse<br/>text lib<br/>[LibParse.lua]"]
  node_libstub["LibStub<br/>library loader<br/>[LibStub.lua]"]
end

node_wow_client -->|"loads"| node_toc
node_toc -->|"bootstraps"| node_ndcore
node_toc -->|"includes"| node_acedb
node_toc -->|"includes"| node_callback
node_toc -->|"includes"| node_compress
node_toc -->|"includes"| node_deflate
node_toc -->|"includes"| node_base64
node_toc -->|"includes"| node_parse
node_ndcore -->|"starts"| node_ndloading
node_ndcore -->|"uses"| node_ndfunctions
node_ndcore -->|"uses"| node_compat
node_ndcore -->|"initializes"| node_settings
node_settings -->|"persists"| node_acedb
node_ndloading -->|"enables"| node_achievements
node_ndloading -->|"enables"| node_companions
node_ndloading -->|"enables"| node_professions
node_ndloading -->|"enables"| node_talents
node_achievements -->|"feeds"| node_exporter
node_companions -->|"feeds"| node_exporter
node_professions -->|"feeds"| node_exporter
node_talents -->|"feeds"| node_exporter
node_exporter -->|"compresses"| node_compress
node_exporter -->|"deflates"| node_deflate
node_exporter -->|"encodes"| node_base64
node_exporter -->|"formats"| node_parse
node_mainframe -->|"hosts"| node_export_ui
node_mainframe -->|"hosts"| node_characters_ui
node_mainframe -->|"hosts"| node_status_ui
node_mainframe -->|"uses"| node_ui_utils
node_export_ui -->|"shows"| node_exporter
node_characters_ui -->|"reads"| node_settings
node_status_ui -->|"reads"| node_ndcore
node_wow_client -->|"runtime"| node_ndcore
node_exporter -->|"delivers"| node_nextdrop_site
node_toc -->|"loads"| node_mainframe
node_toc -->|"loads"| node_ndfunctions
node_toc -->|"loads"| node_ui_utils
node_libstub -->|"supports"| node_acedb

click node_toc "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/NextDropExporter.toc"
click node_ndcore "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdCore.lua"
click node_ndloading "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdLoading.lua"
click node_ndfunctions "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdFunctions.lua"
click node_compat "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/Compat.lua"
click node_settings "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdAddonSettings.lua"
click node_achievements "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Achievements.lua"
click node_companions "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Companions.lua"
click node_professions "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Professions.lua"
click node_talents "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Talents.lua"
click node_exporter "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Exporter.lua"
click node_mainframe "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_MainFrame.lua"
click node_export_ui "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_Export.lua"
click node_characters_ui "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_MyCharacters.lua"
click node_status_ui "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_CharacterStatus.lua"
click node_ui_utils "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_Utils.lua"
click node_acedb "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/AceDB-3.0/AceDB-3.0.lua"
click node_callback "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"
click node_compress "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibCompress/LibCompress.lua"
click node_deflate "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibDeflate/LibDeflate.lua"
click node_base64 "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibBase64-1.0/LibBase64-1.0.lua"
click node_parse "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibParse/LibParse.lua"
click node_libstub "https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibStub/LibStub.lua"

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_wow_client,node_nextdrop_site toneBlue
class node_toc,node_ndcore,node_ndloading,node_ndfunctions,node_compat,node_settings toneAmber
class node_achievements,node_companions,node_professions,node_talents,node_exporter toneMint
class node_mainframe,node_export_ui,node_characters_ui,node_status_ui,node_ui_utils toneRose
class node_acedb,node_callback,node_compress,node_deflate,node_base64,node_parse,node_libstub toneIndigo
```

## Components

### Runtime

WoW client and downstream consumer

- **WoW Client**: host runtime · World of Warcraft 3.3.5a host environment that provides game state and addon APIs
- **NextDrop Site**: external consumer · External website that consumes the exported payload

### Core

Bootstrap, loading, shared helpers, and settings

- [Addon TOC](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/NextDropExporter.toc): manifest · Root manifest that defines addon load order · `NextDropExporter/NextDropExporter.toc`
- [Core](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdCore.lua): bootstrap · Central addon runtime object and startup coordination · `NextDropExporter/Core/NdCore.lua`
- [Loading](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdLoading.lua): init flow · Initialization gating and load sequencing · `NextDropExporter/Core/NdLoading.lua`
- [Helpers](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdFunctions.lua): shared utils · Common addon helper functions · `NextDropExporter/Core/NdFunctions.lua`
- [Compat](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/Compat.lua): api shims · Compatibility fixes for older WotLK API behavior · `NextDropExporter/Core/Compat.lua`
- [Settings](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Core/NdAddonSettings.lua): addon config · Addon defaults and saved-variable integration · `NextDropExporter/Core/NdAddonSettings.lua`

### Features

Character data collectors and export aggregation

- [Achievements](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Achievements.lua): collector · Collects achievement and criteria progress · `NextDropExporter/Features/Achievements.lua`
- [Companions](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Companions.lua): collector · Collects pets and companion collection data · `NextDropExporter/Features/Companions.lua`
- [Professions](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Professions.lua): collector · Collects profession and crafting data · `NextDropExporter/Features/Professions.lua`
- [Talents](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Talents.lua): collector · Collects talent and specialization data · `NextDropExporter/Features/Talents.lua`
- [Exporter](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Features/Exporter.lua): aggregator · Combines feature snapshots into the final compact payload · `NextDropExporter/Features/Exporter.lua`

### UI

Main window and presentation layer

- [Main Frame](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_MainFrame.lua): ui shell · Primary window and tab container · `NextDropExporter/UI/UI_MainFrame.lua`
- [Export Tab](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_Export.lua): ui view · Displays the export string for copy/paste · `NextDropExporter/UI/UI_Export.lua`
- [Characters](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_MyCharacters.lua): ui view · Shows character list and status overview · `NextDropExporter/UI/UI_MyCharacters.lua`
- [Status](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_CharacterStatus.lua): ui view · Shows character readiness and state details · `NextDropExporter/UI/UI_CharacterStatus.lua`
- [UI Utils](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/UI/UI_Utils.lua): ui helpers · Reusable UI formatting and widget helpers · `NextDropExporter/UI/UI_Utils.lua`

### Libraries

Embedded third-party support libraries

- [AceDB](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/AceDB-3.0/AceDB-3.0.lua): saved vars lib · Persistent addon database layer · `NextDropExporter/Libs/AceDB-3.0/AceDB-3.0.lua`
- [CallbackHandler](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua): event lib · Callback and event dispatch support · `NextDropExporter/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua`
- [Compress](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibCompress/LibCompress.lua): encoding lib · Compression stage for export payloads · `NextDropExporter/Libs/LibCompress/LibCompress.lua`
- [Deflate](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibDeflate/LibDeflate.lua): encoding lib · Deflate compression and packing support · `NextDropExporter/Libs/LibDeflate/LibDeflate.lua`
- [Base64](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibBase64-1.0/LibBase64-1.0.lua): encoding lib · Base64 transport encoding for export strings · `NextDropExporter/Libs/LibBase64-1.0/LibBase64-1.0.lua`
- [Parse](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibParse/LibParse.lua): text lib · Text parsing and formatting support for game data · `NextDropExporter/Libs/LibParse/LibParse.lua`
- [LibStub](https://github.com/napnapnapnap/nextdropexporter/blob/main/NextDropExporter/Libs/LibStub/LibStub.lua): library loader · Shared library registration and lookup · `NextDropExporter/Libs/LibStub/LibStub.lua`

## Connections

- WoW Client → Addon TOC: loads · Client loads addon manifest and module list
- Addon TOC → Core: bootstraps · Manifest loads core runtime first
- Addon TOC → AceDB: includes · Manifest includes saved-variable library
- Addon TOC → CallbackHandler: includes · Manifest includes callback support library
- Addon TOC → Compress: includes · Manifest includes compression support library
- Addon TOC → Deflate: includes · Manifest includes deflate support library
- Addon TOC → Base64: includes · Manifest includes base64 support library
- Addon TOC → Parse: includes · Manifest includes parsing support library
- Core → Loading: starts · Core hands off to loading gate
- Core → Helpers: uses · Core shares common helpers
- Core → Compat: uses · Core applies compatibility shims
- Core → Settings: initializes · Core sets up addon settings storage
- Settings → AceDB: persists · Settings layer is backed by AceDB
- Loading → Achievements: enables · Loading gate activates data collectors when ready
- Loading → Companions: enables · Loading gate activates data collectors when ready
- Loading → Professions: enables · Loading gate activates data collectors when ready
- Loading → Talents: enables · Loading gate activates data collectors when ready
- Achievements → Exporter: feeds · Collector contributes snapshot data to exporter
- Companions → Exporter: feeds · Collector contributes snapshot data to exporter
- Professions → Exporter: feeds · Collector contributes snapshot data to exporter
- Talents → Exporter: feeds · Collector contributes snapshot data to exporter
- Exporter → Compress: compresses · Exporter compresses the assembled payload
- Exporter → Deflate: deflates · Exporter uses deflate packing in encoding pipeline
- Exporter → Base64: encodes · Exporter converts payload to copyable transport string
- Exporter → Parse: formats · Exporter may parse or normalize structured text inputs
- Main Frame → Export Tab: hosts · Main window contains export tab
- Main Frame → Characters: hosts · Main window contains character tab
- Main Frame → Status: hosts · Main window contains status tab
- Main Frame → UI Utils: uses · UI shell shares widget and formatting helpers
- Export Tab → Exporter: shows · Export tab displays generated payload
- Characters → Settings: reads · Character view uses stored preferences and state
- Status → Core: reads · Status view reads shared addon runtime state
- WoW Client → Core: runtime · Addon executes inside the WoW client runtime
- Exporter → NextDrop Site: delivers · Export string is consumed by the external website
- Addon TOC → Main Frame: loads · Manifest loads UI layer modules
- Addon TOC → Helpers: loads · Manifest loads shared helpers
- Addon TOC → UI Utils: loads · Manifest loads UI utilities
- LibStub → AceDB: supports · Shared library loader underpins embedded libraries
