# omarkmu/pz-omichat architecture

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

- Interactive diagram: https://gitdiagram.com/omarkmu/pz-omichat
- Repository: https://github.com/omarkmu/pz-omichat

## Overview

OmiChat is a Project Zomboid mod that extends in-game chat. The tree and documentation titles indicate chat streams and commands, configurable formatting, language and emote support, player customization, and client/server data handling. Source excerpts were unavailable, so the graph shows the documented product boundary and groups related modules without inferring internal call order.

Main entry points: [`src/version/media/lua/client/OmiChat/Client.lua`](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Client.lua) (Client entry), [`src/version/media/lua/client/OmiChat/Component/UI/ChatTab.lua`](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/ChatTab.lua) (Chat UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chat["Chat experience"]
  node_client_entry["Client entry<br/>[Client.lua]"]
  node_chat_module["Chat handling<br/>[Chat.lua]"]
  node_streams["Chat streams<br/>[ChatStream.lua]"]
  node_messages["Messages<br/>[Messages.lua]"]
  node_chat_ui["Chat UI<br/>[ChatTab.lua]"]
end

subgraph group_format["Formatting and language"]
  node_format_logic["Format configuration<br/>[Logic.lua]"]
  node_interpolation["String interpolation"]
  node_languages["Languages<br/>[Languages.lua]"]
  node_emotes["Emote command<br/>[ChatEmote.lua]"]
  node_translations["Translation resources"]
end

subgraph group_custom["Customization and commands"]
  node_commands["Chat commands<br/>[ChatCommands.lua]"]
  node_command_stream["Command stream<br/>[CommandStream.lua]"]
  node_preferences["Preferences<br/>[Preferences.lua]"]
  node_profiles["Profile manager<br/>[ProfileManager.lua]"]
  node_player_data["Player data"]
end

subgraph group_platform["Game integration"]
  node_server_entry["Server entry<br/>[Server.lua]"]
  node_server_data["Server data<br/>[Data.lua]"]
  node_requests["Request handling<br/>[Request.lua]"]
end

node_player(("Player"))
node_pz["Project Zomboid"]

node_player -->|"uses chat"| node_chat_ui
node_pz -->|"hosts mod"| node_client_entry

click node_client_entry "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Client.lua"
click node_chat_module "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Chat.lua"
click node_streams "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatStream.lua"
click node_messages "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Messages.lua"
click node_chat_ui "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/ChatTab.lua"
click node_format_logic "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Component/Configuration/Logic.lua"
click node_interpolation "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Core/InterpolationLibrary.lua"
click node_languages "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Shared/Languages.lua"
click node_emotes "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatEmote.lua"
click node_commands "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatCommands.lua"
click node_command_stream "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/CommandStream.lua"
click node_preferences "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Preferences.lua"
click node_profiles "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/ProfileManager.lua"
click node_player_data "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/PlayerDataManager.lua"
click node_server_entry "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/server/OmiChat/Server.lua"
click node_server_data "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/server/OmiChat/Module/Server/Data.lua"
click node_requests "https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Shared/Request.lua"
click node_translations "https://github.com/omarkmu/pz-omichat/tree/main/src/common/media/ftl/OmiChat"

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_client_entry,node_chat_module,node_streams,node_messages,node_chat_ui toneBlue
class node_format_logic,node_interpolation,node_languages,node_emotes,node_translations toneAmber
class node_commands,node_command_stream,node_preferences,node_profiles,node_player_data toneMint
class node_server_entry,node_server_data,node_requests toneRose
class node_player,node_pz toneIndigo
```

## Components

### Chat experience

- [Client entry](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Client.lua): `src/version/media/lua/client/OmiChat/Client.lua`
- [Chat handling](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Chat.lua): `src/version/media/lua/client/OmiChat/Module/Client/Chat.lua`
- [Chat streams](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatStream.lua): `src/version/media/lua/client/OmiChat/Component/ChatStream.lua`
- [Messages](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Messages.lua): `src/version/media/lua/client/OmiChat/Module/Client/Messages.lua`
- [Chat UI](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/ChatTab.lua): `src/version/media/lua/client/OmiChat/Component/UI/ChatTab.lua`

### Formatting and language

- [Format configuration](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Component/Configuration/Logic.lua): `src/version/media/lua/shared/OmiChat/Component/Configuration/Logic.lua`
- [String interpolation](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Core/InterpolationLibrary.lua): `src/version/media/lua/shared/OmiChat/Module/Core/InterpolationLibrary.lua`
- [Languages](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Shared/Languages.lua): `src/version/media/lua/shared/OmiChat/Module/Shared/Languages.lua`
- [Emote command](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatEmote.lua): `src/version/media/lua/client/OmiChat/Component/ChatEmote.lua`
- [Translation resources](https://github.com/omarkmu/pz-omichat/tree/main/src/common/media/ftl/OmiChat): `src/common/media/ftl/OmiChat`

### Customization and commands

- [Chat commands](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/ChatCommands.lua): `src/version/media/lua/client/OmiChat/Component/ChatCommands.lua`
- [Command stream](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/CommandStream.lua): `src/version/media/lua/client/OmiChat/Component/CommandStream.lua`
- [Preferences](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Module/Client/Preferences.lua): `src/version/media/lua/client/OmiChat/Module/Client/Preferences.lua`
- [Profile manager](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/ProfileManager.lua): `src/version/media/lua/client/OmiChat/Component/UI/ProfileManager.lua`
- [Player data](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/client/OmiChat/Component/UI/PlayerDataManager.lua): `src/version/media/lua/client/OmiChat/Component/UI/PlayerDataManager.lua`

### Game integration

- [Server entry](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/server/OmiChat/Server.lua): `src/version/media/lua/server/OmiChat/Server.lua`
- [Server data](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/server/OmiChat/Module/Server/Data.lua): `src/version/media/lua/server/OmiChat/Module/Server/Data.lua`
- [Request handling](https://github.com/omarkmu/pz-omichat/blob/main/src/version/media/lua/shared/OmiChat/Module/Shared/Request.lua): `src/version/media/lua/shared/OmiChat/Module/Shared/Request.lua`

### Other components

- **Player**
- **Project Zomboid**

## Connections

- Player → Chat UI: uses chat
- Project Zomboid → Client entry: hosts mod
