# moonheart/mementomori-helper architecture

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

- Interactive diagram: https://gitdiagram.com/moonheart/mementomori-helper
- Repository: https://github.com/moonheart/mementomori-helper

## Overview

MementoMori 游戏助手 is a multi-account game companion exposed as a web UI, with a MAUI client also present. Users configure accounts, log in, then browse game data or run quick actions and scheduled automation; requests pass through account-specific functions and the network manager to the game services. The README documents broad game-feature coverage, including battles, characters, items, shops, summons, guilds, and trials. Some feature implementations are unsampled, so those branches are represented at their documented subsystem level; edges are limited to documented or indexed relationships.

Main entry points: [`MementoMori/Funcs/Common.cs`](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Common.cs) (Game actions), [`MementoMori/MementoNetworkManager.cs`](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/MementoNetworkManager.cs) (Network manager), [`MementoMori/AccountManager.cs`](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/AccountManager.cs) (Account manager), [`MementoMori/Jobs/TimeZoneAwareJobRegister.cs`](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Jobs/TimeZoneAwareJobRegister.cs) (Scheduled jobs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client surfaces"]
  node_web["Web UI<br/>[Program.cs]"]
  node_maui["MAUI client<br/>[Main.cs]"]
end

subgraph group_account["Accounts and automation"]
  node_accounts["Account manager<br/>[AccountManager.cs]"]
  node_authconfig["Account settings<br/>[AuthOption.cs]"]
  node_gameconfig["Automation settings<br/>[GameConfig.cs]"]
  node_jobs["Scheduled jobs"]
end

subgraph group_gameplay["Game operations"]
  node_gamefuncs["Game actions<br/>[Common.cs]"]
  node_auth["Login flow<br/>[Auth.cs]"]
  node_battle["Battle automation<br/>[Battle.cs]"]
  node_dungeon["Dungeon battles<br/>[DungeonBattle.cs]"]
  node_featureops["Game feature APIs"]
  node_battlelogs["Battle history"]
end

subgraph group_transport["Networking and data"]
  node_network["Network manager"]
  node_pipeline["Request interceptors"]
  node_interceptor["Battle log interceptor"]
  node_api["Game API client<br/>[BaseApiClient.cs]"]
  node_realtime["Realtime client"]
end

node_user(("User"))
node_game{{"Game services"}}

node_user -->|"uses"| node_web
node_user -.->|"runs"| node_maui
node_web -->|"configures accounts"| node_accounts
node_accounts -->|"reads settings"| node_authconfig
node_accounts -->|"creates functions"| node_gamefuncs
node_gamefuncs -->|"sends requests"| node_network
node_auth -->|"authenticates"| node_network
node_auth -->|"registers jobs"| node_jobs
node_jobs -->|"runs actions"| node_gamefuncs
node_gameconfig -->|"configures schedules"| node_jobs
node_gamefuncs -.->|"runs battles"| node_battle
node_gamefuncs -->|"runs dungeons"| node_dungeon
node_gamefuncs -->|"offers features"| node_featureops
node_battle -->|"records results"| node_battlelogs
node_network -->|"executes through"| node_pipeline
node_pipeline -.->|"dispatches requests"| node_interceptor
node_network -.->|"sends API calls"| node_api
node_network -->|"requests game data"| node_game
node_realtime -.->|"uses realtime service"| node_game

click node_web "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.WebUI/Program.cs"
click node_maui "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Maui/Platforms/Tizen/Main.cs"
click node_accounts "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/AccountManager.cs"
click node_authconfig "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Option/AuthOption.cs"
click node_gameconfig "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Option/GameConfig.cs"
click node_jobs "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Jobs/TimeZoneAwareJobRegister.cs"
click node_gamefuncs "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Common.cs"
click node_auth "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Auth.cs"
click node_battle "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Battle.cs"
click node_dungeon "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/DungeonBattle.cs"
click node_featureops "https://github.com/moonheart/mementomori-helper/tree/master/MementoMori/Funcs"
click node_battlelogs "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/BattleLogManager.cs"
click node_network "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/MementoNetworkManager.cs"
click node_pipeline "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/NetworkInterceptors/NetworkInterceptorPipeline.cs"
click node_interceptor "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/NetworkInterceptors/BattleLogInterceptor.cs"
click node_api "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Ortega/Network/Api/Client/BaseApiClient.cs"
click node_realtime "https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Ortega/Network/MagicOnion/Client/OrtegaMagicOnionClient.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_web,node_maui,node_user toneBlue
class node_accounts,node_authconfig,node_gameconfig,node_jobs toneAmber
class node_gamefuncs,node_auth,node_battle,node_dungeon,node_featureops,node_battlelogs toneMint
class node_network,node_pipeline,node_interceptor,node_api,node_realtime toneRose
class node_game toneIndigo
```

## Components

### Client surfaces

- [Web UI](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.WebUI/Program.cs): `MementoMori.WebUI/Program.cs`
- [MAUI client](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Maui/Platforms/Tizen/Main.cs): `MementoMori.Maui/Platforms/Tizen/Main.cs`

### Accounts and automation

- [Account manager](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/AccountManager.cs): `MementoMori/AccountManager.cs`
- [Account settings](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Option/AuthOption.cs): `MementoMori/Option/AuthOption.cs`
- [Automation settings](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Option/GameConfig.cs): `MementoMori/Option/GameConfig.cs`
- [Scheduled jobs](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Jobs/TimeZoneAwareJobRegister.cs): `MementoMori/Jobs/TimeZoneAwareJobRegister.cs`

### Game operations

- [Game actions](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Common.cs): `MementoMori/Funcs/Common.cs`
- [Login flow](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Auth.cs): `MementoMori/Funcs/Auth.cs`
- [Battle automation](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/Battle.cs): `MementoMori/Funcs/Battle.cs`
- [Dungeon battles](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/Funcs/DungeonBattle.cs): `MementoMori/Funcs/DungeonBattle.cs`
- [Game feature APIs](https://github.com/moonheart/mementomori-helper/tree/master/MementoMori/Funcs): `MementoMori/Funcs`
- [Battle history](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/BattleLogManager.cs): `MementoMori/BattleLogManager.cs`

### Networking and data

- [Network manager](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/MementoNetworkManager.cs): `MementoMori/MementoNetworkManager.cs`
- [Request interceptors](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/NetworkInterceptors/NetworkInterceptorPipeline.cs): `MementoMori/NetworkInterceptors/NetworkInterceptorPipeline.cs`
- [Battle log interceptor](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori/NetworkInterceptors/BattleLogInterceptor.cs): `MementoMori/NetworkInterceptors/BattleLogInterceptor.cs`
- [Game API client](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Ortega/Network/Api/Client/BaseApiClient.cs): `MementoMori.Ortega/Network/Api/Client/BaseApiClient.cs`
- [Realtime client](https://github.com/moonheart/mementomori-helper/blob/master/MementoMori.Ortega/Network/MagicOnion/Client/OrtegaMagicOnionClient.cs): `MementoMori.Ortega/Network/MagicOnion/Client/OrtegaMagicOnionClient.cs`

### Other components

- **User**
- **Game services**

## Connections

- User → Web UI: uses
- User → MAUI client: runs
- Web UI → Account manager: configures accounts (evidence: `MementoMori.WebUI/Program.cs`)
- Account manager → Account settings: reads settings (evidence: `MementoMori/AccountManager.cs`)
- Account manager → Game actions: creates functions (evidence: `MementoMori/AccountManager.cs`)
- Game actions → Network manager: sends requests (evidence: `MementoMori/Funcs/Common.cs`)
- Login flow → Network manager: authenticates (evidence: `MementoMori/Funcs/Auth.cs`)
- Login flow → Scheduled jobs: registers jobs (evidence: `MementoMori/Funcs/Auth.cs`)
- Scheduled jobs → Game actions: runs actions (evidence: `MementoMori/Funcs/Common.cs`)
- Automation settings → Scheduled jobs: configures schedules
- Game actions → Battle automation: runs battles
- Game actions → Dungeon battles: runs dungeons (evidence: `MementoMori/Funcs/Common.cs`)
- Game actions → Game feature APIs: offers features (evidence: `MementoMori/Funcs/Common.cs`)
- Battle automation → Battle history: records results (evidence: `MementoMori/BattleLogManager.cs`)
- Network manager → Request interceptors: executes through (evidence: `MementoMori/MementoNetworkManager.cs`)
- Request interceptors → Battle log interceptor: dispatches requests
- Network manager → Game API client: sends API calls
- Network manager → Game services: requests game data
- Realtime client → Game services: uses realtime service
