# nbredikhin/drift-paradise-mta architecture

> Architecture diagram of the GitHub repository nbredikhin/drift-paradise-mta, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nbredikhin/drift-paradise-mta
- Repository: https://github.com/nbredikhin/drift-paradise-mta

## Overview

Drift Paradise is a racing gamemode for Multi Theft Auto: San Andreas. The documented operator workflow is to configure MySQL for core persistence, start the MTA server, then launch the gamemode through the dpStartup resource. The tree indicates major gameplay areas including vehicles, garage tuning, car purchases, houses, drift scoring, maps, and player services. Source excerpts were unavailable, so internal calls and data flows among these subsystems are not asserted.

Main entry points: [`dpStartup/server`](https://github.com/nbredikhin/drift-paradise-mta/tree/master/dpStartup/server) (Gamemode startup), [`[core]/dpCore/server/database/Database.lua`](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/database/Database.lua) (Database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and Core"]
  node_startup["Gamemode startup"]
  node_core["Core services"]
  node_database["Database access<br/>[Database.lua]"]
  node_player_accounts["Player accounts<br/>[Users.lua]"]
  node_player_progress["Player progression<br/>[player_levels.lua]"]
  node_admin["Administration<br/>[commands.lua]"]
end

subgraph group_vehicles["Vehicles and Economy"]
  node_garage["Vehicle garage<br/>[Garage.lua]"]
  node_tuning["Garage tuning<br/>[tuning_server.lua]"]
  node_vehicle_system["Vehicle behavior<br/>[actions.lua]"]
  node_car_shop["Car purchasing<br/>[buying.lua]"]
end

subgraph group_world["World and Gameplay"]
  node_houses["House ownership<br/>[buying.lua]"]
  node_maps["Race maps<br/>[maps.lua]"]
  node_drift_scoring["Drift scoring<br/>[dpDriftPoints.lua]"]
  node_damage_respawn["Damage and respawn<br/>[main.lua]"]
end

subgraph group_presentation["Player Interface"]
  node_garage_ui["Garage interface<br/>[MainScreen.lua]"]
  node_hud["Player HUD"]
  node_chat["Player chat"]
end

node_operator(("Server operator"))
node_mta["MTA server"]
node_mysql[("MySQL")]

node_operator -->|"starts server"| node_mta
node_operator -->|"configures"| node_mysql
node_mysql -.->|"persists data"| node_database
node_operator -->|"starts resource"| node_startup
node_startup -->|"launches gamemode"| node_mta

click node_startup "https://github.com/nbredikhin/drift-paradise-mta/tree/master/dpStartup/server"
click node_core "https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bcore%5D/dpCore/server"
click node_database "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/database/Database.lua"
click node_player_accounts "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/users/Users.lua"
click node_player_progress "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/gameplay/player_levels.lua"
click node_garage "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/client/Garage.lua"
click node_tuning "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/server/tuning_server.lua"
click node_vehicle_system "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpVehicles/client/actions.lua"
click node_car_shop "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpCarshop/server/buying.lua"
click node_houses "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpHouses/server/buying.lua"
click node_maps "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bmapping%5D/TD-RACEMAPS/maps.lua"
click node_drift_scoring "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpDriftPoints/client/dpDriftPoints.lua"
click node_damage_respawn "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpDamage/client/main.lua"
click node_admin "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bother%5D/dpAdmin/server/commands.lua"
click node_garage_ui "https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/client/ui/screens/MainScreen.lua"
click node_hud "https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bui%5D/dpHUD/client"
click node_chat "https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bui%5D/dpChat/client"

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_startup,node_core,node_database,node_player_accounts,node_player_progress,node_admin toneBlue
class node_garage,node_tuning,node_vehicle_system,node_car_shop,node_mysql toneAmber
class node_houses,node_maps,node_drift_scoring,node_damage_respawn,node_operator,node_mta toneMint
class node_garage_ui,node_hud,node_chat toneRose
```

## Components

### Runtime and Core

- [Gamemode startup](https://github.com/nbredikhin/drift-paradise-mta/tree/master/dpStartup/server): `dpStartup/server`
- [Core services](https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bcore%5D/dpCore/server): `[core]/dpCore/server`
- [Database access](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/database/Database.lua): `[core]/dpCore/server/database/Database.lua`
- [Player accounts](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/users/Users.lua): `[core]/dpCore/server/users/Users.lua`
- [Player progression](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpCore/server/gameplay/player_levels.lua): `[core]/dpCore/server/gameplay/player_levels.lua`
- [Administration](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bother%5D/dpAdmin/server/commands.lua): `[other]/dpAdmin/server/commands.lua`

### Vehicles and Economy

- [Vehicle garage](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/client/Garage.lua): `[core]/dpGarage/client/Garage.lua`
- [Garage tuning](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/server/tuning_server.lua): `[core]/dpGarage/server/tuning_server.lua`
- [Vehicle behavior](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpVehicles/client/actions.lua): `[core]/dpVehicles/client/actions.lua`
- [Car purchasing](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpCarshop/server/buying.lua): `[gameplay]/dpCarshop/server/buying.lua`

### World and Gameplay

- [House ownership](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpHouses/server/buying.lua): `[core]/dpHouses/server/buying.lua`
- [Race maps](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bmapping%5D/TD-RACEMAPS/maps.lua): `[mapping]/TD-RACEMAPS/maps.lua`
- [Drift scoring](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpDriftPoints/client/dpDriftPoints.lua): `[gameplay]/dpDriftPoints/client/dpDriftPoints.lua`
- [Damage and respawn](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bgameplay%5D/dpDamage/client/main.lua): `[gameplay]/dpDamage/client/main.lua`

### Player Interface

- [Garage interface](https://github.com/nbredikhin/drift-paradise-mta/blob/master/%5Bcore%5D/dpGarage/client/ui/screens/MainScreen.lua): `[core]/dpGarage/client/ui/screens/MainScreen.lua`
- [Player HUD](https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bui%5D/dpHUD/client): `[ui]/dpHUD/client`
- [Player chat](https://github.com/nbredikhin/drift-paradise-mta/tree/master/%5Bui%5D/dpChat/client): `[ui]/dpChat/client`

### Other components

- **Server operator**
- **MTA server**
- **MySQL**

## Connections

- Server operator → MTA server: starts server (evidence: `README.md`)
- Server operator → MySQL: configures (evidence: `README.md`)
- MySQL → Database access: persists data
- Server operator → Gamemode startup: starts resource (evidence: `README.md`)
- Gamemode startup → MTA server: launches gamemode (evidence: `README.md`)
