# elvlin/exvius-offline architecture

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

- Interactive diagram: https://gitdiagram.com/elvlin/exvius-offline
- Repository: https://github.com/elvlin/exvius-offline

## Overview

Exvius Offline is an Android adaptation of Final Fantasy Brave Exvius: the user downloads game data once, then plays against a local synthetic game service. The graph follows setup into local play and highlights battle settlement, repeatable Lapis, summons, shops and special modes. The SOURCE INDEX shows imports and module references, but not every runtime dispatch; some domain connections are therefore omitted. README-described event browsing and solo raids are retained as capabilities, with their internal wiring left unspecified where it was not shown.

Main entry points: [`source/server/player_state.py`](https://github.com/elvlin/exvius-offline/blob/main/source/server/player_state.py) (Player state), [`source/server/ffbe_pipeline.py`](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_pipeline.py) (Reply pipeline), [`source/server/ffbe_battle.py`](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_battle.py) (Battle settlement), [`source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java`](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java) (Android game app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android client"]
  node_android_app["Android game app"]
  node_data_updates["Data downloads<br/>[DataUpdates.java]"]
  node_game_assets["Game assets<br/>[GameAssets.java]"]
  node_game_connection["Local connection"]
end

subgraph group_service["Local game service"]
  node_android_game["Python game adapter<br/>[android_game.py]"]
  node_capture_server["Request service<br/>[capture_server.py]"]
  node_pipeline["Reply pipeline<br/>[ffbe_pipeline.py]"]
end

subgraph group_gameplay["Gameplay domains"]
  node_gameplay["Game actions<br/>[exvius_actions.py]"]
  node_battle["Battle settlement<br/>[ffbe_battle.py]"]
  node_repeat["Repeat rewards<br/>[exvius_repeat.py]"]
  node_gacha["Summons<br/>[ffbe_gacha.py]"]
  node_shops["Shops and crafting"]
  node_modes["Special modes"]
  node_events["Event archive<br/>[event_archive.py]"]
  node_raid["Raid progress"]
end

subgraph group_state["Rules and state"]
  node_player_state[("Player state<br/>[player_state.py]")]
  node_server_state["Runtime state<br/>[ffbe_state.py]"]
end

subgraph group_content["Game content"]
  node_config["Game configuration<br/>[ffbe_config.py]"]
  node_data_paths["Data locations<br/>[data_paths.py]"]
end

node_player(("Player"))
node_github["GitHub data"]

node_player -->|"plays"| node_android_app
node_android_app -->|"checks updates"| node_data_updates
node_data_updates -->|"uses assets"| node_game_assets
node_github -->|"supplies downloads"| node_data_updates
node_android_app -->|"opens connection"| node_game_connection
node_game_connection -.->|"connects locally"| node_android_game
node_android_game -.->|"adapts requests"| node_capture_server
node_capture_server -->|"runs replies"| node_pipeline
node_pipeline -->|"dispatches actions"| node_gameplay
node_capture_server -->|"selects endpoints"| node_server_state
node_server_state -->|"holds player"| node_player_state
node_pipeline -->|"settles battles"| node_battle
node_pipeline -->|"reports runs"| node_repeat
node_pipeline -->|"applies shop use"| node_shops
node_gameplay -->|"uses battle rules"| node_battle
node_battle -->|"updates player"| node_player_state
node_repeat -->|"credits rewards"| node_player_state
node_gacha -->|"grants pulls"| node_player_state
node_shops -->|"mutates inventory"| node_player_state
node_modes -->|"reuses settlement"| node_battle
node_modes -->|"uses player"| node_player_state
node_raid -->|"tracks progress"| node_player_state
node_config -->|"resolves data"| node_data_paths
node_server_state -->|"loads paths"| node_data_paths

click node_android_app "https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java"
click node_data_updates "https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/DataUpdates.java"
click node_game_assets "https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/GameAssets.java"
click node_game_connection "https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/LocalGameConnection.java"
click node_android_game "https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/python/android_game.py"
click node_capture_server "https://github.com/elvlin/exvius-offline/blob/main/source/server/capture_server.py"
click node_pipeline "https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_pipeline.py"
click node_gameplay "https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions.py"
click node_battle "https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_battle.py"
click node_repeat "https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_repeat.py"
click node_gacha "https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_gacha.py"
click node_shops "https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions_shops.py"
click node_modes "https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions_modes.py"
click node_events "https://github.com/elvlin/exvius-offline/blob/main/source/server/event_archive.py"
click node_raid "https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_raid_progress.py"
click node_player_state "https://github.com/elvlin/exvius-offline/blob/main/source/server/player_state.py"
click node_server_state "https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_state.py"
click node_config "https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_config.py"
click node_data_paths "https://github.com/elvlin/exvius-offline/blob/main/source/server/data_paths.py"

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_android_app,node_data_updates,node_game_assets,node_game_connection toneBlue
class node_android_game,node_capture_server,node_pipeline toneAmber
class node_gameplay,node_battle,node_repeat,node_gacha,node_shops,node_modes,node_events,node_raid toneMint
class node_player_state,node_server_state toneRose
class node_config,node_data_paths,node_player,node_github toneIndigo
```

## Components

### Android client

- [Android game app](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java): `source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java`
- [Data downloads](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/DataUpdates.java): `source/memorial/android/src/main/java/com/exvius/local/DataUpdates.java`
- [Game assets](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/GameAssets.java): `source/memorial/android/src/main/java/com/exvius/local/GameAssets.java`
- [Local connection](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/java/com/exvius/local/LocalGameConnection.java): `source/memorial/android/src/main/java/com/exvius/local/LocalGameConnection.java`

### Local game service

- [Python game adapter](https://github.com/elvlin/exvius-offline/blob/main/source/memorial/android/src/main/python/android_game.py): `source/memorial/android/src/main/python/android_game.py`
- [Request service](https://github.com/elvlin/exvius-offline/blob/main/source/server/capture_server.py): `source/server/capture_server.py`
- [Reply pipeline](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_pipeline.py): `source/server/ffbe_pipeline.py`

### Gameplay domains

- [Game actions](https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions.py): `source/server/exvius_actions.py`
- [Battle settlement](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_battle.py): `source/server/ffbe_battle.py`
- [Repeat rewards](https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_repeat.py): `source/server/exvius_repeat.py`
- [Summons](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_gacha.py): `source/server/ffbe_gacha.py`
- [Shops and crafting](https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions_shops.py): `source/server/exvius_actions_shops.py`
- [Special modes](https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_actions_modes.py): `source/server/exvius_actions_modes.py`
- [Event archive](https://github.com/elvlin/exvius-offline/blob/main/source/server/event_archive.py): `source/server/event_archive.py`
- [Raid progress](https://github.com/elvlin/exvius-offline/blob/main/source/server/exvius_raid_progress.py): `source/server/exvius_raid_progress.py`

### Rules and state

- [Player state](https://github.com/elvlin/exvius-offline/blob/main/source/server/player_state.py): `source/server/player_state.py`
- [Runtime state](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_state.py): `source/server/ffbe_state.py`

### Game content

- [Game configuration](https://github.com/elvlin/exvius-offline/blob/main/source/server/ffbe_config.py): `source/server/ffbe_config.py`
- [Data locations](https://github.com/elvlin/exvius-offline/blob/main/source/server/data_paths.py): `source/server/data_paths.py`

### Other components

- **Player**
- **GitHub data**

## Connections

- Player → Android game app: plays (evidence: `README.md`)
- Android game app → Data downloads: checks updates (evidence: `source/memorial/android/src/main/java/com/exvius/local/DataUpdates.java`)
- Data downloads → Game assets: uses assets (evidence: `source/memorial/android/src/main/java/com/exvius/local/DataUpdates.java`)
- GitHub data → Data downloads: supplies downloads (evidence: `README.md`)
- Android game app → Local connection: opens connection (evidence: `source/memorial/android/src/main/java/com/exvius/local/LocalGameBridge.java`)
- Local connection → Python game adapter: connects locally
- Python game adapter → Request service: adapts requests
- Request service → Reply pipeline: runs replies (evidence: `source/server/capture_server.py`)
- Reply pipeline → Game actions: dispatches actions (evidence: `source/server/ffbe_pipeline.py`)
- Request service → Runtime state: selects endpoints (evidence: `source/server/capture_server.py`)
- Runtime state → Player state: holds player (evidence: `source/server/ffbe_state.py`)
- Reply pipeline → Battle settlement: settles battles (evidence: `source/server/ffbe_pipeline.py`)
- Reply pipeline → Repeat rewards: reports runs (evidence: `source/server/ffbe_pipeline.py`)
- Reply pipeline → Shops and crafting: applies shop use (evidence: `source/server/ffbe_pipeline.py`)
- Game actions → Battle settlement: uses battle rules (evidence: `source/server/ffbe_pipeline.py`)
- Battle settlement → Player state: updates player (evidence: `source/server/ffbe_battle.py`)
- Repeat rewards → Player state: credits rewards (evidence: `source/server/exvius_repeat.py`)
- Summons → Player state: grants pulls (evidence: `source/server/ffbe_gacha.py`)
- Shops and crafting → Player state: mutates inventory (evidence: `source/server/exvius_actions_shops.py`)
- Special modes → Battle settlement: reuses settlement (evidence: `source/server/exvius_actions_modes.py`)
- Special modes → Player state: uses player (evidence: `source/server/exvius_actions_modes.py`)
- Raid progress → Player state: tracks progress (evidence: `source/server/exvius_raid_progress.py`)
- Game configuration → Data locations: resolves data (evidence: `source/server/ffbe_config.py`)
- Runtime state → Data locations: loads paths (evidence: `source/server/ffbe_state.py`)
