# tmaszrit/peerevalsc architecture

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

- Interactive diagram: https://gitdiagram.com/tmaszrit/peerevalsc
- Repository: https://github.com/tmaszrit/peerevalsc

## Overview

- Data Source Layer: Represent the external CSV files (located under the “data” directory) as the raw data source for peer evaluation submissions.
- Data Ingestion/Parsing: Include the EvalParser component which reads and processes CSV files. This module is responsible for converting raw CSV data into domain objects.
- Domain/Model Layer: Capture the core domain objects such as Course, Eval, EvalMessage, Student, and Team. This layer represents the application’s business logic.
- Presentation/View Layer: Show the JavaFX-based GUI components. This includes components like PeerEvalGUI, EvalPane, StudentPane, MailDialog, and supporting widgets. The primary and secondary FXML files in the resources/activities folder also belong here.
- Application Bootstrap: Include the main entry points like HelloFX, which likely initialize the JavaFX application.
- Build & Configuration: Although not a component in runtime, the pom.xml denotes Maven managing dependencies (like JavaFX) and the module-info.java indicates the application’s modular design.

##### Relationships and Interactions
- From the Parsing module, show transformation into Domain Model objects. These objects (Course, Eval, etc.) are then used by the business logic.
- Communication between the Domain/Model Layer and the Presentation/View Layer. For instance, the GUI (PeerEvalGUI and its associated panes) fetches, displays, and likely manipulates these domain objects.
- The application bootstrap (HelloFX) ties the view and model layers together by instantiating the necessary components on application startup.
- Optionally, include testing (unit tests under src/test) that validate the correctness of these components.

##### Architectural Patterns and Key Technologies
- MVC pattern or its variation within the project. The separation between the model (data and business logic) and view (JavaFX UI) is clear.
- Use of Maven (pom.xml) for build management and dependency management, ensuring that all modules and libraries (like JavaFX) are integrated properly.
- Mention that the modular design (module-info.java) encourages clear module boundaries within the Java ecosystem.
- That the design supports CSV-based data ingestion which is typical for legacy data-driven systems where manual file data is processed.

##### Final Checklist
- All major components should be clearly labeled.
- If applicable, include a ‘Test’ block to represent unit tests as an ancillary component ensuring quality assurance.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Source Layer
    subgraph "Data Source Layer"
        DS1["CSV Data 2231"]:::external
        DS2["CSV Data 2235"]:::external
        DS3["CSV Data 2241"]:::external
    end

    %% Data Ingestion/Parsing
    subgraph "Data Ingestion/Parsing"
        EP["EvalParser (Data Ingestion)"]:::parser
    end

    %% Domain/Model Layer
    subgraph "Domain/Model Layer"
        COURSE["Course"]:::domain
        EVAL["Eval"]:::domain
        EVALMSG["EvalMessage"]:::domain
        STUDENT["Student"]:::domain
        TEAM["Team"]:::domain
    end

    %% Presentation/View Layer
    subgraph "Presentation/View Layer"
        PEER["PeerEvalGUI"]:::view
        EVALPANE["EvalPane"]:::view
        STUDPANE["StudentPane"]:::view
        MAIL["MailDialog"]:::view
        WIDGETS["Widgets"]:::view
        FXML1["Primary FXML"]:::view
        FXML2["Secondary FXML"]:::view
    end

    %% Application Bootstrap
    subgraph "Application Bootstrap"
        HELLO["HelloFX"]:::bootstrap
    end

    %% Build & Configuration
    subgraph "Build & Configuration"
        MAVEN["Maven Build (pom.xml)"]:::build
        MODULE["Modular Configuration (module-info.java)"]:::build
    end

    %% Connections from Data Source Layer to Data Ingestion/Parsing
    DS1 --> EP
    DS2 --> EP
    DS3 --> EP

    %% Connections from Data Ingestion/Parsing to Domain/Model Layer
    EP --> COURSE
    EP --> EVAL
    EP --> EVALMSG
    EP --> STUDENT
    EP --> TEAM

    %% Interaction between Domain/Model Layer and Presentation/View Layer
    COURSE -->|"updates"| PEER
    PEER -->|"triggers"| COURSE

    %% Application Bootstrap initiates components
    HELLO --> PEER
    HELLO --> EP

    %% Presentation/View Layer internal connections
    PEER --> EVALPANE
    PEER --> STUDPANE
    PEER --> MAIL
    PEER --> WIDGETS
    PEER --> FXML1
    PEER --> FXML2

    %% Build & Configuration influences Bootstrap
    MAVEN --> HELLO
    MODULE --> HELLO

    %% Styles
    classDef external fill:#FFDDC1,stroke:#333,stroke-width:2px;
    classDef parser fill:#C6E2FF,stroke:#333,stroke-width:2px;
    classDef domain fill:#E2FFC6,stroke:#333,stroke-width:2px;
    classDef view fill:#FFD6E2,stroke:#333,stroke-width:2px;
    classDef bootstrap fill:#D0E5FF,stroke:#333,stroke-width:2px;
    classDef build fill:#FFF2B2,stroke:#333,stroke-width:2px;

    %% Click Events for Data Source Layer
    click DS1 "https://github.com/tmaszrit/peerevalsc/tree/main/data/2231"
    click DS2 "https://github.com/tmaszrit/peerevalsc/tree/main/data/2235"
    click DS3 "https://github.com/tmaszrit/peerevalsc/tree/main/data/2241"

    %% Click Events for Data Ingestion/Parsing
    click EP "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/EvalParser.java"

    %% Click Events for Domain/Model Layer
    click COURSE "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/Course.java"
    click EVAL "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/Eval.java"
    click EVALMSG "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/EvalMessage.java"
    click STUDENT "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/Student.java"
    click TEAM "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/model/Team.java"

    %% Click Events for Presentation/View Layer
    click PEER "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/view/PeerEvalGUI.java"
    click EVALPANE "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/view/EvalPane.java"
    click STUDPANE "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/view/StudentPane.java"
    click MAIL "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/view/MailDialog.java"
    click WIDGETS "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/view/Widgets.java"
    click FXML1 "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/resources/activities/primary.fxml"
    click FXML2 "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/resources/activities/secondary.fxml"

    %% Click Event for Application Bootstrap
    click HELLO "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/peerevals/HelloFX.java"

    %% Click Events for Build & Configuration
    click MAVEN "https://github.com/tmaszrit/peerevalsc/blob/main/pom.xml"
    click MODULE "https://github.com/tmaszrit/peerevalsc/blob/main/src/main/java/module-info.java"
```
