How j-c7/tinyconverter works
Project type and purpose
• From the file tree and README, this is a single, Godot-based desktop tool (“Tiny Converter”) whose sole purpose is converting images between JPG, PNG, and WebP.
• It uses Godot scenes for UI, a C# .NET project for logic, and a small plugin-style core for format support.
File structure
Top-level:
• scenes/ ← Godot scene files (main.tscn)
• prototype/ ← throwaway/test scripts (MoveUI.cs)
• src/ ← C# source code
– core/ ← domain & utility classes (FormatterNode, AttributesManager, Globals, Result, etc.)
– formats/ ← per-format implementations (JpgFormat, PngFormat, WebpFormat)
– main/ ← application bootstrap (App.cs, IApp.cs)
– ui/ ← UI managers & controllers (UIManager.cs, Roll.cs)
• Tiny Converter.sln/.csproj ← .NET solution & project files
• project.godot ← Godot project descriptor
README for additional insights
• Confirms the converter is in beta, uses Godot 4.4, and supports exactly three formats.
Main components & interactions
a. Components
1. Godot Engine Host
2. UI Layer (scenes/main.tscn, UIManager, Roll, MoveUI prototype)
3. Application Layer (IApp, App)
4. Core Domain Layer
• FormatterNode / IFormatterNode / AttributesManager / NodeExtends / Result
5. Format Modules (JpgFormat, PngFormat, WebpFormat)
7. External Libraries (Godot C# API, .NET Base Class Libraries)
b. Relationships & data flow
• User clicks UI button → UIManager (or Roll) captures event → calls IApp.Convert(image, targetFormat)
• App (application layer) delegates to Core’s FormatterNode → uses AttributesManager to validate → picks correct IFormatterNode implementation (JpgFormat/PngFormat/WebpFormat)
• Formatter writes output via Godot Image APIs or .NET I/O → saved to disk / content folder
• UI listens for completion events → updates scene (e.g. shows success notification)
c. Architectural patterns / principles
• Layered architecture: Presentation (UI), Application (App), Domain (core), Plugins (formats), Infrastructure (FS, Godot API)
• Dependency inversion via IApp and IFormatterNode interfaces
• Attribute-based validation / assertion (AssertNode in core/attributes)
• Mass-extendable: add new formats by implementing IFormatterNode
d. Key technologies & frameworks
• Godot 4.4 (scene graph, GDScript optional, here using C# binding)
• C# / .NET 7+ (csproj, sln)
• Godot C# API (loading scenes, responding to signals, file I/O)
• Custom domain library under src/core
Be detailed but not overwhelmed
• Every layer: UI, App, Core, Formats, Infrastructure.
• Do not fragment further into single classes; instead group classes by folder/layer.
[Godot Engine Host: project.godot]
|
v
[UI Layer – Scenes/main.tscn] → UIManager & Roll (src/ui)
|
v
[App Layer – IApp, App (src/main)]
|
v
[Core Domain – FormatterNode, AttributesManager, Globals, Result (src/core)]
|
v
[Format Plugins – JpgFormat, PngFormat, WebpFormat (src/formats)]
|
v