# vgzinhodev/mta-to-mtax architecture

> Architecture diagram of the GitHub repository vgzinhodev/mta-to-mtax, 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/mta-to-mtax
- Repository: https://github.com/vgzinhodev/mta-to-mtax

## Overview

MTA to MTAX Unifier is an Electron desktop app that converts an MTA:SA server’s resources into MTAX format. The user selects a server folder and starts conversion; the app updates/injects the VGRP framework, detects legacy framework use, converts manifests, removes old metadata and BOMs, then writes and opens a report. The README also describes bilingual UI and separate app/framework update flows. Stage ordering and some IPC wiring are documented or implied, but not fully visible in the excerpts; those edges are marked unverified where needed.

Main entry points: [`main.js`](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js) (Electron main process), [`renderer/app.js`](https://github.com/vgzinhodev/mta-to-mtax/blob/main/renderer/app.js) (Guided interface), [`updater.js`](https://github.com/vgzinhodev/mta-to-mtax/blob/main/updater.js) (Framework update), [`preload.js`](https://github.com/vgzinhodev/mta-to-mtax/blob/main/preload.js) (IPC bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_ui["Guided interface<br/>[app.js]"]
  node_bridge["IPC bridge<br/>[preload.js]"]
end

subgraph group_conversion["Server conversion"]
  node_main["Electron main process<br/>[main.js]"]
  node_server[("MTA server files")]
  node_framework["Framework injection<br/>[main.js]"]
  node_legacy["Legacy-use scan<br/>[main.js]"]
  node_manifest["Manifest conversion<br/>[main.js]"]
  node_cleanup["Metadata and BOM cleanup<br/>[main.js]"]
end

subgraph group_updates["Update services"]
  node_framework_update["Framework update<br/>[updater.js]"]
  node_app_update["App auto-update<br/>[updater.js]"]
end

subgraph group_reporting["Results and reporting"]
  node_summary["Completion summary<br/>[app.js]"]
  node_report["Conversion log<br/>[main.js]"]
end

node_user(("Server administrator"))
node_github{{"GitHub repositories"}}

node_user -->|"selects folder"| node_ui
node_ui -->|"invokes APIs"| node_bridge
node_bridge -.->|"routes IPC"| node_main
node_main -->|"processes files"| node_server
node_main -->|"coordinates"| node_framework
node_main -->|"scans resources"| node_legacy
node_main -->|"converts metadata"| node_manifest
node_main -->|"cleans files"| node_cleanup
node_framework -->|"updates resources"| node_server
node_legacy -->|"reads Lua files"| node_server
node_manifest -->|"reads and writes"| node_server
node_cleanup -->|"removes and rewrites"| node_server
node_main -->|"writes log"| node_report
node_report -->|"opens for review"| node_user
node_main -->|"initializes updater"| node_framework_update
node_ui -->|"checks or downloads"| node_framework_update
node_ui -->|"checks or downloads"| node_app_update
node_framework_update -->|"fetches framework"| node_github
node_app_update -->|"checks releases"| node_github
node_ui -->|"shows completion"| node_summary
node_framework -.->|"precedes scan"| node_legacy
node_legacy -->|"precedes conversion"| node_manifest
node_manifest -->|"precedes cleanup"| node_cleanup

click node_ui "https://github.com/vgzinhodev/mta-to-mtax/blob/main/renderer/app.js"
click node_bridge "https://github.com/vgzinhodev/mta-to-mtax/blob/main/preload.js"
click node_main "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"
click node_framework "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"
click node_legacy "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"
click node_manifest "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"
click node_cleanup "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"
click node_framework_update "https://github.com/vgzinhodev/mta-to-mtax/blob/main/updater.js"
click node_app_update "https://github.com/vgzinhodev/mta-to-mtax/blob/main/updater.js"
click node_summary "https://github.com/vgzinhodev/mta-to-mtax/blob/main/renderer/app.js"
click node_report "https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js"

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_ui,node_bridge toneBlue
class node_main,node_server,node_framework,node_legacy,node_manifest,node_cleanup toneAmber
class node_framework_update,node_app_update,node_user toneMint
class node_summary,node_report toneRose
class node_github toneIndigo
```

## Components

### Desktop interface

- [Guided interface](https://github.com/vgzinhodev/mta-to-mtax/blob/main/renderer/app.js): `renderer/app.js`
- [IPC bridge](https://github.com/vgzinhodev/mta-to-mtax/blob/main/preload.js): `preload.js`

### Server conversion

- [Electron main process](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`
- **MTA server files**
- [Framework injection](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`
- [Legacy-use scan](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`
- [Manifest conversion](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`
- [Metadata and BOM cleanup](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`

### Update services

- [Framework update](https://github.com/vgzinhodev/mta-to-mtax/blob/main/updater.js): `updater.js`
- [App auto-update](https://github.com/vgzinhodev/mta-to-mtax/blob/main/updater.js): `updater.js`

### Results and reporting

- [Completion summary](https://github.com/vgzinhodev/mta-to-mtax/blob/main/renderer/app.js): `renderer/app.js`
- [Conversion log](https://github.com/vgzinhodev/mta-to-mtax/blob/main/main.js): `main.js`

### Other components

- **Server administrator**
- **GitHub repositories**

## Connections

- Server administrator → Guided interface: selects folder (evidence: `README.md`)
- Guided interface → IPC bridge: invokes APIs (evidence: `preload.js`)
- IPC bridge → Electron main process: routes IPC
- Electron main process → MTA server files: processes files (evidence: `README.md`)
- Electron main process → Framework injection: coordinates (evidence: `main.js`)
- Electron main process → Legacy-use scan: scans resources (evidence: `main.js`)
- Electron main process → Manifest conversion: converts metadata (evidence: `main.js`)
- Electron main process → Metadata and BOM cleanup: cleans files (evidence: `main.js`)
- Framework injection → MTA server files: updates resources (evidence: `main.js`)
- Legacy-use scan → MTA server files: reads Lua files (evidence: `main.js`)
- Manifest conversion → MTA server files: reads and writes (evidence: `main.js`)
- Metadata and BOM cleanup → MTA server files: removes and rewrites (evidence: `main.js`)
- Electron main process → Conversion log: writes log (evidence: `main.js`)
- Conversion log → Server administrator: opens for review (evidence: `main.js`)
- Electron main process → Framework update: initializes updater (evidence: `main.js`)
- Guided interface → Framework update: checks or downloads
- Guided interface → App auto-update: checks or downloads
- Framework update → GitHub repositories: fetches framework (evidence: `updater.js`)
- App auto-update → GitHub repositories: checks releases (evidence: `README.md`)
- Guided interface → Completion summary: shows completion (evidence: `README.md`)
- Framework injection → Legacy-use scan: precedes scan (evidence: `main.js`)
- Legacy-use scan → Manifest conversion: precedes conversion (evidence: `README.md`)
- Manifest conversion → Metadata and BOM cleanup: precedes cleanup (evidence: `README.md`)
