# sakamochanq/rootify architecture

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

- Interactive diagram: https://gitdiagram.com/sakamochanq/rootify
- Repository: https://github.com/sakamochanq/rootify

## Overview

##### Project type and purpose
- This is a .NET desktop application (C#, Visual Studio Solution) named Rootify.
- Purpose: a TreeViewer that lets users build or import a directory tree as “nodes,” edit those nodes, and export the tree structure as plain text.

##### File structure
- Top‐level:
- assets/ – logos and demo GIF
- src/ – contains the Visual Studio solution Rootify.sln and project
- src/Rootify:
- Program.cs – application entry point
- App.config & app.manifest – application configuration
- Properties/ – assembly info, resources, settings
- lib/ – domain classes (Data.cs, Node.cs, Project.cs)
- packages.config – external NuGet dependencies (System.Text.Json)
- No separate “frontend/backend” folders—UI and core logic coexist in the same project, but can be viewed as two logical layers.

##### README for additional insights
- Key features:
- Create/edit nodes manually or by reading an existing directory structure
- Export the resulting tree as text
- Technical stack: .NET (C#), System.Text.Json for serialization

##### Final advice
- Be detailed: break down the lib/ folder into its three classes and show how each contributes to tree management.
- Essential elements: UI events, file system scanning, JSON persistence, text output.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    subgraph "UI Layer"
        direction TB
        Program["Program.cs<br/>(Entry Point)"]:::ui
        MainForm["MainForm (Source.cs)"]:::ui
    end

    %% Core Domain Layer
    subgraph "Core Domain Layer"
        direction TB
        NodeModel["Node.cs<br/>(Tree Node)"]:::domain
        ProjectModel["Project.cs<br/>(Node Container)"]:::domain
    end

    %% I/O & Serialization
    subgraph "I/O & Serialization"
        direction TB
        DataModule["Data.cs<br/>(FileSystem Adapter<br/>Serialization<br/>Export Module)"]:::io
        NuGet["packages.config<br/>(System.Text.Json)"]:::io
    end

    %% Configuration & Resources
    subgraph "Configuration & Resources"
        direction TB
        AppConfig["App.config"]:::config
        Manifest["app.manifest"]:::config
        AssemblyInfo["AssemblyInfo.cs"]:::config
        ResourcesResx["Resources.resx"]:::config
        SettingsFile["Settings.settings"]:::config
        AssetsDir["assets/"]:::config
    end

    %% Relationships
    Program -->|"launches"| MainForm
    MainForm -->|"calls create/edit"| NodeModel
    MainForm -->|"calls create/edit"| ProjectModel
    MainForm -->|"requests import"| DataModule
    NodeModel <-->|"serialize/deserialize"| DataModule
    ProjectModel <-->|"serialize/deserialize"| DataModule
    ProjectModel -->|"prepare text"| DataModule
    DataModule -->|"returns text"| MainForm
    AppConfig --> MainForm
    AppConfig --> NodeModel
    Manifest --> MainForm
    AssemblyInfo --> NodeModel
    ResourcesResx --> MainForm
    SettingsFile --> NodeModel
    AssetsDir --> MainForm

    %% Click Events
    click Program "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/Program.cs"
    click MainForm "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/Source.cs"
    click NodeModel "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/lib/Node.cs"
    click ProjectModel "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/lib/Project.cs"
    click DataModule "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/lib/Data.cs"
    click NuGet "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/packages.config"
    click AppConfig "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/App.config"
    click Manifest "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/app.manifest"
    click AssemblyInfo "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/Properties/AssemblyInfo.cs"
    click ResourcesResx "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/Properties/Resources.resx"
    click SettingsFile "https://github.com/sakamochanq/rootify/blob/master/src/Rootify/Properties/Settings.settings"
    click AssetsDir "https://github.com/sakamochanq/rootify/tree/master/assets/"

    %% Styles
    classDef ui fill:#AED6F1,stroke:#1F618D,color:#1B2631;
    classDef domain fill:#ABEBC6,stroke:#1D8348,color:#1B2631;
    classDef io fill:#F9E79F,stroke:#B7950B,color:#1B2631;
    classDef config fill:#D5D8DC,stroke:#566573,color:#1B2631;
```
