# unluckylust/ntemm architecture

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

- Interactive diagram: https://gitdiagram.com/unluckylust/ntemm
- Repository: https://github.com/unluckylust/ntemm

## Overview

NTE Mod Manager is a Tauri desktop app for managing Neverness to Everness mods. Users configure and validate a Global, CN, or TW game install, import and organize PAK/ASI mods, then stage and apply enablement changes; settings also manage the loader, and the home screen exposes bundled mod toggles and HUD/UI scale tools. GameBanana browsing is a separate capability. The frontend hook coordinates mod operations through Tauri commands into Rust game and mod subsystems. Evidence is limited to the excerpts and README; unsampled subsystems are included where documented, but uncertain internal calls are omitted.

Main entry points: [`src/hooks/useModManager.ts`](https://github.com/unluckylust/ntemm/blob/main/src/hooks/useModManager.ts) (Mod workflow), [`src/App.tsx`](https://github.com/unluckylust/ntemm/blob/main/src/App.tsx) (Page router), [`src/pages/Home.tsx`](https://github.com/unluckylust/ntemm/blob/main/src/pages/Home.tsx) (Mod home), [`src/lib/dialog.ts`](https://github.com/unluckylust/ntemm/blob/main/src/lib/dialog.ts) (Dialog coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Desktop shell"]
  node_app["Page router<br/>[App.tsx]"]
  node_popup["Popup window<br/>[PopupWindow.tsx]"]
  node_dialog["Dialog coordinator<br/>[dialog.ts]"]
end

subgraph group_management["Mod management"]
  node_home["Mod home<br/>[Home.tsx]"]
  node_manager["Mod workflow<br/>[useModManager.ts]"]
  node_modtypes["Mod records<br/>[modManager.ts]"]
  node_modstorage[("Preferences store<br/>[modStorage.ts]")]
  node_categories["Categories and status<br/>[modCategories.ts]"]
  node_commands["Tauri command bridge"]
  node_importer["Mod import<br/>[import.rs]"]
  node_modmanage["Install management<br/>[manage.rs]"]
  node_foldericons["Folder icons<br/>[folder_icon.rs]"]
end

subgraph group_game["Game and loader"]
  node_settings["Settings<br/>[Settings.tsx]"]
  node_loaderprefs["Loader preferences"]
  node_gamecheck["Game detection<br/>[game.rs]"]
  node_gameengine["Game configuration<br/>[game_engine.rs]"]
  node_loader["Loader operations<br/>[loader.rs]"]
end

subgraph group_tools["Integrated tools"]
  node_anticensor["Anticensor toggle<br/>[anticensor.rs]"]
  node_uimods["UI mod tools<br/>[ui_mods.rs]"]
end

subgraph group_discovery["Mod discovery"]
  node_gamebanana["GameBanana browser<br/>[GameBanana.tsx]"]
  node_gbapi["GameBanana API<br/>[api.rs]"]
end

node_user(("Player"))
node_tauri{{"Tauri runtime"}}
node_gamefiles[("Game files")]
node_gamebanana_service{{"GameBanana"}}

node_user -->|"opens"| node_app
node_app -->|"routes"| node_home
node_app -->|"routes"| node_settings
node_app -->|"routes"| node_gamebanana
node_home -->|"uses"| node_manager
node_settings -->|"invokes"| node_tauri
node_settings -->|"reads/writes"| node_loaderprefs
node_manager -->|"invokes"| node_commands
node_manager -->|"reads/writes"| node_modstorage
node_manager -->|"reads"| node_loaderprefs
node_manager -->|"uses"| node_categories
node_commands -->|"invokes"| node_tauri
node_tauri -.->|"dispatches"| node_importer
node_tauri -.->|"dispatches"| node_modmanage
node_tauri -->|"dispatches"| node_gamecheck
node_tauri -->|"dispatches"| node_loader
node_importer -->|"saves icons"| node_foldericons
node_modmanage -.->|"installs mods"| node_gamefiles
node_gamecheck -.->|"checks"| node_gamefiles
node_gameengine -->|"uses detection"| node_gamecheck
node_loader -.->|"manages loader"| node_gamefiles
node_home -.->|"offers toggle"| node_anticensor
node_home -.->|"offers tools"| node_uimods
node_gamebanana -.->|"requests data"| node_gbapi
node_gbapi -.->|"queries"| node_gamebanana_service
node_manager -->|"requests dialogs"| node_dialog
node_dialog -->|"opens"| node_popup
node_popup -->|"returns result"| node_dialog
node_dialog -->|"invokes sound"| node_tauri

click node_app "https://github.com/unluckylust/ntemm/blob/main/src/App.tsx"
click node_home "https://github.com/unluckylust/ntemm/blob/main/src/pages/Home.tsx"
click node_settings "https://github.com/unluckylust/ntemm/blob/main/src/pages/Settings.tsx"
click node_manager "https://github.com/unluckylust/ntemm/blob/main/src/hooks/useModManager.ts"
click node_modtypes "https://github.com/unluckylust/ntemm/blob/main/src/types/modManager.ts"
click node_modstorage "https://github.com/unluckylust/ntemm/blob/main/src/helpers/modStorage.ts"
click node_categories "https://github.com/unluckylust/ntemm/blob/main/src/helpers/modCategories.ts"
click node_loaderprefs "https://github.com/unluckylust/ntemm/blob/main/src/helpers/loaderProxySettings.ts"
click node_commands "https://github.com/unluckylust/ntemm/blob/main/src/helpers/tauriModCommands.ts"
click node_importer "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/import.rs"
click node_modmanage "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/manage.rs"
click node_foldericons "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/folder_icon.rs"
click node_gamecheck "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/game.rs"
click node_gameengine "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/game_engine.rs"
click node_loader "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/loader.rs"
click node_anticensor "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/anticensor.rs"
click node_uimods "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/ui_mods.rs"
click node_gamebanana "https://github.com/unluckylust/ntemm/blob/main/src/pages/GameBanana.tsx"
click node_gbapi "https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/gamebanana/api.rs"
click node_popup "https://github.com/unluckylust/ntemm/blob/main/src/components/PopupWindow.tsx"
click node_dialog "https://github.com/unluckylust/ntemm/blob/main/src/lib/dialog.ts"

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_app,node_popup,node_dialog toneBlue
class node_home,node_manager,node_modtypes,node_modstorage,node_categories,node_commands,node_importer,node_modmanage,node_foldericons,node_gamefiles toneAmber
class node_settings,node_loaderprefs,node_gamecheck,node_gameengine,node_loader toneMint
class node_anticensor,node_uimods toneRose
class node_gamebanana,node_gbapi,node_user,node_tauri,node_gamebanana_service toneIndigo
```

## Components

### Desktop shell

- [Page router](https://github.com/unluckylust/ntemm/blob/main/src/App.tsx): `src/App.tsx`
- [Popup window](https://github.com/unluckylust/ntemm/blob/main/src/components/PopupWindow.tsx): `src/components/PopupWindow.tsx`
- [Dialog coordinator](https://github.com/unluckylust/ntemm/blob/main/src/lib/dialog.ts): `src/lib/dialog.ts`

### Mod management

- [Mod home](https://github.com/unluckylust/ntemm/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Mod workflow](https://github.com/unluckylust/ntemm/blob/main/src/hooks/useModManager.ts): `src/hooks/useModManager.ts`
- [Mod records](https://github.com/unluckylust/ntemm/blob/main/src/types/modManager.ts): `src/types/modManager.ts`
- [Preferences store](https://github.com/unluckylust/ntemm/blob/main/src/helpers/modStorage.ts): `src/helpers/modStorage.ts`
- [Categories and status](https://github.com/unluckylust/ntemm/blob/main/src/helpers/modCategories.ts): `src/helpers/modCategories.ts`
- [Tauri command bridge](https://github.com/unluckylust/ntemm/blob/main/src/helpers/tauriModCommands.ts): `src/helpers/tauriModCommands.ts`
- [Mod import](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/import.rs): `src-tauri/src/mods/import.rs`
- [Install management](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/manage.rs): `src-tauri/src/mods/manage.rs`
- [Folder icons](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/folder_icon.rs): `src-tauri/src/mods/folder_icon.rs`

### Game and loader

- [Settings](https://github.com/unluckylust/ntemm/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [Loader preferences](https://github.com/unluckylust/ntemm/blob/main/src/helpers/loaderProxySettings.ts): `src/helpers/loaderProxySettings.ts`
- [Game detection](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/game.rs): `src-tauri/src/game/game.rs`
- [Game configuration](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/game_engine.rs): `src-tauri/src/game/game_engine.rs`
- [Loader operations](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/game/loader.rs): `src-tauri/src/game/loader.rs`

### Integrated tools

- [Anticensor toggle](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/anticensor.rs): `src-tauri/src/mods/anticensor.rs`
- [UI mod tools](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/mods/ui_mods.rs): `src-tauri/src/mods/ui_mods.rs`

### Mod discovery

- [GameBanana browser](https://github.com/unluckylust/ntemm/blob/main/src/pages/GameBanana.tsx): `src/pages/GameBanana.tsx`
- [GameBanana API](https://github.com/unluckylust/ntemm/blob/main/src-tauri/src/gamebanana/api.rs): `src-tauri/src/gamebanana/api.rs`

### Other components

- **Player**
- **Tauri runtime**
- **Game files**
- **GameBanana**

## Connections

- Player → Page router: opens (evidence: `src/App.tsx`)
- Page router → Mod home: routes (evidence: `src/App.tsx`)
- Page router → Settings: routes (evidence: `src/App.tsx`)
- Page router → GameBanana browser: routes (evidence: `src/App.tsx`)
- Mod home → Mod workflow: uses (evidence: `src/pages/Home.tsx`)
- Settings → Tauri runtime: invokes (evidence: `src/pages/Settings.tsx`)
- Settings → Loader preferences: reads/writes (evidence: `src/pages/Settings.tsx`)
- Mod workflow → Tauri command bridge: invokes (evidence: `src/hooks/useModManager.ts`)
- Mod workflow → Preferences store: reads/writes (evidence: `src/hooks/useModManager.ts`)
- Mod workflow → Loader preferences: reads (evidence: `src/hooks/useModManager.ts`)
- Mod workflow → Categories and status: uses (evidence: `src/hooks/useModManager.ts`)
- Tauri command bridge → Tauri runtime: invokes
- Tauri runtime → Mod import: dispatches
- Tauri runtime → Install management: dispatches
- Tauri runtime → Game detection: dispatches
- Tauri runtime → Loader operations: dispatches
- Mod import → Folder icons: saves icons (evidence: `src-tauri/src/mods/import.rs`)
- Install management → Game files: installs mods
- Game detection → Game files: checks
- Game configuration → Game detection: uses detection (evidence: `src-tauri/src/game/game_engine.rs`)
- Loader operations → Game files: manages loader
- Mod home → Anticensor toggle: offers toggle
- Mod home → UI mod tools: offers tools
- GameBanana browser → GameBanana API: requests data
- GameBanana API → GameBanana: queries
- Mod workflow → Dialog coordinator: requests dialogs (evidence: `src/hooks/useModManager.ts`)
- Dialog coordinator → Popup window: opens (evidence: `src/lib/dialog.ts`)
- Popup window → Dialog coordinator: returns result (evidence: `src/lib/dialog.ts`)
- Dialog coordinator → Tauri runtime: invokes sound (evidence: `src/lib/dialog.ts`)
