# jussihi/pubg-map-hack architecture

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

- Interactive diagram: https://gitdiagram.com/jussihi/pubg-map-hack
- Repository: https://github.com/jussihi/pubg-map-hack

## Overview

##### Kernel Driver
- Located under “kernel driver” and built with Visual Studio 2015 (using WDK/KMDF).
- Its purpose is to interface at a low level with the game (reading memory, intercepting data) to extract necessary information.
- It serves as the trusted system component for retrieving in-game data.

##### Usermode App
- Found under “usermode app” and built with Visual Studio 2017.
- It bridges communication between the kernel driver and the external web interface by accessing the kernel driver’s data.
- It also uses libcurl (and JSON parsing) to update an external Firebase database.
- This component orchestrates the flow of data both from the low-level kernel process and towards the web map.

##### Online Map
- Under “online map,” this folder contains an HTML-based web interface.
- The online map retrieves data from a Firebase database (which the usermode app continuously updates) to display player positions on an interactive map.
- The README notes that the map works with Firebase and may require API key updates.

A. Identify Main Components:
- Usermode Application: Include distinctions such as “Usermode App (C++, Visual Studio 2017, libcurl integration, JSON parsing).”
- External Service – Firebase Database: Represent it as an external cloud service.

B. Determine Relationships and Data Flow:
- Optionally, you could highlight the external network boundary for the Online Map if it is hosted on a separate web server.

C. Highlight Architectural Patterns and Technologies:
- Separation of concerns: low-level memory access via the kernel driver, business logic data handling via the usermode app, and presentation via the online map.
- Mention that the Usermode App uses HTTP requests via the CURL library to communicate with Firebase.

- Clearly separate each “layer”:
- The kernel/driver layer (operating at OS level),
- The user-mode application layer (application logic and data processing),
- The web/cloud layer (Firebase as a data store and the online map interface).
- From the Kernel Driver to the Usermode App;
- From the Usermode App to the Firebase Database;
- From the Firebase Database to the Online Map.

E. Additional Tips for the Principal Software Engineer:
- Be as detailed as possible when mapping out interactions – include every component seen in the file tree (even auxiliary libraries like the CURL include and library folders, if they affect integration).
- If applicable, show how configuration (Firebase API keys, for instance) flows through the system (perhaps a note near the online map and CURLWrapper.hpp).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Kernel/Driver Layer
    subgraph "Kernel/Driver Layer"
        KD["Kernel Driver (KMDF/WDK, Visual Studio 2015)"]:::kernel
    end

    %% Usermode Application Layer
    subgraph "Usermode Application Layer"
        UC["Usermode App (C++, Visual Studio 2017)"]:::usermode
        M["Main (main.cpp)"]:::usermode
        CW["CURLWrapper (CURLWrapper.hpp)"]:::usermode
        GP["GameDataParser (GameDataParser.hpp)"]:::usermode
        KR["KReader (KReader.hpp)"]:::usermode
        UT["Types (Types.hpp)"]:::usermode
        CL["CURL Library Integration"]:::usermode
        JP["JSON Parsing (json.hpp)"]:::usermode
    end

    %% External Cloud Layer
    subgraph "External Cloud Layer"
        FDB["Firebase Database"]:::cloud
        OM["HTML/JavaScript Web Map"]:::cloud
    end

    %% Connections
    KD <--> UC
    UC --> FDB
    FDB --> OM

    %% Internal Usermode Connections
    UC --> M
    UC --> CW
    UC --> GP
    UC --> KR
    UC --> UT
    UC --> CL
    UC --> JP

    %% Click Events
    click KD "https://github.com/jussihi/pubg-map-hack/tree/master/kernel driver/mapDriver"
    click UC "https://github.com/jussihi/pubg-map-hack/tree/master/usermode app/hackControl"
    click M "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/hackControl/main.cpp"
    click CW "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/hackControl/CURLWrapper.hpp"
    click GP "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/hackControl/GameDataParser.hpp"
    click KR "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/hackControl/KReader.hpp"
    click UT "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/hackControl/Types.hpp"
    click CL "https://github.com/jussihi/pubg-map-hack/tree/master/usermode app/libcurl-vc-x64-release-static-ipv6-sspi-winssl"
    click JP "https://github.com/jussihi/pubg-map-hack/blob/master/usermode app/json/json.hpp"
    click OM "https://github.com/jussihi/pubg-map-hack/blob/master/online map/map.html"

    %% Styles
    classDef kernel fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef usermode fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef cloud fill:#FFA500,stroke:#333,stroke-width:2px;
```
