# florianroussarie/sae architecture

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

- Interactive diagram: https://gitdiagram.com/florianroussarie/sae
- Repository: https://github.com/florianroussarie/sae

## Overview

Share is a PHP application for sharing cooking videos and utensils. Its documented request workflow enters through the front controller, which selects a controller and invokes a requested method; the default request selects the video feed. The tree also shows separate account and video controllers, models/DAOs, and Twig views for authentication, video publication, and viewing. Their runtime connections are not visible in the supplied excerpts, so the graph keeps those subsystems distinct rather than assuming calls. The README provides no additional feature detail.

Main entry points: [`include.php`](https://github.com/florianroussarie/sae/blob/main/include.php) (Shared bootstrap), [`index.php`](https://github.com/florianroussarie/sae/blob/main/index.php) (Front controller), [`controllers/controller_factory.class.php`](https://github.com/florianroussarie/sae/blob/main/controllers/controller_factory.class.php) (Controller factory), [`controllers/controller_video.class.php`](https://github.com/florianroussarie/sae/blob/main/controllers/controller_video.class.php) (Video controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request handling"]
  node_front["Front controller<br/>[index.php]"]
  node_bootstrap["Shared bootstrap<br/>[include.php]"]
  node_factory["Controller factory"]
end

subgraph group_domain["Application domains"]
  node_account_controller["Account controller"]
  node_video_controller["Video controller"]
  node_account_model["Account model<br/>[compte.class.php]"]
  node_video_model["Video model<br/>[video.class.php]"]
end

subgraph group_persistence["Data access"]
  node_account_dao["Account DAO<br/>[compte.dao.php]"]
  node_video_dao["Video DAO<br/>[video.dao.php]"]
  node_database[("Database connection<br/>[bd.class.php]")]
  node_configuration["Application configuration<br/>[config.class.php]"]
end

subgraph group_views["Twig views"]
  node_twig_config["Twig setup<br/>[twig.php]"]
  node_base_template["Base layout"]
  node_account_views["Account views"]
  node_registration_view["Registration view"]
  node_video_views["Video views<br/>[video.html.twig]"]
  node_feed_view["Video feed view"]
  node_publication_view["Video publication view"]
end

node_visitor(("Browser visitor"))

node_visitor -->|"requests page"| node_front
node_front -->|"loads"| node_bootstrap
node_front -->|"selects controller"| node_factory
node_front -.->|"invokes method"| node_video_controller
node_bootstrap -->|"loads"| node_configuration
node_bootstrap -->|"loads"| node_twig_config
node_bootstrap -->|"loads"| node_database
node_bootstrap -->|"loads"| node_factory
node_bootstrap -->|"loads"| node_account_controller
node_bootstrap -->|"loads"| node_video_controller
node_bootstrap -->|"loads"| node_account_model
node_bootstrap -->|"loads"| node_account_dao
node_bootstrap -->|"loads"| node_video_model
node_bootstrap -->|"loads"| node_video_dao

click node_front "https://github.com/florianroussarie/sae/blob/main/index.php"
click node_bootstrap "https://github.com/florianroussarie/sae/blob/main/include.php"
click node_factory "https://github.com/florianroussarie/sae/blob/main/controllers/controller_factory.class.php"
click node_account_controller "https://github.com/florianroussarie/sae/blob/main/controllers/controller_compte.class.php"
click node_video_controller "https://github.com/florianroussarie/sae/blob/main/controllers/controller_video.class.php"
click node_account_model "https://github.com/florianroussarie/sae/blob/main/modeles/compte.class.php"
click node_video_model "https://github.com/florianroussarie/sae/blob/main/modeles/video.class.php"
click node_account_dao "https://github.com/florianroussarie/sae/blob/main/modeles/compte.dao.php"
click node_video_dao "https://github.com/florianroussarie/sae/blob/main/modeles/video.dao.php"
click node_database "https://github.com/florianroussarie/sae/blob/main/modeles/bd.class.php"
click node_configuration "https://github.com/florianroussarie/sae/blob/main/modeles/config.class.php"
click node_twig_config "https://github.com/florianroussarie/sae/blob/main/config/twig.php"
click node_base_template "https://github.com/florianroussarie/sae/blob/main/templates/base_template.html.twig"
click node_account_views "https://github.com/florianroussarie/sae/blob/main/templates/connexion.html.twig"
click node_registration_view "https://github.com/florianroussarie/sae/blob/main/templates/inscription.html.twig"
click node_video_views "https://github.com/florianroussarie/sae/blob/main/templates/video.html.twig"
click node_feed_view "https://github.com/florianroussarie/sae/blob/main/templates/comptes_tableau.html.twig"
click node_publication_view "https://github.com/florianroussarie/sae/blob/main/templates/publication_video.html.twig"

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_front,node_bootstrap,node_factory,node_visitor toneBlue
class node_account_controller,node_video_controller,node_account_model,node_video_model toneAmber
class node_account_dao,node_video_dao,node_database,node_configuration toneMint
class node_twig_config,node_base_template,node_account_views,node_registration_view,node_video_views,node_feed_view,node_publication_view toneRose
```

## Components

### Request handling

- [Front controller](https://github.com/florianroussarie/sae/blob/main/index.php): `index.php`
- [Shared bootstrap](https://github.com/florianroussarie/sae/blob/main/include.php): `include.php`
- [Controller factory](https://github.com/florianroussarie/sae/blob/main/controllers/controller_factory.class.php): `controllers/controller_factory.class.php`

### Application domains

- [Account controller](https://github.com/florianroussarie/sae/blob/main/controllers/controller_compte.class.php): `controllers/controller_compte.class.php`
- [Video controller](https://github.com/florianroussarie/sae/blob/main/controllers/controller_video.class.php): `controllers/controller_video.class.php`
- [Account model](https://github.com/florianroussarie/sae/blob/main/modeles/compte.class.php): `modeles/compte.class.php`
- [Video model](https://github.com/florianroussarie/sae/blob/main/modeles/video.class.php): `modeles/video.class.php`

### Data access

- [Account DAO](https://github.com/florianroussarie/sae/blob/main/modeles/compte.dao.php): `modeles/compte.dao.php`
- [Video DAO](https://github.com/florianroussarie/sae/blob/main/modeles/video.dao.php): `modeles/video.dao.php`
- [Database connection](https://github.com/florianroussarie/sae/blob/main/modeles/bd.class.php): `modeles/bd.class.php`
- [Application configuration](https://github.com/florianroussarie/sae/blob/main/modeles/config.class.php): `modeles/config.class.php`

### Twig views

- [Twig setup](https://github.com/florianroussarie/sae/blob/main/config/twig.php): `config/twig.php`
- [Base layout](https://github.com/florianroussarie/sae/blob/main/templates/base_template.html.twig): `templates/base_template.html.twig`
- [Account views](https://github.com/florianroussarie/sae/blob/main/templates/connexion.html.twig): `templates/connexion.html.twig`
- [Registration view](https://github.com/florianroussarie/sae/blob/main/templates/inscription.html.twig): `templates/inscription.html.twig`
- [Video views](https://github.com/florianroussarie/sae/blob/main/templates/video.html.twig): `templates/video.html.twig`
- [Video feed view](https://github.com/florianroussarie/sae/blob/main/templates/comptes_tableau.html.twig): `templates/comptes_tableau.html.twig`
- [Video publication view](https://github.com/florianroussarie/sae/blob/main/templates/publication_video.html.twig): `templates/publication_video.html.twig`

### Other components

- **Browser visitor**

## Connections

- Browser visitor → Front controller: requests page (evidence: `index.php`)
- Front controller → Shared bootstrap: loads (evidence: `index.php`)
- Front controller → Controller factory: selects controller (evidence: `index.php`)
- Front controller → Video controller: invokes method
- Shared bootstrap → Application configuration: loads (evidence: `include.php`)
- Shared bootstrap → Twig setup: loads (evidence: `include.php`)
- Shared bootstrap → Database connection: loads (evidence: `include.php`)
- Shared bootstrap → Controller factory: loads (evidence: `include.php`)
- Shared bootstrap → Account controller: loads (evidence: `include.php`)
- Shared bootstrap → Video controller: loads (evidence: `include.php`)
- Shared bootstrap → Account model: loads (evidence: `include.php`)
- Shared bootstrap → Account DAO: loads (evidence: `include.php`)
- Shared bootstrap → Video model: loads (evidence: `include.php`)
- Shared bootstrap → Video DAO: loads (evidence: `include.php`)
