# jasonlaubb/matrix-anticheat architecture

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

- Interactive diagram: https://gitdiagram.com/jasonlaubb/matrix-anticheat
- Repository: https://github.com/jasonlaubb/matrix-anticheat

## Overview

Matrix AntiCheat is a Minecraft Bedrock server add-on for detecting cheats, enforcing server rules, and providing administrative controls. Operators configure detections and features through slash commands or the multilingual Admin GUI; enabled checks and assets respond to game events, while alerts and enforcement act on players. The graph includes configuration, persistence, localization, and shared runtime utilities. The README documents several product capabilities whose implementation paths are represented by their source directories; edges are limited to relationships shown in excerpts or explicitly documented.

Main entry points: [`bp/src/main.ts`](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/main.ts) (Runtime entry), [`bp/src/util/ui.ts`](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/ui.ts) (Admin GUI), [`bp/src/util/database.ts`](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/database.ts) (World properties), [`bp/src/check`](https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/check) (Cheat checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and detection"]
  node_main["Runtime entry<br/>[main.ts]"]
  node_detection["Detection controls<br/>[detection.ts]"]
  node_checks["Cheat checks"]
end

subgraph group_features["Server features"]
  node_protection["Server protections"]
end

subgraph group_admin["Administration"]
  node_commands["Command registry<br/>[commands.ts]"]
  node_command_handlers["Admin commands"]
  node_admin_ui["Admin GUI<br/>[ui.ts]"]
end

subgraph group_shared["Shared services"]
  node_config["Default settings<br/>[config.ts]"]
  node_properties[("World properties<br/>[database.ts]")]
  node_localization["Translations"]
  node_text["Text and language<br/>[text.ts]"]
  node_tick["Tick scheduling<br/>[tick.ts]"]
  node_utilities["Game utilities<br/>[util.ts]"]
  node_logs["Logging<br/>[log.ts]"]
  node_punishment["Punishment<br/>[punishment.ts]"]
end

node_operator(("Operator"))
node_bedrock(("Minecraft server"))

node_operator -->|"uses slash commands"| node_commands
node_operator -->|"uses GUI"| node_admin_ui
node_bedrock -.->|"starts add-on"| node_main
node_main -->|"initializes checks"| node_detection
node_main -->|"enables features"| node_protection
node_main -->|"loads registry"| node_commands
node_detection -->|"enables checks"| node_checks
node_commands -->|"registers handlers"| node_command_handlers
node_admin_ui -->|"reads commands"| node_commands
node_admin_ui -->|"reads detections"| node_detection
node_admin_ui -->|"reads settings"| node_properties
node_properties -->|"uses defaults"| node_config
node_text -->|"selects translations"| node_localization
node_text -->|"reads language setting"| node_properties
node_detection -->|"reads toggles"| node_properties
node_checks -.->|"uses scheduling"| node_tick
node_checks -->|"uses game helpers"| node_utilities
node_checks -->|"reads settings"| node_properties
node_main -->|"updates language"| node_text
node_main -->|"writes gate logs"| node_logs
node_command_handlers -->|"formats messages"| node_text
node_command_handlers -->|"opens staff UI"| node_admin_ui
node_command_handlers -->|"writes command logs"| node_logs

click node_main "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/main.ts"
click node_detection "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/command/detection.ts"
click node_checks "https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/check"
click node_protection "https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/asset"
click node_commands "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/data/commands.ts"
click node_command_handlers "https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/command"
click node_admin_ui "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/ui.ts"
click node_config "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/data/config.ts"
click node_properties "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/database.ts"
click node_localization "https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/data/languages"
click node_text "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/text.ts"
click node_tick "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/tick.ts"
click node_utilities "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/util.ts"
click node_logs "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/log.ts"
click node_punishment "https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/punishment.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_main,node_detection,node_checks toneBlue
class node_protection toneAmber
class node_commands,node_command_handlers,node_admin_ui,node_bedrock toneMint
class node_config,node_properties,node_localization,node_text,node_tick,node_utilities,node_logs,node_punishment toneRose
class node_operator toneIndigo
```

## Components

### Runtime and detection

- [Runtime entry](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/main.ts): `bp/src/main.ts`
- [Detection controls](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/command/detection.ts): `bp/src/command/detection.ts`
- [Cheat checks](https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/check): `bp/src/check`

### Server features

- [Server protections](https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/asset): `bp/src/asset`

### Administration

- [Command registry](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/data/commands.ts): `bp/src/data/commands.ts`
- [Admin commands](https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/command): `bp/src/command`
- [Admin GUI](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/ui.ts): `bp/src/util/ui.ts`

### Shared services

- [Default settings](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/data/config.ts): `bp/src/data/config.ts`
- [World properties](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/database.ts): `bp/src/util/database.ts`
- [Translations](https://github.com/jasonlaubb/matrix-anticheat/tree/full/bp/src/data/languages): `bp/src/data/languages`
- [Text and language](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/text.ts): `bp/src/util/text.ts`
- [Tick scheduling](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/tick.ts): `bp/src/util/tick.ts`
- [Game utilities](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/util.ts): `bp/src/util/util.ts`
- [Logging](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/log.ts): `bp/src/util/log.ts`
- [Punishment](https://github.com/jasonlaubb/matrix-anticheat/blob/full/bp/src/util/punishment.ts): `bp/src/util/punishment.ts`

### Other components

- **Operator**
- **Minecraft server**

## Connections

- Operator → Command registry: uses slash commands
- Operator → Admin GUI: uses GUI
- Minecraft server → Runtime entry: starts add-on
- Runtime entry → Detection controls: initializes checks (evidence: `bp/src/main.ts`)
- Runtime entry → Server protections: enables features (evidence: `bp/src/main.ts`)
- Runtime entry → Command registry: loads registry (evidence: `bp/src/main.ts`)
- Detection controls → Cheat checks: enables checks (evidence: `bp/src/command/detection.ts`)
- Command registry → Admin commands: registers handlers (evidence: `bp/src/data/commands.ts`)
- Admin GUI → Command registry: reads commands (evidence: `bp/src/util/ui.ts`)
- Admin GUI → Detection controls: reads detections (evidence: `bp/src/util/ui.ts`)
- Admin GUI → World properties: reads settings (evidence: `bp/src/util/ui.ts`)
- World properties → Default settings: uses defaults (evidence: `bp/src/util/database.ts`)
- Text and language → Translations: selects translations (evidence: `bp/src/util/text.ts`)
- Text and language → World properties: reads language setting (evidence: `bp/src/util/text.ts`)
- Detection controls → World properties: reads toggles (evidence: `bp/src/command/detection.ts`)
- Cheat checks → Tick scheduling: uses scheduling (evidence: `bp/src/check/killaura.ts`)
- Cheat checks → Game utilities: uses game helpers (evidence: `bp/src/check/killaura.ts`)
- Cheat checks → World properties: reads settings (evidence: `bp/src/check/killaura.ts`)
- Runtime entry → Text and language: updates language (evidence: `bp/src/main.ts`)
- Runtime entry → Logging: writes gate logs (evidence: `bp/src/main.ts`)
- Admin commands → Text and language: formats messages (evidence: `bp/src/command/staff.ts`)
- Admin commands → Admin GUI: opens staff UI (evidence: `bp/src/command/staff.ts`)
- Admin commands → Logging: writes command logs (evidence: `bp/src/command/staff.ts`)
