# bardsoftware/ganttproject architecture

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

- Interactive diagram: https://gitdiagram.com/bardsoftware/ganttproject
- Repository: https://github.com/bardsoftware/ganttproject

## Overview

##### Main Components
- Presentation (UI) Layer:
– This module contains desktop-specific code (see directories such as “biz.ganttproject.desktop” and “ganttproject/src/main/java/biz/ganttproject/app”).
– It includes the main entry point (for example, “GanttProjectFxApp.kt”, “GanttProject.java”) and the various UI panels, dialogs, and charts.
- Core Business Logic Layer:
– Modules in “biz.ganttproject.core”, “biz.ganttproject.task”, “biz/ganttproject/customproperty”, “biz/ganttproject/chart” and “biz/ganttproject/storage” hold the primary scheduling algorithms, dependency processing, task hierarchy, calendar & timeline calculations, and persistence.
– This layer encapsulates the functional “engine” behind Gantt chart rendering, resource assignment, cost calculations, and schedule recalculations.
- Import/Export Modules:
– Organized as separate packages such as “biz.ganttproject.impex.ical”, “biz.ganttproject.impex.msproject2”, “ganttproject/src/main/java/biz/ganttproject/impex/csv”, “org.ganttproject.impex.htmlpdf” and others.
– These modules manage data serialization and conversion to/from formats like CSV, MS Project files, HTML/PDF documents, etc.
- Cloud and Collaboration Components:
– Found in “cloud.ganttproject.api” and “cloud.ganttproject.colloboque”, this part implements project file updating, remote API interactions (e.g., PostgreStorageApi.kt), and collaboration.
– They likely talk to a database and use web service protocols.
- Build & Packaging Infrastructure:
– “ganttproject-builder” contains Ant/Gradle build scripts, packaging for different platforms (Linux, macOS, Windows), installer scripts and property files.
– Also note the Gradle build system overall (build.gradle files at multiple levels).
- Auxiliary & Plugin System:
– The presence of plugin.xml files in multiple modules implies that there is dynamic or static plugin support.
– External libraries (“biz.ganttproject.app.libs”, “ganttproject/lib”, “biz/ganttproject.mxgraph”, etc.) provide additional reusable functionality such as UI widgets, CSV processing, and PGP or cryptography support.

