# mynameisdinak/allocation_room_project architecture

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

- Interactive diagram: https://gitdiagram.com/mynameisdinak/allocation_room_project
- Repository: https://github.com/mynameisdinak/allocation_room_project
- Video tour (about a minute): https://gitdiagram.com/mynameisdinak/allocation_room_project/video

## Overview

AllocationRoom is a Java Swing tool for organizing a group’s room assignments. The visible workflow is to create a group, configure room preferences and mutual dislikes, generate a naive assignment, evaluate jealousy, and inspect or adjust the result. The domain layer holds people, preferences, validation issues, and assignments; the two algorithm classes build assignments and score them. The README describes the package roles, while some UI behavior is omitted from the excerpt, so the graph limits links to visible code and indexed references.

Main entry points: [`src/ui/ui/FenetrePrincipale.java`](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/ui/ui/FenetrePrincipale.java) (Main window), [`src/domain/Personne.java`](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Personne.java) (Person), [`src/domain/Groupe.java`](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Groupe.java) (Group), [`src/domain/Affectation.java`](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Affectation.java) (Room assignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_window["Main window"]
end

subgraph group_algorithms["Assignment algorithms"]
  node_naive["Naive allocator"]
  node_jealousy["Jealousy scorer<br/>[Jalousie.java]"]
end

subgraph group_domain["Domain model"]
  node_group["Group<br/>[Groupe.java]"]
  node_person["Person<br/>[Personne.java]"]
  node_preferences["Room preferences<br/>[Preferences.java]"]
  node_preference_issue["Preference issues"]
  node_assignment["Room assignment<br/>[Affectation.java]"]
end

node_user(("Organizer"))

node_user -->|"uses"| node_window
node_window -->|"creates and configures"| node_group
node_window -->|"requests assignment"| node_naive
node_window -->|"requests score"| node_jealousy
node_window -->|"displays and adjusts"| node_assignment
node_group -->|"creates and manages"| node_person
node_group -->|"sets"| node_preferences
node_group -->|"reports"| node_preference_issue
node_person -->|"holds"| node_preferences
node_preferences -->|"diagnoses"| node_preference_issue
node_naive -->|"reads preferences and dislikes"| node_person
node_naive -->|"builds"| node_assignment
node_jealousy -->|"reads preferences and dislikes"| node_person
node_jealousy -->|"reads room allocations"| node_assignment
node_assignment -->|"keys allocations by"| node_person

click node_window "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/ui/ui/FenetrePrincipale.java"
click node_group "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Groupe.java"
click node_person "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Personne.java"
click node_preferences "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Preferences.java"
click node_preference_issue "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/PreferencesIssue.java"
click node_assignment "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Affectation.java"
click node_naive "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/algorithm/AffectationNaive.java"
click node_jealousy "https://github.com/mynameisdinak/allocation_room_project/blob/main/src/algorithm/Jalousie.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_window toneBlue
class node_naive,node_jealousy toneAmber
class node_group,node_person,node_preferences,node_preference_issue,node_assignment toneMint
class node_user toneIndigo
```

## Components

### Desktop UI

- [Main window](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/ui/ui/FenetrePrincipale.java): `src/ui/ui/FenetrePrincipale.java`

### Assignment algorithms

- [Naive allocator](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/algorithm/AffectationNaive.java): `src/algorithm/AffectationNaive.java`
- [Jealousy scorer](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/algorithm/Jalousie.java): `src/algorithm/Jalousie.java`

### Domain model

- [Group](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Groupe.java): `src/domain/Groupe.java`
- [Person](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Personne.java): `src/domain/Personne.java`
- [Room preferences](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Preferences.java): `src/domain/Preferences.java`
- [Preference issues](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/PreferencesIssue.java): `src/domain/PreferencesIssue.java`
- [Room assignment](https://github.com/mynameisdinak/allocation_room_project/blob/main/src/domain/Affectation.java): `src/domain/Affectation.java`

### Other components

- **Organizer**

## Connections

- Organizer → Main window: uses (evidence: `src/ui/ui/FenetrePrincipale.java`)
- Main window → Group: creates and configures (evidence: `src/ui/ui/FenetrePrincipale.java`)
- Main window → Naive allocator: requests assignment (evidence: `src/ui/ui/FenetrePrincipale.java`)
- Main window → Jealousy scorer: requests score (evidence: `src/ui/ui/FenetrePrincipale.java`)
- Main window → Room assignment: displays and adjusts (evidence: `src/ui/ui/FenetrePrincipale.java`)
- Group → Person: creates and manages (evidence: `src/domain/Groupe.java`)
- Group → Room preferences: sets (evidence: `src/domain/Groupe.java`)
- Group → Preference issues: reports (evidence: `src/domain/Groupe.java`)
- Person → Room preferences: holds (evidence: `src/domain/Personne.java`)
- Room preferences → Preference issues: diagnoses (evidence: `src/domain/Preferences.java`)
- Naive allocator → Person: reads preferences and dislikes (evidence: `src/algorithm/AffectationNaive.java`)
- Naive allocator → Room assignment: builds (evidence: `src/algorithm/AffectationNaive.java`)
- Jealousy scorer → Person: reads preferences and dislikes (evidence: `src/algorithm/Jalousie.java`)
- Jealousy scorer → Room assignment: reads room allocations (evidence: `src/algorithm/Jalousie.java`)
- Room assignment → Person: keys allocations by (evidence: `src/domain/Affectation.java`)
