# alpachot/projet-final-maisonneuve architecture

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

- Interactive diagram: https://gitdiagram.com/alpachot/projet-final-maisonneuve
- Repository: https://github.com/alpachot/projet-final-maisonneuve

## Overview

Vino is a French-language web application for managing users, wine cellars and their bottles, with shopping lists and SAQ catalogue import. The principal flow starts at the public entry point, routes a request to a controller, then uses models to read or update application data and renders a view or returns an AJAX response. The graph also preserves account management, cellar and bottle management, shopping lists, and administrator-led SAQ import. Some subsystem wiring is documented or indexed but unsampled, so those links are marked unverified or omitted.

Main entry points: [`prive/controleurs/Controleur_Importation.php`](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Importation.php) (SAQ import controller), [`prive/controleurs/lib/Routeur.php`](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Routeur.php) (Request router), [`prive/controleurs/Controleur_Bouteille.php`](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Bouteille.php) (Bottle controller), [`prive/controleurs/lib/Controleur.php`](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Controleur.php) (Controller base)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Request handling"]
  node_entry["Web entry point<br/>[index.php]"]
  node_router["Request router<br/>[Routeur.php]"]
  node_base_controller["Controller base<br/>[Controleur.php]"]
end

subgraph group_accounts["Accounts"]
  node_login["Account controller"]
  node_user_model["User model<br/>[Modele_Usager.php]"]
  node_login_views["Account views<br/>[login.php]"]
end

subgraph group_cellar["Cellars and bottles"]
  node_cellar_controller["Cellar controller"]
  node_cellar_model["Cellar model<br/>[Modele_Cellier.php]"]
  node_cellar_views["Cellar views<br/>[cellier.php]"]
  node_bottle_controller["Bottle controller"]
  node_bottle_model["Bottle model"]
  node_bottle_views["Bottle views<br/>[formulaire.php]"]
end

subgraph group_catalog["Catalogue and lists"]
  node_import_controller["SAQ import controller"]
  node_saq_model["SAQ catalogue model"]
  node_admin_view["Import administration view<br/>[une-page.php]"]
  node_list_controller["Shopping-list controller"]
  node_list_model["Shopping-list model<br/>[Modele_Liste.php]"]
  node_list_views["Shopping-list views<br/>[achat.php]"]
end

subgraph group_storage["Persistence and support"]
  node_db_factory["Database connection<br/>[BaseDeDonnees.php]"]
  node_model_base["Model base<br/>[Modele.php]"]
  node_admin_guard["Admin access check<br/>[Fonctions.php]"]
  node_logger["File logger<br/>[Log.php]"]
  node_procedures["Shared procedures<br/>[Procedures.php]"]
end

node_visitor(("Web user"))
node_saq_service["SAQ website"]
node_database[("Application database")]

node_visitor -->|"requests"| node_entry
node_entry -->|"invokes"| node_router
node_router -->|"loads"| node_procedures
node_router -->|"dispatches"| node_base_controller
node_router -.->|"dispatches"| node_login
node_base_controller -->|"opens connection"| node_db_factory
node_base_controller -->|"creates models"| node_model_base
node_db_factory -.->|"connects"| node_database
node_model_base -.->|"queries"| node_database
node_login -->|"authenticates and updates"| node_user_model
node_login -->|"renders"| node_login_views
node_cellar_controller -.->|"manages cellar"| node_cellar_model
node_cellar_controller -.->|"renders"| node_cellar_views
node_bottle_controller -->|"updates bottles"| node_bottle_model
node_bottle_controller -->|"loads model"| node_cellar_model
node_bottle_controller -->|"renders"| node_bottle_views
node_import_controller -->|"renders"| node_admin_view
node_import_controller -->|"fetches catalogue"| node_saq_service
node_import_controller -->|"imports records"| node_saq_model
node_import_controller -.->|"checks access"| node_admin_guard
node_import_controller -->|"logs errors"| node_logger
node_list_controller -.->|"manages lists"| node_list_model
node_list_controller -.->|"renders"| node_list_views
node_list_model -.->|"searches catalogue"| node_saq_model
node_admin_guard -->|"logs access"| node_logger

