# vgzinhodev/vgrp architecture

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

- Interactive diagram: https://gitdiagram.com/vgzinhodev/vgrp
- Repository: https://github.com/vgzinhodev/vgrp

## Overview

VGRP is an MTAX roleplay framework for migrating MTA:SA server scripts. Its documented player workflow covers account identification, optional whitelist checks, group and permission management, and player-data saving; vgrp-mysql provides configurable MySQL or SQLite access. Legacy command and key-binding compatibility and resource exports support integration. The README also describes a separate, externally hosted converter. Source excerpts were unavailable, so edges reflect only documented relationships; implementation details and call ownership cannot be verified.

Main entry points: [`vgrp/player/join.lua`](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/join.lua) (Join and whitelist), [`vgrp-mysql/connections.lua`](https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/connections.lua) (Database connections), [`vgrp/player/save.lua`](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/save.lua) (Player saving), [`vgrp-mysql/exports.lua`](https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/exports.lua) (Database exports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_player["Player lifecycle"]
  node_join["Join and whitelist<br/>[join.lua]"]
  node_join_client["Client join<br/>[joinc.lua]"]
  node_identifiers["Player identifiers<br/>[identifiers.lua]"]
  node_player_data["Player data<br/>[datas.lua]"]
  node_money["Player money<br/>[money.lua]"]
  node_save["Player saving<br/>[save.lua]"]
end

subgraph group_access["Groups and access"]
  node_groups["Group management<br/>[groups.lua]"]
  node_permissions["Permission checks<br/>[permissions.lua]"]
  node_permissions_client["Client permissions<br/>[permissionsc.lua]"]
end

subgraph group_compat["Legacy compatibility"]
  node_commands["Legacy commands"]
  node_commands_server["Server command adapter"]
  node_bind["Legacy key binding<br/>[bindKey.lua]"]
  node_bind_server["Server key adapter<br/>[bindKeyServer.lua]"]
end

subgraph group_persistence["Persistence and integration"]
  node_mysql_config["Database configuration<br/>[VgZinhoOoEdit.lua]"]
  node_connections["Database connections<br/>[connections.lua]"]
  node_db_exports["Database exports<br/>[exports.lua]"]
  node_framework_exports["Framework exports<br/>[VgZinhoOoEdit.lua]"]
end

node_player(("Server player"))
node_database[("MySQL or SQLite")]
node_converter["MTA-to-MTAX converter"]

node_player -->|"joins"| node_join
node_join -.->|"identifies"| node_identifiers
node_join -.->|"checks access"| node_groups
node_join -.->|"saves data"| node_save
node_save -.->|"persists via"| node_db_exports
node_db_exports -.->|"uses"| node_connections
node_mysql_config -.->|"configures"| node_connections
node_connections -.->|"connects"| node_database
node_player -->|"uses exports"| node_framework_exports
node_player -->|"submits scripts"| node_converter

click node_join "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/join.lua"
click node_join_client "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/joinc.lua"
click node_identifiers "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/identifiers.lua"
click node_player_data "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/datas.lua"
click node_money "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/money.lua"
click node_save "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/save.lua"
click node_groups "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/groups.lua"
click node_permissions "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/permissions.lua"
click node_permissions_client "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/permissionsc.lua"
click node_commands "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/addCommandHandler.lua"
click node_commands_server "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/addCommandHandlerServer.lua"
click node_bind "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/bindKey.lua"
click node_bind_server "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/bindKeyServer.lua"
click node_mysql_config "https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/VgZinhoOoEdit.lua"
click node_connections "https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/connections.lua"
click node_db_exports "https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/exports.lua"
click node_framework_exports "https://github.com/vgzinhodev/vgrp/blob/main/vgrp/VgZinhoOoEdit.lua"

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_join,node_join_client,node_identifiers,node_player_data,node_money,node_save toneBlue
class node_groups,node_permissions,node_permissions_client,node_database toneAmber
class node_commands,node_commands_server,node_bind,node_bind_server,node_player toneMint
class node_mysql_config,node_connections,node_db_exports,node_framework_exports toneRose
class node_converter toneIndigo
```

## Components

### Player lifecycle

- [Join and whitelist](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/join.lua): `vgrp/player/join.lua`
- [Client join](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/joinc.lua): `vgrp/player/joinc.lua`
- [Player identifiers](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/identifiers.lua): `vgrp/player/identifiers.lua`
- [Player data](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/datas.lua): `vgrp/player/datas.lua`
- [Player money](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/money.lua): `vgrp/player/money.lua`
- [Player saving](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/player/save.lua): `vgrp/player/save.lua`

### Groups and access

- [Group management](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/groups.lua): `vgrp/groups/groups.lua`
- [Permission checks](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/permissions.lua): `vgrp/groups/permissions.lua`
- [Client permissions](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/groups/permissionsc.lua): `vgrp/groups/permissionsc.lua`

### Legacy compatibility

- [Legacy commands](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/addCommandHandler.lua): `vgrp/legacy/addCommandHandler.lua`
- [Server command adapter](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/addCommandHandlerServer.lua): `vgrp/legacy/addCommandHandlerServer.lua`
- [Legacy key binding](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/bindKey.lua): `vgrp/legacy/bindKey.lua`
- [Server key adapter](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/legacy/bindKeyServer.lua): `vgrp/legacy/bindKeyServer.lua`

### Persistence and integration

- [Database configuration](https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/VgZinhoOoEdit.lua): `vgrp-mysql/VgZinhoOoEdit.lua`
- [Database connections](https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/connections.lua): `vgrp-mysql/connections.lua`
- [Database exports](https://github.com/vgzinhodev/vgrp/blob/main/vgrp-mysql/exports.lua): `vgrp-mysql/exports.lua`
- [Framework exports](https://github.com/vgzinhodev/vgrp/blob/main/vgrp/VgZinhoOoEdit.lua): `vgrp/VgZinhoOoEdit.lua`

### Other components

- **Server player**
- **MySQL or SQLite**
- **MTA-to-MTAX converter**

## Connections

- Server player → Join and whitelist: joins (evidence: `README.md`)
- Join and whitelist → Player identifiers: identifies
- Join and whitelist → Group management: checks access
- Join and whitelist → Player saving: saves data
- Player saving → Database exports: persists via
- Database exports → Database connections: uses
- Database configuration → Database connections: configures
- Database connections → MySQL or SQLite: connects
- Server player → Framework exports: uses exports (evidence: `README.md`)
- Server player → MTA-to-MTAX converter: submits scripts (evidence: `README.md`)
