# gdretools/gdsdecomp architecture

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

- Interactive diagram: https://gitdiagram.com/gdretools/gdsdecomp
- Repository: https://github.com/gdretools/gdsdecomp

## Overview

Godot RE Tools recovers and converts Godot projects, with archive extraction and creation as related workflows. The principal recovery path starts with a PCK, APK, embedded executable, or project directory; it loads project data, decompiles scripts, restores resource formats and plugin configuration, then writes recovered files. The README documents these stages and CLI/GUI entry points. Source excerpts are partial, so internal recovery links rely on documented behavior where implementation calls were not shown; plugin discovery is shown separately as an additional capability.

Main entry points: [`utility/gdre_settings.h`](https://github.com/gdretools/gdsdecomp/blob/master/utility/gdre_settings.h) (Project loading), [`editor/gdre_editor.cpp`](https://github.com/gdretools/gdsdecomp/blob/master/editor/gdre_editor.cpp) (GUI recovery), [`utility/cli_helper.h`](https://github.com/gdretools/gdsdecomp/blob/master/utility/cli_helper.h) (CLI commands), [`plugin_manager/plugin_source.cpp`](https://github.com/gdretools/gdsdecomp/blob/master/plugin_manager/plugin_source.cpp) (Plugin sources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_gui["GUI recovery<br/>[gdre_editor.cpp]"]
  node_cli["CLI commands<br/>[cli_helper.h]"]
end

subgraph group_recovery["Project recovery"]
  node_project["Project loading<br/>[gdre_settings.h]"]
  node_archive["Pack extraction<br/>[pck_dumper.cpp]"]
  node_apk["APK access"]
  node_crypto["Encrypted access"]
  node_resource_load["Legacy resource loading"]
  node_script_decomp["GDScript decompilation<br/>[bytecode_base.cpp]"]
  node_resource_restore["Resource restoration"]
  node_plugin_config["Plugin configuration<br/>[pcfg_loader.cpp]"]
  node_output["Recovered project"]
end

subgraph group_conversion["Conversion tools"]
  node_resource_convert["Text-binary conversion"]
  node_pck_create["Pack creation<br/>[pck_creator.cpp]"]
  node_translation["Translation patching"]
end

subgraph group_extensions["Extensions"]
  node_plugin_manager["Plugin manager<br/>[plugin_manager.cpp]"]
  node_plugin_sources["Plugin sources<br/>[plugin_source.cpp]"]
end

node_user(("User"))
node_remote_services(("Plugin hosting services"))

node_user -->|"starts recovery"| node_gui
node_user -->|"runs command"| node_cli
node_gui -->|"loads project"| node_project
node_cli -->|"loads project"| node_project
node_project -->|"extracts pack"| node_archive
node_project -->|"reads APK"| node_apk
node_project -->|"decrypts data"| node_crypto
node_project -->|"loads resources"| node_resource_load
node_project -->|"decompiles scripts"| node_script_decomp
node_project -->|"restores imports"| node_resource_restore
node_project -->|"recreates config"| node_plugin_config
node_project -->|"writes project"| node_output
node_user -->|"converts resources"| node_resource_convert
node_user -->|"creates pack"| node_pck_create
node_user -->|"patches translations"| node_translation
node_plugin_manager -->|"queries sources"| node_plugin_sources
node_plugin_sources -.->|"fetches releases"| node_remote_services

click node_gui "https://github.com/gdretools/gdsdecomp/blob/master/editor/gdre_editor.cpp"
click node_cli "https://github.com/gdretools/gdsdecomp/blob/master/utility/cli_helper.h"
click node_project "https://github.com/gdretools/gdsdecomp/blob/master/utility/gdre_settings.h"
click node_archive "https://github.com/gdretools/gdsdecomp/blob/master/utility/pck_dumper.cpp"
click node_apk "https://github.com/gdretools/gdsdecomp/blob/master/utility/file_access_apk.cpp"
click node_crypto "https://github.com/gdretools/gdsdecomp/blob/master/crypto/file_access_encrypted_custom.cpp"
click node_resource_load "https://github.com/gdretools/gdsdecomp/blob/master/compat/resource_loader_compat.cpp"
click node_script_decomp "https://github.com/gdretools/gdsdecomp/blob/master/bytecode/bytecode_base.cpp"
click node_resource_restore "https://github.com/gdretools/gdsdecomp/tree/master/exporters"
click node_plugin_config "https://github.com/gdretools/gdsdecomp/blob/master/utility/pcfg_loader.cpp"
click node_resource_convert "https://github.com/gdretools/gdsdecomp/blob/master/compat/resource_compat_text.cpp"
click node_pck_create "https://github.com/gdretools/gdsdecomp/blob/master/utility/pck_creator.cpp"
click node_translation "https://github.com/gdretools/gdsdecomp/blob/master/exporters/translation_exporter.cpp"
click node_plugin_manager "https://github.com/gdretools/gdsdecomp/blob/master/plugin_manager/plugin_manager.cpp"
click node_plugin_sources "https://github.com/gdretools/gdsdecomp/blob/master/plugin_manager/plugin_source.cpp"

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_gui,node_cli,node_user toneBlue
class node_project,node_archive,node_apk,node_crypto,node_resource_load,node_script_decomp,node_resource_restore,node_plugin_config,node_output toneAmber
class node_resource_convert,node_pck_create,node_translation toneMint
class node_plugin_manager,node_plugin_sources toneRose
class node_remote_services toneIndigo
```

## Components

### User entry points

- [GUI recovery](https://github.com/gdretools/gdsdecomp/blob/master/editor/gdre_editor.cpp): `editor/gdre_editor.cpp`
- [CLI commands](https://github.com/gdretools/gdsdecomp/blob/master/utility/cli_helper.h): `utility/cli_helper.h`

### Project recovery

- [Project loading](https://github.com/gdretools/gdsdecomp/blob/master/utility/gdre_settings.h): `utility/gdre_settings.h`
- [Pack extraction](https://github.com/gdretools/gdsdecomp/blob/master/utility/pck_dumper.cpp): `utility/pck_dumper.cpp`
- [APK access](https://github.com/gdretools/gdsdecomp/blob/master/utility/file_access_apk.cpp): `utility/file_access_apk.cpp`
- [Encrypted access](https://github.com/gdretools/gdsdecomp/blob/master/crypto/file_access_encrypted_custom.cpp): `crypto/file_access_encrypted_custom.cpp`
- [Legacy resource loading](https://github.com/gdretools/gdsdecomp/blob/master/compat/resource_loader_compat.cpp): `compat/resource_loader_compat.cpp`
- [GDScript decompilation](https://github.com/gdretools/gdsdecomp/blob/master/bytecode/bytecode_base.cpp): `bytecode/bytecode_base.cpp`
- [Resource restoration](https://github.com/gdretools/gdsdecomp/tree/master/exporters): `exporters`
- [Plugin configuration](https://github.com/gdretools/gdsdecomp/blob/master/utility/pcfg_loader.cpp): `utility/pcfg_loader.cpp`
- **Recovered project**

### Conversion tools

- [Text-binary conversion](https://github.com/gdretools/gdsdecomp/blob/master/compat/resource_compat_text.cpp): `compat/resource_compat_text.cpp`
- [Pack creation](https://github.com/gdretools/gdsdecomp/blob/master/utility/pck_creator.cpp): `utility/pck_creator.cpp`
- [Translation patching](https://github.com/gdretools/gdsdecomp/blob/master/exporters/translation_exporter.cpp): `exporters/translation_exporter.cpp`

### Extensions

- [Plugin manager](https://github.com/gdretools/gdsdecomp/blob/master/plugin_manager/plugin_manager.cpp): `plugin_manager/plugin_manager.cpp`
- [Plugin sources](https://github.com/gdretools/gdsdecomp/blob/master/plugin_manager/plugin_source.cpp): `plugin_manager/plugin_source.cpp`

### Other components

- **User**
- **Plugin hosting services**

## Connections

- User → GUI recovery: starts recovery
- User → CLI commands: runs command
- GUI recovery → Project loading: loads project (evidence: `editor/gdre_editor.cpp`)
- CLI commands → Project loading: loads project (evidence: `utility/gdre_settings.h`)
- Project loading → Pack extraction: extracts pack
- Project loading → APK access: reads APK
- Project loading → Encrypted access: decrypts data
- Project loading → Legacy resource loading: loads resources
- Project loading → GDScript decompilation: decompiles scripts (evidence: `bytecode/bytecode_base.cpp`)
- Project loading → Resource restoration: restores imports (evidence: `exporters/scene_exporter.cpp`)
- Project loading → Plugin configuration: recreates config
- Project loading → Recovered project: writes project
- User → Text-binary conversion: converts resources
- User → Pack creation: creates pack
- User → Translation patching: patches translations
- Plugin manager → Plugin sources: queries sources (evidence: `plugin_manager/plugin_manager.cpp`)
- Plugin sources → Plugin hosting services: fetches releases
