# binaryatrocity/discworld-tintin architecture

> Architecture diagram of the GitHub repository binaryatrocity/discworld-tintin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/binaryatrocity/discworld-tintin
- Repository: https://github.com/binaryatrocity/discworld-tintin

## Overview

##### Main Components

a) Core Client Layer:
- TinTin++ Client (base system)
- Tmux Session Manager (for window management)

b) Configuration Modules:
- Core Configuration (config.tin)
- Feature Modules:
- Combat System
- Magic System
- Management
- Channel Communications
- GMCP Handler
- Prompt System

c) External Components:
- Python Scripts
- SQLite Database (for item/NPC/room data)
- File System (for logs and state)

**[User Interface Layer]**
- Tmux Windows/Panes
- TinTin++ Client Interface

**[Feature Modules Layer]**
- Monitoring Systems
- XP Monitor
- TPA Monitor
- Quota Monitor
- Game Tools
- Dead Letter Solver
- Speedwalking System
- Group Shield Monitor
- Combat/Magic Systems

**[Core Processing Layer]**
- GMCP Handler
- Action Processor
- Alias Handler
- Trigger System

**[External Services Layer]**
- Python Scripts
- maproute.py
- mdtparse.py
- SQLite Database

**[File System Layer]**
- Configuration Files
- Log Files
- State Files

##### Important Elements to Highlight

- GMCP data flow from game server to parser
- Trigger/action flow through the system
- Database query paths
- File I/O operations

- Blue: Core TinTin++ components
- Green: Python scripts and external tools
- Yellow: User interface elements
- Orange: Data storage
- Purple: Communication channels

##### Implementation Details

Use standardized symbols:
- Rectangles: Core components
- Hexagons: External scripts
- Diamonds: Decision points

##### Additional Notes

- Annotations for critical paths
- Configuration file relationships
- Real-time monitoring components

Remember to highlight the unique features like the hotspot timer synchronization, speedwalking system, and group shield monitoring as these are key differentiators of this configuration.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI["User Interface Layer"]
        TMX[Tmux Windows/Panes]
        TTC[TinTin++ Client Interface]
    end

    subgraph FM["Feature Modules Layer"]
        subgraph MS["Monitoring Systems"]
            XPM["XP Monitor"]:::file
            TPM["TPA Monitor"]:::file
            QTM["Quota Monitor"]:::file
        end

        subgraph GT["Game Tools"]
            DLS["Dead Letter Solver"]:::file
            SPW["Speedwalking System"]
            GSM["Group Shield Monitor"]
            MSN["Mission Systems"]:::dir
        end

        subgraph CS["Combat/Magic Systems"]
            CBS["Combat System"]:::file
            MGS["Magic System"]:::file
            GRP["Group Management"]:::file
        end
    end

    subgraph CP["Core Processing Layer"]
        GMP["GMCP Handler"]:::file
        ACP["Action Processor"]:::file
        ALH["Alias Handler"]:::file
        TRG["Trigger System"]
        MCS["Macro System"]:::file
        DBI["Database Interface"]:::file
    end

    subgraph ES["External Services Layer"]
        subgraph PS["Python Scripts"]
            MPR["Map Router"]:::file
            MDP["MDT Parser"]:::file
        end
        DB[(SQLite Database)]
    end

    subgraph FS["File System Layer"]
        CFG["Core Configuration"]:::file
        LOG[Log Files]
        STF[State Files]
        MDC["MDT Configuration"]:::file
    end

    %% Connections
    TMX --> TTC
    TTC --> GMP
    GMP --> ACP
    ACP --> TRG
    TRG --> ALH
    ALH --> MCS

    GMP --> DB
    DBI --> DB
    PS --> DB

    CBS --> ACP
    MGS --> ACP
    GRP --> ACP

    XPM --> TRG
    TPM --> TRG
    QTM --> TRG

    DLS --> ACP
    SPW --> ACP
    GSM --> GRP
    MSN --> ACP

    CFG --> TTC
    MDC --> MDP

    %% Click Events
    click CFG "https://github.com/binaryatrocity/discworld-tintin/blob/master/config.tin"
    click CBS "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/combat.tin"
    click MGS "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/magic.tin"
    click GRP "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/group.tin"
    click GMP "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/gmcp.tin"
    click XPM "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/xpmonitor.tin"
    click TPM "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/tpamonitor.tin"
    click QTM "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/quota.tin"
    click DLS "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/deadletter.tin"
    click MSN "https://github.com/binaryatrocity/discworld-tintin/tree/master/src/missions/"
    click ACP "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/actions.tin"
    click ALH "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/aliases.tin"
    click DBI "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/db.tin"
    click MCS "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/macros.tin"
    click MPR "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/maproute.py"
    click MDP "https://github.com/binaryatrocity/discworld-tintin/blob/master/src/mdtparse.py"
    click MDC "https://github.com/binaryatrocity/discworld-tintin/blob/master/mdtconfig.json"

    %% Styles
    classDef file fill:#f9f,stroke:#333,stroke-width:2px;
    classDef dir fill:#ff9,stroke:#333,stroke-width:2px;
    
    %% Legend
    subgraph Legend
        L1[Component]
        L2[File Component]:::file
        L3[Directory Component]:::dir
    end
```
