# firepixel85/tasker-labs architecture

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

- Interactive diagram: https://gitdiagram.com/firepixel85/tasker-labs
- Repository: https://github.com/firepixel85/tasker-labs

## Overview

##### Project Type and Purpose
- This is a standalone Godot Engine application (“Tasker Labs”) that implements a task‐management UI.
- It consists of multiple Godot Scenes (tscn files), GDScript logic modules, visual assets (textures, shaders, fonts), and a single‐hosted addon plugin.

##### File Structure to Extract Components
Top‐level directories each correspond to a Scene “module”:
- Main (launch/entry scene + scripts: Greeting.gd, Saving.gd, Warnings.gd, rtv.gd)
- Orientation (tutorial/privacy pledge)
- Daily UI + Daily Task (daily task presentation & instantiation)
- Overview (aggregate view of tasks)
- New Task / Edit (task creation & editing)
- Pop Up (modal dialogs)
- Settings (preferences UI + toggles)
- Sidebar (navigation panel)
- Update (app version update scene)
- Debug (development/debug tools + Theme Debug scene)
- addons/SmoothScroll (plugin providing scroll container and dampers)
Core config files: project.godot, export_presets.cfg.

##### README for Insights
- No external services or microservices—pure single‐binary Godot app.
- Persistence is file‐based (likely using Saving.gd to write JSON or Godot’s ConfigFile).
- UI navigation flows from Main → Orientation (once) → Sidebar‐driven Scenes.

##### Main Components & Their Relationships
a. Godot Engine Runtime (host)
b. Scene Modules (Main, Orientation, DailyUI, Overview, NewTask, PopUp, Settings, Sidebar, Update, Debug)
c. Script Modules (GDScript files under each Scene directory)
d. Asset Resources (Textures, Shaders in Theme; plugin assets)
e. Persistence Layer (Saving.gd + local JSON/ConfigFile)
f. Addon Plugin (SmoothScroll)

Relationships & Data Flow:
- The Godot Engine loads project.godot → Main.tscn.
- Main.gd scripts initialize global state (load saved data via Saving.gd).
- Sidebar navigation emits signals to swap child Scenes in the root viewport.
- Each Scene’s controller scripts (e.g., Daily Handler.gd, Task Instantiator.gd, Overview Task Instantiator.gd) read from/write to the in‐memory task model.
- On user actions (add/edit/complete task), scripts update model then invoke Saving.gd to persist changes.
- The SmoothScroll addon interposes on UI containers to provide custom scrolling behavior.

##### Architectural Patterns & Principles
- Scene‐Tree Modularization: each feature lives in its own Scene directory with its tscn + scripts.
- Signal‐Driven Navigation: Scenes communicate via Godot Signals (Sidebar → Main → Scenes).
- Single Source of Truth: a central “task model” loaded/saved by Saving.gd.
- Resource Separation: Theme folder holds all visual styling; Addon folder is isolated.
- No external dependencies—pure client app.

