# giregls/php_symfony architecture

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

- Interactive diagram: https://gitdiagram.com/giregls/php_symfony
- Repository: https://github.com/giregls/php_symfony

## Overview

This Symfony application supports restaurant discovery and community reviews: visitors browse restaurants, filter by city, and view details; authenticated users can add restaurants, cities, and comments, while administrators can delete records. Controllers handle requests, bind Symfony forms, and persist domain entities through Doctrine. Registration and login provide the user-account path. A separate article CRUD area appears to be a smaller demonstration feature. The source excerpts show comment dispatch and its handler, but not transport configuration or the rendered templates, so those details are omitted.

Main entry points: [`src/Controller/RestaurantController.php`](https://github.com/giregls/php_symfony/blob/master/src/Controller/RestaurantController.php) (Restaurant actions), [`src/Controller/BddController.php`](https://github.com/giregls/php_symfony/blob/master/src/Controller/BddController.php) (Bdd actions), [`src/Controller/RegistrationController.php`](https://github.com/giregls/php_symfony/blob/master/src/Controller/RegistrationController.php) (Registration), [`src/Entity/Restaurant.php`](https://github.com/giregls/php_symfony/blob/master/src/Entity/Restaurant.php) (Restaurant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web requests"]
  node_restaurant_controller["Restaurant actions"]
  node_legacy_controller["Bdd actions<br/>[BddController.php]"]
  node_greeting_controller["Greeting action"]
  node_article_form["Article form<br/>[ArticleType.php]"]
  node_article["Article<br/>[Article.php]"]
  node_article_repository["Article repository"]
end

subgraph group_identity["Accounts"]
  node_security_controller["Login and logout"]
  node_registration_controller["Registration"]
  node_registration_form["Registration form"]
  node_user["User account<br/>[User.php]"]
  node_user_repository["User repository<br/>[UserRepository.php]"]
  node_legacy_city_entity["Legacy user record<br/>[Utilisateur.php]"]
  node_legacy_user_repository["Legacy user repository"]
end

subgraph group_domain["Restaurant domain"]
  node_restaurant_form["Restaurant form<br/>[RestaurantType.php]"]
  node_city_form["City form<br/>[VilleType.php]"]
  node_comment_form["Comment form"]
  node_restaurant["Restaurant<br/>[Restaurant.php]"]
  node_restaurant_repository["Restaurant repository"]
  node_city["City<br/>[Ville.php]"]
  node_city_repository["City repository"]
  node_comment["Review comment<br/>[Commentaire.php]"]
  node_comment_repository["Comment repository"]
  node_legacy_comment_repository["Legacy comment repository"]
end

subgraph group_messaging["Comment processing"]
  node_comment_message["New-comment message"]
  node_comment_handler["Comment handler"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests restaurants"| node_restaurant_controller
node_visitor -->|"registers"| node_registration_controller
node_visitor -->|"signs in"| node_security_controller
node_visitor -->|"requests articles"| node_legacy_controller
node_registration_controller -->|"binds form"| node_registration_form
node_registration_controller -->|"creates account"| node_user
node_registration_controller -->|"redirects after registration"| node_visitor
node_user_repository -->|"upgrades password"| node_user
node_restaurant_controller -->|"queries restaurants"| node_restaurant_repository
node_restaurant_controller -->|"queries cities"| node_city_repository
node_restaurant_controller -->|"binds form"| node_restaurant_form
node_restaurant_controller -->|"binds form"| node_city_form
node_restaurant_controller -->|"binds form"| node_comment_form
node_restaurant_controller -->|"persists restaurant"| node_restaurant
node_restaurant_controller -->|"persists city"| node_city
node_restaurant_controller -->|"persists comment"| node_comment
node_restaurant_controller -->|"assigns owner"| node_user
node_restaurant_controller -->|"dispatches message"| node_comment_message
node_comment_handler -->|"handles message"| node_comment_message
node_comment_handler -->|"loads comment"| node_comment_repository
node_restaurant -->|"references city"| node_city
node_restaurant -->|"owns comments"| node_comment
node_comment -->|"references author"| node_user
node_legacy_controller -->|"binds form"| node_article_form
node_legacy_controller -->|"persists article"| node_article
node_legacy_controller -->|"receives repository"| node_article_repository
node_legacy_controller -->|"persists restaurant"| node_restaurant

click node_restaurant_controller "https://github.com/giregls/php_symfony/blob/master/src/Controller/RestaurantController.php"
click node_legacy_controller "https://github.com/giregls/php_symfony/blob/master/src/Controller/BddController.php"
click node_greeting_controller "https://github.com/giregls/php_symfony/blob/master/src/Controller/HellcontrollerController.php"
click node_security_controller "https://github.com/giregls/php_symfony/blob/master/src/Controller/SecurityController.php"
click node_registration_controller "https://github.com/giregls/php_symfony/blob/master/src/Controller/RegistrationController.php"
click node_registration_form "https://github.com/giregls/php_symfony/blob/master/src/Form/RegistrationFormType.php"
click node_user "https://github.com/giregls/php_symfony/blob/master/src/Entity/User.php"
click node_user_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/UserRepository.php"
click node_restaurant_form "https://github.com/giregls/php_symfony/blob/master/src/Form/RestaurantType.php"
click node_city_form "https://github.com/giregls/php_symfony/blob/master/src/Form/VilleType.php"
click node_comment_form "https://github.com/giregls/php_symfony/blob/master/src/Form/CommentaireType.php"
click node_restaurant "https://github.com/giregls/php_symfony/blob/master/src/Entity/Restaurant.php"
click node_restaurant_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/RestaurantRepository.php"
click node_city "https://github.com/giregls/php_symfony/blob/master/src/Entity/Ville.php"
click node_city_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/VilleRepository.php"
click node_comment "https://github.com/giregls/php_symfony/blob/master/src/Entity/Commentaire.php"
click node_comment_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/CommentaireRepository.php"
click node_comment_message "https://github.com/giregls/php_symfony/blob/master/src/Message/NouveauCommentaire.php"
click node_comment_handler "https://github.com/giregls/php_symfony/blob/master/src/MessageHandler/NouveauCommentaireHandler.php"
click node_article_form "https://github.com/giregls/php_symfony/blob/master/src/Form/ArticleType.php"
click node_article "https://github.com/giregls/php_symfony/blob/master/src/Entity/Article.php"
click node_article_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/ArticleRepository.php"
click node_legacy_comment_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/CommentaireRepository.php"
click node_legacy_city_entity "https://github.com/giregls/php_symfony/blob/master/src/Entity/Utilisateur.php"
click node_legacy_user_repository "https://github.com/giregls/php_symfony/blob/master/src/Repository/UtilisateurRepository.php"

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_restaurant_controller,node_legacy_controller,node_greeting_controller,node_article_form,node_article,node_article_repository toneBlue
class node_security_controller,node_registration_controller,node_registration_form,node_user,node_user_repository,node_legacy_city_entity,node_legacy_user_repository toneAmber
class node_restaurant_form,node_city_form,node_comment_form,node_restaurant,node_restaurant_repository,node_city,node_city_repository,node_comment,node_comment_repository,node_legacy_comment_repository toneMint
class node_comment_message,node_comment_handler toneRose
class node_visitor toneIndigo
```

## Components

### Web requests

- [Restaurant actions](https://github.com/giregls/php_symfony/blob/master/src/Controller/RestaurantController.php): `src/Controller/RestaurantController.php`
- [Bdd actions](https://github.com/giregls/php_symfony/blob/master/src/Controller/BddController.php): `src/Controller/BddController.php`
- [Greeting action](https://github.com/giregls/php_symfony/blob/master/src/Controller/HellcontrollerController.php): `src/Controller/HellcontrollerController.php`
- [Article form](https://github.com/giregls/php_symfony/blob/master/src/Form/ArticleType.php): `src/Form/ArticleType.php`
- [Article](https://github.com/giregls/php_symfony/blob/master/src/Entity/Article.php): `src/Entity/Article.php`
- [Article repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/ArticleRepository.php): `src/Repository/ArticleRepository.php`

### Accounts

- [Login and logout](https://github.com/giregls/php_symfony/blob/master/src/Controller/SecurityController.php): `src/Controller/SecurityController.php`
- [Registration](https://github.com/giregls/php_symfony/blob/master/src/Controller/RegistrationController.php): `src/Controller/RegistrationController.php`
- [Registration form](https://github.com/giregls/php_symfony/blob/master/src/Form/RegistrationFormType.php): `src/Form/RegistrationFormType.php`
- [User account](https://github.com/giregls/php_symfony/blob/master/src/Entity/User.php): `src/Entity/User.php`
- [User repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/UserRepository.php): `src/Repository/UserRepository.php`
- [Legacy user record](https://github.com/giregls/php_symfony/blob/master/src/Entity/Utilisateur.php): `src/Entity/Utilisateur.php`
- [Legacy user repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/UtilisateurRepository.php): `src/Repository/UtilisateurRepository.php`

### Restaurant domain

- [Restaurant form](https://github.com/giregls/php_symfony/blob/master/src/Form/RestaurantType.php): `src/Form/RestaurantType.php`
- [City form](https://github.com/giregls/php_symfony/blob/master/src/Form/VilleType.php): `src/Form/VilleType.php`
- [Comment form](https://github.com/giregls/php_symfony/blob/master/src/Form/CommentaireType.php): `src/Form/CommentaireType.php`
- [Restaurant](https://github.com/giregls/php_symfony/blob/master/src/Entity/Restaurant.php): `src/Entity/Restaurant.php`
- [Restaurant repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/RestaurantRepository.php): `src/Repository/RestaurantRepository.php`
- [City](https://github.com/giregls/php_symfony/blob/master/src/Entity/Ville.php): `src/Entity/Ville.php`
- [City repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/VilleRepository.php): `src/Repository/VilleRepository.php`
- [Review comment](https://github.com/giregls/php_symfony/blob/master/src/Entity/Commentaire.php): `src/Entity/Commentaire.php`
- [Comment repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/CommentaireRepository.php): `src/Repository/CommentaireRepository.php`
- [Legacy comment repository](https://github.com/giregls/php_symfony/blob/master/src/Repository/CommentaireRepository.php): `src/Repository/CommentaireRepository.php`

### Comment processing

- [New-comment message](https://github.com/giregls/php_symfony/blob/master/src/Message/NouveauCommentaire.php): `src/Message/NouveauCommentaire.php`
- [Comment handler](https://github.com/giregls/php_symfony/blob/master/src/MessageHandler/NouveauCommentaireHandler.php): `src/MessageHandler/NouveauCommentaireHandler.php`

### Other components

- **Visitor**

## Connections

- Visitor → Restaurant actions: requests restaurants
- Visitor → Registration: registers
- Visitor → Login and logout: signs in
- Visitor → Bdd actions: requests articles
- Registration → Registration form: binds form (evidence: `src/Controller/RegistrationController.php`)
- Registration → User account: creates account (evidence: `src/Controller/RegistrationController.php`)
- Registration → Visitor: redirects after registration (evidence: `src/Controller/RegistrationController.php`)
- User repository → User account: upgrades password (evidence: `src/Repository/UserRepository.php`)
- Restaurant actions → Restaurant repository: queries restaurants (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → City repository: queries cities (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → Restaurant form: binds form (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → City form: binds form (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → Comment form: binds form (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → Restaurant: persists restaurant (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → City: persists city (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → Review comment: persists comment (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → User account: assigns owner (evidence: `src/Controller/RestaurantController.php`)
- Restaurant actions → New-comment message: dispatches message (evidence: `src/Controller/RestaurantController.php`)
- Comment handler → New-comment message: handles message (evidence: `src/MessageHandler/NouveauCommentaireHandler.php`)
- Comment handler → Comment repository: loads comment (evidence: `src/MessageHandler/NouveauCommentaireHandler.php`)
- Restaurant → City: references city (evidence: `src/Entity/Restaurant.php`)
- Restaurant → Review comment: owns comments (evidence: `src/Entity/Restaurant.php`)
- Review comment → User account: references author (evidence: `src/Entity/Commentaire.php`)
- Bdd actions → Article form: binds form (evidence: `src/Controller/BddController.php`)
- Bdd actions → Article: persists article (evidence: `src/Controller/BddController.php`)
- Bdd actions → Article repository: receives repository (evidence: `src/Controller/BddController.php`)
- Bdd actions → Restaurant: persists restaurant (evidence: `src/Controller/BddController.php`)
