# wandur/monster-strike-bot architecture

> Architecture diagram of the GitHub repository wandur/monster-strike-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wandur/monster-strike-bot
- Repository: https://github.com/wandur/monster-strike-bot

## Overview

Based on our analysis of the file structure and the README, this project is an automation bot (Monster Strike Bot) with multiple code components and implementation choices. The project is designed to automate actions in the game Monster Strike by simulating user behavior (mouse moves and clicks) and includes a custom API to remotely monitor the bot’s status. There are three main areas in the repository:

##### API Component (Directory: api)
- Contains TypeScript/JavaScript files (index.ts, dashboard.ts) along with static assets (CSS files) and HTML templates.
- This layer exposes endpoints (and provides a dashboard) that allow users to check on the bot’s status remotely.

##### Bot Implementations in C++ and Python (Directories: c++ and py)
- C++ version: Contains core automation logic (main.cpp, Bot.cpp, ImagePacker.cpp, ScreenConfig, etc.) focused on performance and smaller build size; it is used as the primary bot engine from version 3.0 onward.
- Python version: Offers an alternative that is easier to modify and read, facilitating customization and rapid development.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Interfaces
    RC("Remote Client (Monitoring)"):::external
    NP("NoxPlayer/Emulator"):::external

    %% API Layer
    API("Custom API & Dashboard"):::api

    %% Bot Engines Subgraph
    subgraph "Bot Engines"
        CPP("C++ Bot Engine\n(includes Bot, ImagePacker, ScreenConfig, Logging & Error Handling)"):::bot
        PY("Python Bot Engine\n(includes bot.py, main.py, Resources)"):::bot
    end

    %% Relationships
    RC -->|"connects"| API
    API -->|"sends status updates"| CPP
    API -->|"sends status updates"| PY
    CPP -->|"triggers UI actions"| NP
    PY -->|"triggers UI actions"| NP

    %% Click Events
    click API "https://github.com/wandur/monster-strike-bot/tree/main/api/"
    click CPP "https://github.com/wandur/monster-strike-bot/tree/main/c++/"
    click PY "https://github.com/wandur/monster-strike-bot/tree/main/py/"

    %% Styles
    classDef api fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef bot fill:#ABEBC6,stroke:#196F3D,stroke-width:2px;
    classDef external fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
```
