# arthurdelannoyazerty/beanartist architecture

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

- Interactive diagram: https://gitdiagram.com/arthurdelannoyazerty/beanartist
- Repository: https://github.com/arthurdelannoyazerty/beanartist

## Overview

##### Main Architectural Components

a. Model Layer (fr.eseo.pdlo.projet.artiste.modele)
- Core domain objects (Forme, Coordonnees)
- Interfaces (Coloriable, Remplissable)

b. View Layer (fr.eseo.pdlo.projet.artiste.vue)
- UI components (PanneauDessin, PanneauBarreOutils, PanneauBarreEtat)

c. Controller Layer (fr.eseo.pdlo.projet.artiste.controleur)
- This in the middle
- Actions (ActionChoisirCouleur, ActionChoisirForme, etc.)
- Tools (OutilForme and its implementations)

##### Specific Components

Model Layer:
- Forme (abstract class)
- Coordonnees
- Interfaces (Coloriable, Remplissable)

View Layer:
- Main UI panels (PanneauDessin, PanneauBarreOutils, PanneauBarreEtat)
- VueForme hierarchy

Controller Layer:
- Actions package (ActionChoisirCouleur, ActionEffacer, etc.)
- Outils package (OutilForme, OutilLigne, etc.)

##### Additional Elements
- A main entry point (EtreUnArtiste class)
- Utility classes (StoreNames)
- Test components in a separate section (if needed)

##### Flow Indicators
Main interaction flows:
- User input → Controller
- Controller → Model updates
- Model changes → View updates
- View rendering → User display

##### Notes
Notes for:
- Design patterns used
- Key architectural decisions
- Important dependencies
- Event handling mechanisms

- Grouping related components together
- Using straight lines for connections
- Maintaining consistent spacing
- Adding clear labels
- Using appropriate abstraction level (not showing every method)

This system design should effectively communicate the application's architecture while highlighting the MVC pattern and the relationships between different components of this drawing application.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef model fill:#d4edda,stroke:#28a745
    classDef view fill:#cce5ff,stroke:#007bff
    classDef controller fill:#fff3cd,stroke:#ffc107
    classDef interface fill:#e2e3e5,stroke:#6c757d
    classDef main fill:#f8d7da,stroke:#dc3545

    %% Main Entry Point
    Main[EtreUnArtiste]:::main
    click Main "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/EtreUnArtiste.java"

    %% Model Layer
    subgraph Model
        Coords[Coordonnees]:::model
        click Coords "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/Coordonnees.java"
        
        Forme[Forme]:::model
        click Forme "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Forme.java"
        
        Coloriable[Coloriable]:::interface
        click Coloriable "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/Coloriable.java"
        
        Remplissable[Remplissable]:::interface
        click Remplissable "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/Remplissable.java"
        
        Ligne[Ligne]:::model
        click Ligne "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Ligne.java"
        
        Cercle[Cercle]:::model
        click Cercle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Cercle.java"
        
        Ellipse[Ellipse]:::model
        click Ellipse "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Ellipse.java"
        
        Rectangle[Rectangle]:::model
        click Rectangle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Rectangle.java"
        
        Carre[Carre]:::model
        click Carre "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/modele/formes/Carre.java"
    end

    %% View Layer
    subgraph View
        PanneauDessin[PanneauDessin]:::view
        click PanneauDessin "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/ihm/PanneauDessin.java"
        
        PanneauBarreOutils[PanneauBarreOutils]:::view
        click PanneauBarreOutils "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/ihm/PanneauBarreOutils.java"
        
        PanneauBarreEtat[PanneauBarreEtat]:::view
        click PanneauBarreEtat "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/ihm/PanneauBarreEtat.java"
        
        VueForme[VueForme]:::view
        click VueForme "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueForme.java"
        
        VueLigne[VueLigne]:::view
        click VueLigne "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueLigne.java"
        
        VueCercle[VueCercle]:::view
        click VueCercle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueCercle.java"
        
        VueEllipse[VueEllipse]:::view
        click VueEllipse "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueEllipse.java"
        
        VueRectangle[VueRectangle]:::view
        click VueRectangle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueRectangle.java"
        
        VueCarre[VueCarre]:::view
        click VueCarre "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/vue/formes/VueCarre.java"
    end

    %% Controller Layer
    subgraph Controller
        ActionChoisirCouleur[ActionChoisirCouleur]:::controller
        click ActionChoisirCouleur "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/actions/ActionChoisirCouleur.java"
        
        ActionChoisirForme[ActionChoisirForme]:::controller
        click ActionChoisirForme "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/actions/ActionChoisirForme.java"
        
        ActionEffacer[ActionEffacer]:::controller
        click ActionEffacer "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/actions/ActionEffacer.java"
        
        OutilForme[OutilForme]:::controller
        click OutilForme "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilForme.java"
        
        OutilLigne[OutilLigne]:::controller
        click OutilLigne "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilLigne.java"
        
        OutilCercle[OutilCercle]:::controller
        click OutilCercle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilCercle.java"
        
        OutilEllipse[OutilEllipse]:::controller
        click OutilEllipse "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilEllipse.java"
        
        OutilRectangle[OutilRectangle]:::controller
        click OutilRectangle "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilRectangle.java"
        
        OutilCarre[OutilCarre]:::controller
        click OutilCarre "https://github.com/ArthurDelannoyazerty/BeAnArtist/blob/main/src/fr/eseo/pdlo/projet/artiste/controleur/outils/OutilCarre.java"
    end

    %% Relationships
    Main --> PanneauDessin
    Main --> PanneauBarreOutils
    Main --> PanneauBarreEtat

    Forme --> Coords
    Forme -.-> Coloriable
    Forme -.-> Remplissable
    
    Ligne --> Forme
    Cercle --> Forme
    Ellipse --> Forme
    Rectangle --> Forme
    Carre --> Rectangle

    VueForme --> Forme
    VueLigne --> VueForme
    VueCercle --> VueForme
    VueEllipse --> VueForme
    VueRectangle --> VueForme
    VueCarre --> VueRectangle

    OutilForme --> Forme
    OutilLigne --> OutilForme
    OutilCercle --> OutilForme
    OutilEllipse --> OutilForme
    OutilRectangle --> OutilForme
    OutilCarre --> OutilRectangle

    PanneauDessin --> VueForme
    PanneauBarreOutils --> ActionChoisirCouleur
    PanneauBarreOutils --> ActionChoisirForme
    PanneauBarreOutils --> ActionEffacer

    %% Legend
    subgraph Legend
        L1[Model]:::model
        L2[View]:::view
        L3[Controller]:::controller
        L4[Interface]:::interface
        L5[Main Entry]:::main
    end
```