click node_entry "https://github.com/alpachot/projet-final-maisonneuve/blob/master/www/index.php"
click node_router "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Routeur.php"
click node_base_controller "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Controleur.php"
click node_login "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Login.php"
click node_user_model "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Usager.php"
click node_login_views "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/login/login.php"
click node_cellar_controller "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Cellier.php"
click node_cellar_model "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Cellier.php"
click node_cellar_views "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/cellier/cellier.php"
click node_bottle_controller "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Bouteille.php"
click node_bottle_model "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Bouteille.php"
click node_bottle_views "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/bouteille/formulaire.php"
click node_import_controller "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Importation.php"
click node_saq_model "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Bouteille_SAQ.php"
click node_admin_view "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/admin/une-page.php"
click node_list_controller "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Liste_Achat.php"
click node_list_model "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Liste.php"
click node_list_views "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/bouteille/achat.php"
click node_db_factory "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/BaseDeDonnees.php"
click node_model_base "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele.php"
click node_admin_guard "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Fonctions.php"
click node_logger "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Log.php"
click node_procedures "https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Procedures.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_entry,node_router,node_base_controller,node_visitor toneBlue
class node_login,node_user_model,node_login_views,node_database toneAmber
class node_cellar_controller,node_cellar_model,node_cellar_views,node_bottle_controller,node_bottle_model,node_bottle_views toneMint
class node_import_controller,node_saq_model,node_admin_view,node_list_controller,node_list_model,node_list_views toneRose
class node_db_factory,node_model_base,node_admin_guard,node_logger,node_procedures,node_saq_service toneIndigo
```

## Components

### Request handling

- [Web entry point](https://github.com/alpachot/projet-final-maisonneuve/blob/master/www/index.php): `www/index.php`
- [Request router](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Routeur.php): `prive/controleurs/lib/Routeur.php`
- [Controller base](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Controleur.php): `prive/controleurs/lib/Controleur.php`

### Accounts

- [Account controller](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Login.php): `prive/controleurs/Controleur_Login.php`
- [User model](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Usager.php): `prive/modeles/Modele_Usager.php`
- [Account views](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/login/login.php): `prive/vues/login/login.php`

### Cellars and bottles

- [Cellar controller](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Cellier.php): `prive/controleurs/Controleur_Cellier.php`
- [Cellar model](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Cellier.php): `prive/modeles/Modele_Cellier.php`
- [Cellar views](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/cellier/cellier.php): `prive/vues/cellier/cellier.php`
- [Bottle controller](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Bouteille.php): `prive/controleurs/Controleur_Bouteille.php`
- [Bottle model](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Bouteille.php): `prive/modeles/Modele_Bouteille.php`
- [Bottle views](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/bouteille/formulaire.php): `prive/vues/bouteille/formulaire.php`

### Catalogue and lists

- [SAQ import controller](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Importation.php): `prive/controleurs/Controleur_Importation.php`
- [SAQ catalogue model](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Bouteille_SAQ.php): `prive/modeles/Modele_Bouteille_SAQ.php`
- [Import administration view](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/admin/une-page.php): `prive/vues/admin/une-page.php`
- [Shopping-list controller](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/Controleur_Liste_Achat.php): `prive/controleurs/Controleur_Liste_Achat.php`
- [Shopping-list model](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele_Liste.php): `prive/modeles/Modele_Liste.php`
- [Shopping-list views](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/vues/bouteille/achat.php): `prive/vues/bouteille/achat.php`

### Persistence and support

- [Database connection](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/BaseDeDonnees.php): `prive/modeles/BaseDeDonnees.php`
- [Model base](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/modeles/Modele.php): `prive/modeles/Modele.php`
- [Admin access check](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Fonctions.php): `prive/controleurs/lib/Fonctions.php`
- [File logger](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Log.php): `prive/controleurs/lib/Log.php`
- [Shared procedures](https://github.com/alpachot/projet-final-maisonneuve/blob/master/prive/controleurs/lib/Procedures.php): `prive/controleurs/lib/Procedures.php`

### Other components

- **Web user**
- **SAQ website**
- **Application database**

## Connections

- Web user → Web entry point: requests (evidence: `www/index.php`)
- Web entry point → Request router: invokes (evidence: `www/index.php`)
- Request router → Shared procedures: loads (evidence: `prive/controleurs/lib/Routeur.php`)
- Request router → Controller base: dispatches (evidence: `prive/controleurs/lib/Routeur.php`)
- Request router → Account controller: dispatches (evidence: `prive/controleurs/lib/Routeur.php`)
- Controller base → Database connection: opens connection (evidence: `prive/controleurs/lib/Controleur.php`)
- Controller base → Model base: creates models (evidence: `prive/controleurs/lib/Controleur.php`)
- Database connection → Application database: connects (evidence: `prive/modeles/BaseDeDonnees.php`)
- Model base → Application database: queries (evidence: `prive/modeles/Modele.php`)
- Account controller → User model: authenticates and updates (evidence: `prive/controleurs/Controleur_Login.php`)
- Account controller → Account views: renders (evidence: `prive/controleurs/Controleur_Login.php`)
- Cellar controller → Cellar model: manages cellar
- Cellar controller → Cellar views: renders
- Bottle controller → Bottle model: updates bottles (evidence: `prive/controleurs/Controleur_Bouteille.php`)
- Bottle controller → Cellar model: loads model (evidence: `prive/controleurs/Controleur_Bouteille.php`)
- Bottle controller → Bottle views: renders (evidence: `prive/controleurs/Controleur_Bouteille.php`)
- SAQ import controller → Import administration view: renders (evidence: `prive/controleurs/Controleur_Importation.php`)
- SAQ import controller → SAQ website: fetches catalogue (evidence: `prive/controleurs/Controleur_Importation.php`)
- SAQ import controller → SAQ catalogue model: imports records (evidence: `prive/controleurs/Controleur_Importation.php`)
- SAQ import controller → Admin access check: checks access (evidence: `prive/controleurs/Controleur_Importation.php`)
- SAQ import controller → File logger: logs errors (evidence: `prive/controleurs/Controleur_Importation.php`)
- Shopping-list controller → Shopping-list model: manages lists
- Shopping-list controller → Shopping-list views: renders
- Shopping-list model → SAQ catalogue model: searches catalogue (evidence: `prive/modeles/Modele_Liste.php`)
- Admin access check → File logger: logs access (evidence: `prive/controleurs/lib/Fonctions.php`)