##### Be Detailed, Yet Structured
- Call out shared scripts (e.g., Saving.gd is a shared service).
- Plugin as “attaching” to UI container nodes rather than being in the Scene‐tree itself.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Engine
    GodotEngine["Godot Engine Runtime"]:::engine
    Persistence["Persistence Layer\n(Saving.gd + Local File)"]:::persistence
    Theme["Theme Resources"]:::resource
    Plugin["SmoothScroll Addon Plugin"]:::plugin

    subgraph "UI Modules"
        direction TB
        MainScene["Main Scene"]:::scene
        Orientation["Orientation Scene"]:::scene
        DailyUI["Daily UI Scene"]:::scene
        DailyTask["Daily Task Scene"]:::scene
        Overview["Overview Scene"]:::scene
        NewTask["New Task/Edit Scene"]:::scene
        PopUp["Pop Up Scene"]:::scene
        Settings["Settings Scene"]:::scene
        Sidebar["Sidebar Scene"]:::scene
        UpdateScene["Update Scene"]:::scene
        DebugScene["Debug Scene"]:::scene
    end

    %% Relationships
    GodotEngine -->|loads project.godot| MainScene
    MainScene -->|once| Orientation
    MainScene -->|init and loads model| Persistence
    Sidebar -->|navigation signals| MainScene
    Sidebar -->|drives| DailyUI
    Sidebar -->|drives| Overview
    Sidebar -->|drives| NewTask
    Sidebar -->|drives| PopUp
    Sidebar -->|drives| Settings
    Sidebar -->|drives| UpdateScene
    Sidebar -->|drives| DebugScene
    DailyUI -->|reads/writes| Persistence
    DailyTask -->|reads/writes| Persistence
    Overview -->|reads/writes| Persistence
    NewTask -->|reads/writes| Persistence
    PopUp -->|reads/writes| Persistence
    Settings -->|reads/writes| Persistence
    DebugScene -->|reads/writes| Persistence
    MainScene -->|uses resource| Theme
    Orientation -->|uses resource| Theme
    DailyUI -->|uses resource| Theme
    DailyTask -->|uses resource| Theme
    Overview -->|uses resource| Theme
    NewTask -->|uses resource| Theme
    PopUp -->|uses resource| Theme
    Settings -->|uses resource| Theme
    DebugScene -->|uses resource| Theme
    Sidebar -->|uses plugin| Plugin
    DailyUI -->|uses plugin| Plugin
    DailyTask -->|uses plugin| Plugin
    Overview -->|uses plugin| Plugin
    NewTask -->|uses plugin| Plugin
    PopUp -->|uses plugin| Plugin
    Settings -->|uses plugin| Plugin
    DebugScene -->|uses plugin| Plugin

    %% Click Events
    click GodotEngine "https://github.com/firepixel85/tasker-labs/blob/main/project.godot"
    click Persistence "https://github.com/firepixel85/tasker-labs/blob/main/Main/Scripts/Saving.gd"
    click Theme "https://github.com/firepixel85/tasker-labs/blob/main/Theme/Main Theme.tres"
    click Plugin "https://github.com/firepixel85/tasker-labs/blob/main/addons/SmoothScroll/plugin.cfg"
    click MainScene "https://github.com/firepixel85/tasker-labs/blob/main/Main/main.tscn"
    click Orientation "https://github.com/firepixel85/tasker-labs/blob/main/Orientation/Orientation.tscn"
    click DailyUI "https://github.com/firepixel85/tasker-labs/blob/main/Daily UI/Daily UI.tscn"
    click DailyTask "https://github.com/firepixel85/tasker-labs/blob/main/Daily Task/Daily Task.tscn"
    click Overview "https://github.com/firepixel85/tasker-labs/blob/main/Overview/Overview.tscn"
    click NewTask "https://github.com/firepixel85/tasker-labs/blob/main/New Task/New Task.tscn"
    click PopUp "https://github.com/firepixel85/tasker-labs/blob/main/Pop Up/Pop Up.tscn"
    click Settings "https://github.com/firepixel85/tasker-labs/blob/main/Settings/Settings.tscn"
    click Sidebar "https://github.com/firepixel85/tasker-labs/blob/main/Sidebar/sidebar.tscn"
    click UpdateScene "https://github.com/firepixel85/tasker-labs/blob/main/Update/Update.tscn"
    click DebugScene "https://github.com/firepixel85/tasker-labs/blob/main/Debug/Theme Debug.tscn"

    %% Styles
    classDef engine fill:#c8e6c9,stroke:#2e7d32,color:#000
    classDef scene fill:#bbdefb,stroke:#0d47a1,color:#000
    classDef persistence fill:#e0e0e0,stroke:#424242,color:#000
    classDef resource fill:#fff59d,stroke:#f9a825,color:#000
    classDef plugin fill:#ffcc80,stroke:#ef6c00,color:#000
```