##### Architectural Relationships and Data Flow
- The build & packaging system is separate from the runtime components, but it has dependencies on all of the above modules to generate the final executable/distribution. Represent it as an external process that “assembles” the modules.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Presentation (UI) Layer
    subgraph "Presentation (UI) Layer"
        UI1["Desktop Adapter (biz.ganttproject.desktop)"] 
        UI2["Application UI Entry (ganttproject/src/main/java/biz/ganttproject/app/GanttProjectFxApp.kt)"]
    end

    %% Core Business Logic Layer
    subgraph "Core Business Logic Layer"
        CORE["Core Scheduling Engine (biz.ganttproject.core)"]
    end

    %% Import/Export Modules
    subgraph "Import/Export Modules"
        ICAL["iCal Converter (biz.ganttproject.impex.ical)"]
        MSP["MSProject Exporter (biz.ganttproject.impex.msproject2)"]
        CSV["CSV Export (ganttproject impex CSV)"]
        HTML["HTML Exporter (org.ganttproject.impex.htmlpdf)"]
    end

    %% Cloud and Collaboration Components
    subgraph "Cloud & Collaboration"
        CAPI["Cloud API (cloud.ganttproject.api)"]
        COLLOB["Collaboration Server (cloud.ganttproject.colloboque)"]
    end

    %% Build & Packaging Infrastructure
    subgraph "Build & Packaging"
        BUILD["Build & Packaging"]
    end

    %% Auxiliary & Plugin System
    subgraph "Plugins & Extensions"
        PLUG["Plugin Descriptors"]
    end

    %% Third-party Dependencies
    subgraph "Third-party Dependencies"
        THIRD["Third-party Libraries"]
    end

    %% Relationships
    %% UI to Core
    UI1 -->|"initiatesAction"| CORE
    UI2 -->|"initiatesAction"| CORE

    %% Core to Import/Export
    CORE -->|"dataConversion"| ICAL
    CORE -->|"dataConversion"| MSP
    CORE -->|"dataConversion"| CSV
    CORE -->|"dataConversion"| HTML

    %% Core to Cloud
    CORE -->|"sync"| CAPI
    CORE -->|"sync"| COLLOB

    %% Plugins extend UI & Core (dotted lines)
    PLUG ---|"extends"| UI1
    PLUG ---|"extends"| UI2
    PLUG ---|"extends"| CORE

    %% Third-party libraries used by UI & Core (dotted lines)
    THIRD ---|"providesLibs"| UI1
    THIRD ---|"providesLibs"| CORE

    %% Build assembles all modules
    UI1 -->|"assembledBy"| BUILD
    UI2 -->|"assembledBy"| BUILD
    CORE -->|"assembledBy"| BUILD
    ICAL -->|"assembledBy"| BUILD
    MSP -->|"assembledBy"| BUILD
    CSV -->|"assembledBy"| BUILD
    HTML -->|"assembledBy"| BUILD
    CAPI -->|"assembledBy"| BUILD
    COLLOB -->|"assembledBy"| BUILD
    PLUG -->|"assembledBy"| BUILD

    %% Click Events
    click UI1 "https://github.com/bardsoftware/ganttproject/blob/master/biz/ganttproject.desktop/src/biz/ganttproject/desktop/DesktopAdapter.java"
    click UI2 "https://github.com/bardsoftware/ganttproject/blob/master/ganttproject/src/main/java/biz/ganttproject/app/GanttProjectFxApp.kt"
    click CORE "https://github.com/bardsoftware/ganttproject/blob/master/biz/ganttproject.core/src/main/java/biz/ganttproject/core/OperationStatus.java"
    click ICAL "https://github.com/bardsoftware/ganttproject/blob/master/biz/ganttproject.impex.ical/src/main/java/biz/ganttproject/impex/ical/IcsConverter.java"
    click MSP "https://github.com/bardsoftware/ganttproject/blob/master/biz/ganttproject.impex.msproject2/src/main/java/biz/ganttproject/impex/msproject2/ExporterToMsProjectFile.java"
    click CSV "https://github.com/bardsoftware/ganttproject/blob/master/ganttproject/src/main/java/biz/ganttproject/impex/csv/CSVExport.kt"
    click HTML "https://github.com/bardsoftware/ganttproject/blob/master/org/ganttproject.impex.htmlpdf/src/main/java/org/ganttproject/impex/htmlpdf/ExporterToHTML.java"
    click CAPI "https://github.com/bardsoftware/ganttproject/tree/master/cloud.ganttproject.api/gradlew"
    click COLLOB "https://github.com/bardsoftware/ganttproject/blob/master/cloud.ganttproject.colloboque/src/main/kotlin/cloud/ganttproject/colloboque/ColloboqueServer.kt"
    click BUILD "https://github.com/bardsoftware/ganttproject/blob/master/ganttproject-builder/build.gradle"
    click PLUG "https://github.com/bardsoftware/ganttproject/blob/master/biz.ganttproject.app.libs/plugin.xml"
    click THIRD "https://github.com/bardsoftware/ganttproject/blob/master/biz.ganttproject.app.libs/lib/biz.ganttproject.desktop.jar"

    %% Styles
    classDef presentation fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef core fill:#A9DFBF,stroke:#196F3D,stroke-width:2px;
    classDef impex fill:#FAD7A0,stroke:#B9770E,stroke-width:2px;
    classDef cloud fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
    classDef build fill:#D2B4DE,stroke:#6C3483,stroke-width:2px;
    classDef plugin fill:#FADBD8,stroke:#943126,stroke-width:2px;
    classDef thirdparty fill:#D5F5E3,stroke:#117864,stroke-width:2px;

    class UI1,UI2 presentation;
    class CORE core;
    class ICAL,MSP,CSV,HTML impex;
    class CAPI,COLLOB cloud;
    class BUILD build;
    class PLUG plugin;
    class THIRD thirdparty;
```
