# malakbenothmen/crm_php_project architecture

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

- Interactive diagram: https://gitdiagram.com/malakbenothmen/crm_php_project
- Repository: https://github.com/malakbenothmen/crm_php_project

## Overview

Uniforme+ is a PHP client and admin application for managing uniform-product requests, quotations, orders, invoices, clients, and users. The visible client workflow covers account access and client-space pages; quotation details can be priced and a quotation can lead to an order and invoice. Controllers issue SQL through a shared PDO connection, while models provide domain objects. The README is empty, and several pages and admin handlers were not sampled, so their links are shown only where the source index documents references; unsampled admin workflows are not inferred.

Main entry points: [`DATABASE/config.php`](https://github.com/malakbenothmen/crm_php_project/blob/master/DATABASE/config.php) (MySQL database), [`CONTROLLERS/clientController.php`](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/clientController.php) (Client controller), [`CONTROLLERS/devisController.php`](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/devisController.php) (Quote controller), [`VIEWS/Client-space/pages/profile/userProfile.php`](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/profile/userProfile.php) (Client profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client workspace"]
  node_auth["Authentication<br/>[login.php]"]
  node_workspace["Client dashboard<br/>[index.php]"]
  node_profile["Client profile<br/>[userProfile.php]"]
  node_quote_pages["Quote requests"]
  node_quote_list["Quote list<br/>[MesDevis.php]"]
  node_quote_pdf["Quote PDF<br/>[devisPDF.php]"]
  node_orders_page["Client orders<br/>[allCommande.php]"]
  node_invoices_page["Client invoices<br/>[allFacture.php]"]
end

subgraph group_sales["Sales operations"]
  node_quote_ctrl["Quote controller"]
  node_detail_ctrl["Quote detail controller"]
  node_order_ctrl["Order controller"]
  node_invoice_ctrl["Invoice controller"]
end

subgraph group_admin["Administration"]
  node_article_ctrl["Article controller"]
  node_admin_views["Admin management pages"]
end

subgraph group_core["Application core"]
  node_client_ctrl["Client controller"]
  node_user_ctrl["User controller<br/>[userController.php]"]
  node_catalog_model["Article model<br/>[article.php]"]
  node_client_model["Client model<br/>[client.php]"]
  node_quote_model["Quote model<br/>[demandedevis.php]"]
  node_detail_model["Quote detail model<br/>[devisDetails.php]"]
  node_order_model["Order model<br/>[commande.php]"]
  node_invoice_model["Invoice model<br/>[facture.php]"]
  node_mysql[("MySQL database<br/>[config.php]")]
end

node_visitor(("Client or admin"))

node_visitor -->|"signs in"| node_auth
node_visitor -.->|"opens"| node_workspace
node_auth -->|"authenticates with"| node_user_ctrl
node_visitor -.->|"requests quote"| node_quote_pages
node_quote_pages -->|"loads client data"| node_client_ctrl
node_quote_pages -->|"submits request"| node_quote_ctrl
node_quote_pages -->|"submits details"| node_detail_ctrl
node_quote_list -.->|"loads quotes"| node_quote_ctrl
node_quote_pdf -.->|"renders quote"| node_quote_list
node_orders_page -.->|"loads orders"| node_order_ctrl
node_invoices_page -.->|"loads invoices"| node_invoice_ctrl
node_profile -->|"loads profile"| node_client_ctrl
node_profile -->|"counts quotes"| node_quote_ctrl
node_profile -->|"loads quote details"| node_detail_ctrl
node_profile -->|"counts orders"| node_order_ctrl
node_profile -->|"counts invoices"| node_invoice_ctrl
node_workspace -->|"loads client"| node_client_ctrl
node_admin_views -.->|"manages catalog"| node_article_ctrl
node_admin_views -.->|"manages quotes"| node_quote_ctrl
node_admin_views -.->|"manages orders"| node_order_ctrl
node_admin_views -.->|"manages invoices"| node_invoice_ctrl
node_article_ctrl -->|"loads model"| node_catalog_model
node_client_ctrl -->|"loads model"| node_client_model
node_client_ctrl -->|"inherits from"| node_user_ctrl
node_user_ctrl -.->|"queries"| node_mysql
node_quote_ctrl -->|"loads model"| node_quote_model
node_detail_ctrl -->|"loads model"| node_detail_model
node_order_ctrl -->|"loads model"| node_order_model
node_invoice_ctrl -->|"loads model"| node_invoice_model
node_article_ctrl -->|"queries"| node_mysql
node_client_ctrl -->|"queries"| node_mysql
node_quote_ctrl -->|"queries"| node_mysql
node_detail_ctrl -->|"queries"| node_mysql
node_order_ctrl -->|"queries"| node_mysql
node_invoice_ctrl -->|"queries"| node_mysql

click node_auth "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Authentification/login.php"
click node_workspace "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/index.php"
click node_profile "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/profile/userProfile.php"
click node_quote_pages "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php"
click node_quote_list "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/MesDevis.php"
click node_quote_pdf "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/devisDetails/devisPDF.php"
click node_orders_page "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/commande/allCommande.php"
click node_invoices_page "https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/facture/allFacture.php"
click node_article_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/articleController.php"
click node_client_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/clientController.php"
click node_user_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/userController.php"
click node_quote_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/devisController.php"
click node_detail_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/devisdetailsController.php"
click node_order_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/commandeController.php"
click node_invoice_ctrl "https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/factureController.php"
click node_catalog_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/article.php"
click node_client_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/client.php"
click node_quote_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/demandedevis.php"
click node_detail_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/devisDetails.php"
click node_order_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/commande.php"
click node_invoice_model "https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/facture.php"
click node_mysql "https://github.com/malakbenothmen/crm_php_project/blob/master/DATABASE/config.php"
click node_admin_views "https://github.com/malakbenothmen/crm_php_project/tree/master/VIEWS/Admin-panel/admnPages"

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_auth,node_workspace,node_profile,node_quote_pages,node_quote_list,node_quote_pdf,node_orders_page,node_invoices_page,node_visitor toneBlue
class node_quote_ctrl,node_detail_ctrl,node_order_ctrl,node_invoice_ctrl toneAmber
class node_article_ctrl,node_admin_views toneMint
class node_client_ctrl,node_user_ctrl,node_catalog_model,node_client_model,node_quote_model,node_detail_model,node_order_model,node_invoice_model,node_mysql toneRose
```

## Components

### Client workspace

- [Authentication](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Authentification/login.php): `VIEWS/Authentification/login.php`
- [Client dashboard](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/index.php): `VIEWS/Client-space/index.php`
- [Client profile](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/profile/userProfile.php): `VIEWS/Client-space/pages/profile/userProfile.php`
- [Quote requests](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php): `VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php`
- [Quote list](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/MesDevis.php): `VIEWS/Client-space/pages/demandeDevis/MesDevis.php`
- [Quote PDF](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/demandeDevis/devisDetails/devisPDF.php): `VIEWS/Client-space/pages/demandeDevis/devisDetails/devisPDF.php`
- [Client orders](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/commande/allCommande.php): `VIEWS/Client-space/pages/commande/allCommande.php`
- [Client invoices](https://github.com/malakbenothmen/crm_php_project/blob/master/VIEWS/Client-space/pages/facture/allFacture.php): `VIEWS/Client-space/pages/facture/allFacture.php`

### Sales operations

- [Quote controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/devisController.php): `CONTROLLERS/devisController.php`
- [Quote detail controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/devisdetailsController.php): `CONTROLLERS/devisdetailsController.php`
- [Order controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/commandeController.php): `CONTROLLERS/commandeController.php`
- [Invoice controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/factureController.php): `CONTROLLERS/factureController.php`

### Administration

- [Article controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/articleController.php): `CONTROLLERS/articleController.php`
- [Admin management pages](https://github.com/malakbenothmen/crm_php_project/tree/master/VIEWS/Admin-panel/admnPages): `VIEWS/Admin-panel/admnPages`

### Application core

- [Client controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/clientController.php): `CONTROLLERS/clientController.php`
- [User controller](https://github.com/malakbenothmen/crm_php_project/blob/master/CONTROLLERS/userController.php): `CONTROLLERS/userController.php`
- [Article model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/article.php): `MODELS/article.php`
- [Client model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/client.php): `MODELS/client.php`
- [Quote model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/demandedevis.php): `MODELS/demandedevis.php`
- [Quote detail model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/devisDetails.php): `MODELS/devisDetails.php`
- [Order model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/commande.php): `MODELS/commande.php`
- [Invoice model](https://github.com/malakbenothmen/crm_php_project/blob/master/MODELS/facture.php): `MODELS/facture.php`
- [MySQL database](https://github.com/malakbenothmen/crm_php_project/blob/master/DATABASE/config.php): `DATABASE/config.php`

### Other components

- **Client or admin**

## Connections

- Client or admin → Authentication: signs in (evidence: `VIEWS/Authentification/login.php`)
- Client or admin → Client dashboard: opens
- Authentication → User controller: authenticates with (evidence: `VIEWS/Authentification/login.php`)
- Client or admin → Quote requests: requests quote
- Quote requests → Client controller: loads client data (evidence: `VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php`)
- Quote requests → Quote controller: submits request (evidence: `VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php`)
- Quote requests → Quote detail controller: submits details (evidence: `VIEWS/Client-space/pages/demandeDevis/devisPersonalise.php`)
- Quote list → Quote controller: loads quotes
- Quote PDF → Quote list: renders quote
- Client orders → Order controller: loads orders
- Client invoices → Invoice controller: loads invoices
- Client profile → Client controller: loads profile (evidence: `VIEWS/Client-space/pages/profile/userProfile.php`)
- Client profile → Quote controller: counts quotes (evidence: `VIEWS/Client-space/pages/profile/userProfile.php`)
- Client profile → Quote detail controller: loads quote details (evidence: `VIEWS/Client-space/pages/profile/userProfile.php`)
- Client profile → Order controller: counts orders (evidence: `VIEWS/Client-space/pages/profile/userProfile.php`)
- Client profile → Invoice controller: counts invoices (evidence: `VIEWS/Client-space/pages/profile/userProfile.php`)
- Client dashboard → Client controller: loads client (evidence: `VIEWS/Client-space/index.php`)
- Admin management pages → Article controller: manages catalog
- Admin management pages → Quote controller: manages quotes
- Admin management pages → Order controller: manages orders
- Admin management pages → Invoice controller: manages invoices
- Article controller → Article model: loads model (evidence: `CONTROLLERS/articleController.php`)
- Client controller → Client model: loads model (evidence: `CONTROLLERS/clientController.php`)
- Client controller → User controller: inherits from (evidence: `CONTROLLERS/clientController.php`)
- User controller → MySQL database: queries (evidence: `CONTROLLERS/userController.php`)
- Quote controller → Quote model: loads model (evidence: `CONTROLLERS/devisController.php`)
- Quote detail controller → Quote detail model: loads model (evidence: `CONTROLLERS/devisdetailsController.php`)
- Order controller → Order model: loads model (evidence: `CONTROLLERS/commandeController.php`)
- Invoice controller → Invoice model: loads model (evidence: `CONTROLLERS/factureController.php`)
- Article controller → MySQL database: queries (evidence: `CONTROLLERS/articleController.php`)
- Client controller → MySQL database: queries (evidence: `CONTROLLERS/clientController.php`)
- Quote controller → MySQL database: queries (evidence: `CONTROLLERS/devisController.php`)
- Quote detail controller → MySQL database: queries (evidence: `CONTROLLERS/devisdetailsController.php`)
- Order controller → MySQL database: queries (evidence: `CONTROLLERS/commandeController.php`)
- Invoice controller → MySQL database: queries (evidence: `CONTROLLERS/factureController.php`)
