# thomas28051984/symfony_teissier_construction architecture

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

- Interactive diagram: https://gitdiagram.com/thomas28051984/symfony_teissier_construction
- Repository: https://github.com/thomas28051984/symfony_teissier_construction

## Overview

##### Main System Components

a) Frontend Layer:
- Assets directory (JavaScript and CSS)
- Webpack Encore for asset management
- Twig templates structure
- Public media files

b) Application Layer:
- Controllers (organized by feature)
- Forms
- Security components

c) Data Layer:
- Entities
- Repositories
- Doctrine ORM
- Database migrations

d) Infrastructure:
- Symfony Framework
- Security system
- File storage system

**Client Layer (Browser)**
**↓**
**Frontend Layer (Twig + Assets)**
**↓**
**Application Layer (Controllers)**
**↓**
**Business Layer (Services, Forms)**
**↓**
**Data Access Layer (Repositories)**
**↓**
**Database Layer**

##### Component Details

Specific components:

Frontend Components:
- Templates directory structure
- Asset management (Webpack)
- Public media storage

Controller Layer:
- AdminPageController
- AvisClientController
- ChantierController
- ClientPageController
- Other feature controllers

Entity Layer:
- AvisClient
- Chantier
- File
- Role
- User

Supporting Components:
- Security (UserAuthenticator)
- Forms (Registration, Avis, Chantier)
- File management system

##### Key Relationships

Interactions:
- Controller → Repository
- Controller → Form
- Form → Entity
- Repository → Entity
- Security → User Entity

##### Infrastructure Elements

Include:
- Symfony Framework
- Doctrine ORM
- Twig Template Engine
- Webpack Encore
- Security System

##### The client/admin separation

Keep the abstraction level focused on the main architectural components while showing the specific features relevant to a construction company website (project showcase, client reviews, media management).

This architecture represents a typical Symfony application with specific customizations for a construction company's needs, emphasizing both content management and client interaction features.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
    end

    subgraph Frontend
        Assets["Asset Management"]:::frontend
        Templates["Template System"]:::frontend
        Media["Media Storage"]:::frontend
        WebpackConfig["Webpack Config"]:::frontend
    end

    subgraph Application
        AdminController["Admin Controller"]:::controller
        AvisController["Avis Controller"]:::controller
        ChantierController["Chantier Controller"]:::controller
        ClientController["Client Controller"]:::controller

        SecurityAuth["User Authenticator"]:::security
        
        AvisForm["Avis Form"]:::form
        ChantierForm["Chantier Form"]:::form
        RegistrationForm["Registration Form"]:::form
    end

    subgraph Domain
        AvisEntity["Avis Entity"]:::entity
        ChantierEntity["Chantier Entity"]:::entity
        FileEntity["File Entity"]:::entity
        UserEntity["User Entity"]:::entity
        RoleEntity["Role Entity"]:::entity
    end

    subgraph DataAccess
        AvisRepo["Avis Repository"]:::repository
        ChantierRepo["Chantier Repository"]:::repository
        FileRepo["File Repository"]:::repository
        UserRepo["User Repository"]:::repository
        
        Database[(Database)]:::database
    end

    %% Relationships
    Browser --> Assets
    Browser --> Templates
    Browser --> Media
    
    Assets --> Templates
    WebpackConfig --> Assets
    
    Templates --> AdminController
    Templates --> AvisController
    Templates --> ChantierController
    Templates --> ClientController
    
    AdminController --> SecurityAuth
    AvisController --> SecurityAuth
    ChantierController --> SecurityAuth
    ClientController --> SecurityAuth
    
    AdminController --> AvisRepo
    AdminController --> ChantierRepo
    AvisController --> AvisRepo
    ChantierController --> ChantierRepo
    ClientController --> UserRepo
    
    AvisController --> AvisForm
    ChantierController --> ChantierForm
    SecurityAuth --> RegistrationForm
    
    AvisForm --> AvisEntity
    ChantierForm --> ChantierEntity
    RegistrationForm --> UserEntity
    
    AvisRepo --> Database
    ChantierRepo --> Database
    FileRepo --> Database
    UserRepo --> Database

    %% Click Events
    click Assets "https://github.com/Thomas28051984/symfony_teissier_construction/tree/master/assets"
    click Templates "https://github.com/Thomas28051984/symfony_teissier_construction/tree/master/templates"
    click Media "https://github.com/Thomas28051984/symfony_teissier_construction/tree/master/public/media/images"
    click WebpackConfig "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/webpack.config.js"
    click AdminController "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Controller/AdminPageController.php"
    click AvisController "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Controller/AvisClientController.php"
    click ChantierController "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Controller/ChantierController.php"
    click ClientController "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Controller/ClientPageController.php"
    click SecurityAuth "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Security/UserAuthenticator.php"
    click AvisForm "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Form/AvisType.php"
    click ChantierForm "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Form/ChantierType.php"
    click RegistrationForm "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Form/RegistrationFormType.php"
    click AvisEntity "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Entity/AvisClient.php"
    click ChantierEntity "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Entity/Chantier.php"
    click FileEntity "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Entity/File.php"
    click UserEntity "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Entity/User.php"
    click RoleEntity "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Entity/Role.php"
    click AvisRepo "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Repository/AvisClientRepository.php"
    click ChantierRepo "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Repository/ChantierRepository.php"
    click FileRepo "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Repository/FileRepository.php"
    click UserRepo "https://github.com/Thomas28051984/symfony_teissier_construction/blob/master/src/Repository/UserRepository.php"

    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef controller fill:#2ecc71,stroke:#27ae60,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,color:white
    classDef form fill:#9b59b6,stroke:#8e44ad,color:white
    classDef entity fill:#f1c40f,stroke:#f39c12,color:black
    classDef repository fill:#e67e22,stroke:#d35400,color:white
    classDef database fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        L1["Frontend"]:::frontend
        L2["Controller"]:::controller
        L3["Security"]:::security
        L4["Form"]:::form
        L5["Entity"]:::entity
        L6["Repository"]:::repository
        L7["Database"]:::database
    end
```
