# garyttierney/me3 architecture

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

- Interactive diagram: https://gitdiagram.com/garyttierney/me3
- Repository: https://github.com/garyttierney/me3

## Overview

me3 is a framework for modifying and instrumenting supported FROMSOFTWARE games. The principal workflow starts with a user invoking the CLI to select a game and profile, then launches the game and attaches the mod host; the host applies runtime hooks and asset overrides. Profiles, package/dependency metadata, game-specific analysis, IPC, and telemetry support that flow. Relationships for unsampled subsystems are omitted or marked unverified where the excerpts do not establish their wiring.

Main entry points: [`crates/mod-host/src/lib.rs`](https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/lib.rs) (Attached mod host), [`crates/cli/src/commands/launch.rs`](https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/launch.rs) (Launch command), [`crates/cli/src/commands/profile.rs`](https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/profile.rs) (Profile commands), [`crates/cli/src/main.rs`](https://github.com/garyttierney/me3/blob/main/crates/cli/src/main.rs) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and profiles"]
  node_cli["CLI commands<br/>[main.rs]"]
  node_launchcmd["Launch command<br/>[launch.rs]"]
  node_profilecmd["Profile commands<br/>[profile.rs]"]
  node_profiledb[("Profile database<br/>[profile.rs]")]
  node_config["Configuration<br/>[config.rs]"]
  node_logs[("Launch logs<br/>[logs.rs]")]
end

subgraph group_launch["Game launch"]
  node_launcher["Game launcher<br/>[main.rs]"]
  node_game["Game process<br/>[game.rs]"]
  node_launchstrategy["Launch strategies<br/>[compat_tool.rs]"]
  node_attachprotocol["Attach protocol<br/>[lib.rs]"]
end

subgraph group_runtime["Mod host runtime"]
  node_host["Attached mod host<br/>[lib.rs]"]
  node_hooks["Asset hooks<br/>[asset_hooks.rs]"]
  node_filesystem["Virtual filesystem<br/>[filesystem.rs]"]
  node_overrides["Asset mappings<br/>[mapping.rs]"]
  node_native["Native mods<br/>[native.rs]"]
end

subgraph group_support["Runtime support"]
  node_profileprotocol["Profile and package model<br/>[dependency.rs]"]
  node_analysis["Binary analysis<br/>[rtti.rs]"]
  node_ipc["Process IPC bridge<br/>[bridge.rs]"]
  node_telemetry["Telemetry<br/>[lib.rs]"]
  node_types["Game data types<br/>[tree.rs]"]
end

node_user(("Game user"))
node_targetgame(("Target game"))

node_user -->|"invokes"| node_cli
node_cli -->|"dispatches"| node_launchcmd
node_cli -->|"dispatches"| node_profilecmd
node_profilecmd -->|"loads profiles"| node_profiledb
node_profilecmd -->|"reads options"| node_config
node_profilecmd -.->|"writes output"| node_logs
node_launchcmd -->|"selects strategy"| node_launchstrategy
node_launchcmd -.->|"resolves profile"| node_profiledb
node_launchcmd -->|"creates log"| node_logs
node_launchcmd -.->|"starts launcher"| node_launcher
node_launcher -->|"launches process"| node_game
node_launcher -->|"sends attach request"| node_attachprotocol
node_targetgame -.->|"receives attachment"| node_host
node_host -->|"opens bridge"| node_ipc
node_host -->|"scans packages"| node_overrides
node_host -->|"analyzes executable"| node_analysis
node_host -->|"installs hooks"| node_hooks
node_hooks -->|"intercepts access"| node_filesystem
node_filesystem -.->|"resolves assets"| node_overrides
node_host -->|"loads natives"| node_native
node_profiledb -.->|"parses profile data"| node_profileprotocol
node_host -.->|"reports events"| node_telemetry
node_types -->|"uses game model"| node_profileprotocol

click node_cli "https://github.com/garyttierney/me3/blob/main/crates/cli/src/main.rs"
click node_launchcmd "https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/launch.rs"
click node_profilecmd "https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/profile.rs"
click node_profiledb "https://github.com/garyttierney/me3/blob/main/crates/cli/src/db/profile.rs"
click node_config "https://github.com/garyttierney/me3/blob/main/crates/cli/src/config.rs"
click node_logs "https://github.com/garyttierney/me3/blob/main/crates/cli/src/db/logs.rs"
click node_launcher "https://github.com/garyttierney/me3/blob/main/crates/launcher/src/main.rs"
click node_game "https://github.com/garyttierney/me3/blob/main/crates/launcher/src/game.rs"
click node_launchstrategy "https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/launch/strategy/compat_tool.rs"
click node_attachprotocol "https://github.com/garyttierney/me3/blob/main/crates/launcher-attach-protocol/src/lib.rs"
click node_host "https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/lib.rs"
click node_hooks "https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/asset_hooks.rs"
click node_filesystem "https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/filesystem.rs"
click node_overrides "https://github.com/garyttierney/me3/blob/main/crates/mod-host-assets/src/mapping.rs"
click node_native "https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/native.rs"
click node_profileprotocol "https://github.com/garyttierney/me3/blob/main/crates/mod-protocol/src/dependency.rs"
click node_analysis "https://github.com/garyttierney/me3/blob/main/crates/binary-analysis/src/rtti.rs"
click node_ipc "https://github.com/garyttierney/me3/blob/main/crates/ipc/src/bridge.rs"
click node_telemetry "https://github.com/garyttierney/me3/blob/main/crates/telemetry/src/lib.rs"
click node_types "https://github.com/garyttierney/me3/blob/main/crates/mod-host-types/src/tree.rs"

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_cli,node_launchcmd,node_profilecmd,node_profiledb,node_config,node_logs,node_user toneBlue
class node_launcher,node_game,node_launchstrategy,node_attachprotocol toneAmber
class node_host,node_hooks,node_filesystem,node_overrides,node_native toneMint
class node_profileprotocol,node_analysis,node_ipc,node_telemetry,node_types toneRose
class node_targetgame toneIndigo
```

## Components

### CLI and profiles

- [CLI commands](https://github.com/garyttierney/me3/blob/main/crates/cli/src/main.rs): `crates/cli/src/main.rs`
- [Launch command](https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/launch.rs): `crates/cli/src/commands/launch.rs`
- [Profile commands](https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/profile.rs): `crates/cli/src/commands/profile.rs`
- [Profile database](https://github.com/garyttierney/me3/blob/main/crates/cli/src/db/profile.rs): `crates/cli/src/db/profile.rs`
- [Configuration](https://github.com/garyttierney/me3/blob/main/crates/cli/src/config.rs): `crates/cli/src/config.rs`
- [Launch logs](https://github.com/garyttierney/me3/blob/main/crates/cli/src/db/logs.rs): `crates/cli/src/db/logs.rs`

### Game launch

- [Game launcher](https://github.com/garyttierney/me3/blob/main/crates/launcher/src/main.rs): `crates/launcher/src/main.rs`
- [Game process](https://github.com/garyttierney/me3/blob/main/crates/launcher/src/game.rs): `crates/launcher/src/game.rs`
- [Launch strategies](https://github.com/garyttierney/me3/blob/main/crates/cli/src/commands/launch/strategy/compat_tool.rs): `crates/cli/src/commands/launch/strategy/compat_tool.rs`
- [Attach protocol](https://github.com/garyttierney/me3/blob/main/crates/launcher-attach-protocol/src/lib.rs): `crates/launcher-attach-protocol/src/lib.rs`

### Mod host runtime

- [Attached mod host](https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/lib.rs): `crates/mod-host/src/lib.rs`
- [Asset hooks](https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/asset_hooks.rs): `crates/mod-host/src/asset_hooks.rs`
- [Virtual filesystem](https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/filesystem.rs): `crates/mod-host/src/filesystem.rs`
- [Asset mappings](https://github.com/garyttierney/me3/blob/main/crates/mod-host-assets/src/mapping.rs): `crates/mod-host-assets/src/mapping.rs`
- [Native mods](https://github.com/garyttierney/me3/blob/main/crates/mod-host/src/native.rs): `crates/mod-host/src/native.rs`

### Runtime support

- [Profile and package model](https://github.com/garyttierney/me3/blob/main/crates/mod-protocol/src/dependency.rs): `crates/mod-protocol/src/dependency.rs`
- [Binary analysis](https://github.com/garyttierney/me3/blob/main/crates/binary-analysis/src/rtti.rs): `crates/binary-analysis/src/rtti.rs`
- [Process IPC bridge](https://github.com/garyttierney/me3/blob/main/crates/ipc/src/bridge.rs): `crates/ipc/src/bridge.rs`
- [Telemetry](https://github.com/garyttierney/me3/blob/main/crates/telemetry/src/lib.rs): `crates/telemetry/src/lib.rs`
- [Game data types](https://github.com/garyttierney/me3/blob/main/crates/mod-host-types/src/tree.rs): `crates/mod-host-types/src/tree.rs`

### Other components

- **Game user**
- **Target game**

## Connections

- Game user → CLI commands: invokes (evidence: `README.md`)
- CLI commands → Launch command: dispatches (evidence: `crates/cli/src/main.rs`)
- CLI commands → Profile commands: dispatches (evidence: `crates/cli/src/main.rs`)
- Profile commands → Profile database: loads profiles (evidence: `crates/cli/src/commands/profile.rs`)
- Profile commands → Configuration: reads options (evidence: `crates/cli/src/commands/profile.rs`)
- Profile commands → Launch logs: writes output
- Launch command → Launch strategies: selects strategy (evidence: `crates/cli/src/commands/launch.rs`)
- Launch command → Profile database: resolves profile
- Launch command → Launch logs: creates log (evidence: `crates/cli/src/commands/launch.rs`)
- Launch command → Game launcher: starts launcher
- Game launcher → Game process: launches process (evidence: `crates/launcher/src/main.rs`)
- Game launcher → Attach protocol: sends attach request (evidence: `crates/launcher/src/main.rs`)
- Target game → Attached mod host: receives attachment
- Attached mod host → Process IPC bridge: opens bridge (evidence: `crates/mod-host/src/lib.rs`)
- Attached mod host → Asset mappings: scans packages (evidence: `crates/mod-host/src/lib.rs`)
- Attached mod host → Binary analysis: analyzes executable (evidence: `crates/mod-host/src/lib.rs`)
- Attached mod host → Asset hooks: installs hooks (evidence: `crates/mod-host/src/asset_hooks.rs`)
- Asset hooks → Virtual filesystem: intercepts access (evidence: `crates/mod-host/src/asset_hooks.rs`)
- Virtual filesystem → Asset mappings: resolves assets
- Attached mod host → Native mods: loads natives (evidence: `crates/mod-host/src/lib.rs`)
- Profile database → Profile and package model: parses profile data
- Attached mod host → Telemetry: reports events
- Game data types → Profile and package model: uses game model (evidence: `crates/mod-host-types/src/tree.rs`)
