# ilyasx1/gestionpro architecture

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

- Interactive diagram: https://gitdiagram.com/ilyasx1/gestionpro
- Repository: https://github.com/ilyasx1/gestionpro

## Overview

GestionPro is a React/Laravel business-management application. Users sign in and work with clients, products, quotes, invoices, payments, reminders, and notifications; React sends API requests to Laravel, which applies validation and business rules and uses MySQL for persistence. The graph includes the documented feature areas and sampled domain stages. Some controllers and feature hooks were not excerpted, so their internal links are omitted rather than inferred; the broad client-server and database flow is documented in the README.

Main entry points: [`frontend/react/src/App.js`](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/App.js) (Application shell), [`backend/laravel/app/Services/FactureService.php`](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/FactureService.php) (Invoice rules), [`frontend/react/src/services/api.js`](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/services/api.js) (HTTP API client), [`backend/laravel/app/Services/DevisService.php`](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/DevisService.php) (Quote rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_react_app["Application shell<br/>[App.js]"]
  node_session["Session and permissions<br/>[useSession.js]"]
  node_client_ui["Client management<br/>[Clients.js]"]
  node_quote_ui["Quote management<br/>[Devis.js]"]
  node_invoice_ui["Invoice management<br/>[Factures.js]"]
  node_payment_ui["Payment management<br/>[Paiements.js]"]
  node_other_features["Products and reminders"]
  node_notification_ui["Notifications<br/>[Notifications.js]"]
  node_api_client["HTTP API client<br/>[api.js]"]
end

subgraph group_api["Laravel API"]
  node_laravel_api["Laravel API<br/>[api.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_client_controller["Client endpoints"]
  node_quote_controller["Quote endpoints"]
  node_invoice_controller["Invoice endpoints"]
  node_payment_reminder_api["Payments and reminders"]
end

subgraph group_domain["Business services"]
  node_quote_service["Quote rules<br/>[DevisService.php]"]
  node_invoice_service["Invoice rules<br/>[FactureService.php]"]
  node_payment_service["Payment rules"]
  node_document_lines["Document line builder"]
  node_money["Money calculations<br/>[Money.php]"]
  node_numbering["Document numbering<br/>[NumeroService.php]"]
  node_notification_service["Notification generation"]
  node_dashboard_service["Dashboard summaries"]
end

subgraph group_storage["Domain data"]
  node_db[("MySQL database")]
  node_client_model["Client records<br/>[Client.php]"]
  node_quote_model["Quote records<br/>[Devis.php]"]
  node_invoice_model["Invoice records<br/>[Facture.php]"]
  node_user_model["User records<br/>[User.php]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_react_app
node_react_app -->|"uses"| node_session
node_react_app -->|"renders"| node_notification_ui
node_react_app -->|"renders"| node_quote_ui
node_react_app -->|"renders"| node_invoice_ui
node_react_app -->|"renders"| node_payment_ui
node_react_app -->|"loads data"| node_api_client
node_client_ui -->|"requests data"| node_api_client
node_quote_ui -->|"requests data"| node_api_client
node_invoice_ui -->|"requests data"| node_api_client
node_payment_ui -->|"requests data"| node_api_client
node_api_client -->|"sends HTTP"| node_laravel_api
node_laravel_api -->|"reads and writes"| node_db
node_laravel_api -.->|"routes requests"| node_auth
node_quote_controller -->|"delegates"| node_quote_service
node_quote_controller -->|"converts quote"| node_invoice_service
node_invoice_controller -->|"delegates"| node_invoice_service
node_payment_reminder_api -->|"checks balance"| node_payment_service
node_quote_service -->|"uses"| node_document_lines
node_invoice_service -->|"uses"| node_document_lines
node_quote_service -->|"assigns number"| node_numbering
node_invoice_service -->|"assigns number"| node_numbering
node_invoice_service -->|"calculates totals"| node_money
node_payment_service -->|"calculates amounts"| node_money
node_payment_service -->|"generates notices"| node_notification_service
node_quote_service -->|"persists quote"| node_quote_model
node_invoice_service -->|"persists invoice"| node_invoice_model
node_invoice_service -->|"resolves client"| node_client_model
node_client_model -->|"belongs to"| node_user_model
node_quote_model -->|"belongs to"| node_client_model
node_invoice_model -->|"belongs to"| node_client_model

click node_react_app "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/App.js"
click node_session "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/hooks/useSession.js"
click node_client_ui "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Clients.js"
click node_quote_ui "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Devis.js"
click node_invoice_ui "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Factures.js"
click node_payment_ui "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Paiements.js"
click node_other_features "https://github.com/ilyasx1/gestionpro/tree/main/frontend/react/src/pages"
click node_notification_ui "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/components/Notifications.js"
click node_api_client "https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/services/api.js"
click node_laravel_api "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/routes/api.php"
click node_auth "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/AuthController.php"
click node_client_controller "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/ClientController.php"
click node_quote_controller "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/DevisController.php"
click node_invoice_controller "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/FactureController.php"
click node_payment_reminder_api "https://github.com/ilyasx1/gestionpro/tree/main/backend/laravel/app/Http/Controllers/Api"
click node_quote_service "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/DevisService.php"
click node_invoice_service "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/FactureService.php"
click node_payment_service "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/PaiementService.php"
click node_document_lines "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/Concerns/BuildsDocumentLignes.php"
click node_money "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Support/Money.php"
click node_numbering "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/NumeroService.php"
click node_notification_service "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/NotificationGenerationService.php"
click node_dashboard_service "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/DashboardService.php"
click node_client_model "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Client.php"
click node_quote_model "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Devis.php"
click node_invoice_model "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Facture.php"
click node_user_model "https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/User.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_react_app,node_session,node_client_ui,node_quote_ui,node_invoice_ui,node_payment_ui,node_other_features,node_notification_ui,node_api_client,node_user toneBlue
class node_laravel_api,node_auth,node_client_controller,node_quote_controller,node_invoice_controller,node_payment_reminder_api toneAmber
class node_quote_service,node_invoice_service,node_payment_service,node_document_lines,node_money,node_numbering,node_notification_service,node_dashboard_service toneMint
class node_db,node_client_model,node_quote_model,node_invoice_model,node_user_model toneRose
```

## Components

### React application

- [Application shell](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/App.js): `frontend/react/src/App.js`
- [Session and permissions](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/hooks/useSession.js): `frontend/react/src/hooks/useSession.js`
- [Client management](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Clients.js): `frontend/react/src/pages/Clients.js`
- [Quote management](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Devis.js): `frontend/react/src/pages/Devis.js`
- [Invoice management](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Factures.js): `frontend/react/src/pages/Factures.js`
- [Payment management](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/pages/Paiements.js): `frontend/react/src/pages/Paiements.js`
- [Products and reminders](https://github.com/ilyasx1/gestionpro/tree/main/frontend/react/src/pages): `frontend/react/src/pages`
- [Notifications](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/components/Notifications.js): `frontend/react/src/components/Notifications.js`
- [HTTP API client](https://github.com/ilyasx1/gestionpro/blob/main/frontend/react/src/services/api.js): `frontend/react/src/services/api.js`

### Laravel API

- [Laravel API](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/routes/api.php): `backend/laravel/routes/api.php`
- [Authentication](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/AuthController.php): `backend/laravel/app/Http/Controllers/Api/AuthController.php`
- [Client endpoints](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/ClientController.php): `backend/laravel/app/Http/Controllers/Api/ClientController.php`
- [Quote endpoints](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/DevisController.php): `backend/laravel/app/Http/Controllers/Api/DevisController.php`
- [Invoice endpoints](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Http/Controllers/Api/FactureController.php): `backend/laravel/app/Http/Controllers/Api/FactureController.php`
- [Payments and reminders](https://github.com/ilyasx1/gestionpro/tree/main/backend/laravel/app/Http/Controllers/Api): `backend/laravel/app/Http/Controllers/Api`

### Business services

- [Quote rules](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/DevisService.php): `backend/laravel/app/Services/DevisService.php`
- [Invoice rules](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/FactureService.php): `backend/laravel/app/Services/FactureService.php`
- [Payment rules](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/PaiementService.php): `backend/laravel/app/Services/PaiementService.php`
- [Document line builder](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/Concerns/BuildsDocumentLignes.php): `backend/laravel/app/Services/Concerns/BuildsDocumentLignes.php`
- [Money calculations](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Support/Money.php): `backend/laravel/app/Support/Money.php`
- [Document numbering](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/NumeroService.php): `backend/laravel/app/Services/NumeroService.php`
- [Notification generation](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/NotificationGenerationService.php): `backend/laravel/app/Services/NotificationGenerationService.php`
- [Dashboard summaries](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Services/DashboardService.php): `backend/laravel/app/Services/DashboardService.php`

### Domain data

- **MySQL database**
- [Client records](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Client.php): `backend/laravel/app/Models/Client.php`
- [Quote records](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Devis.php): `backend/laravel/app/Models/Devis.php`
- [Invoice records](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/Facture.php): `backend/laravel/app/Models/Facture.php`
- [User records](https://github.com/ilyasx1/gestionpro/blob/main/backend/laravel/app/Models/User.php): `backend/laravel/app/Models/User.php`

### Other components

- **Business user**

## Connections

- Business user → Application shell: uses (evidence: `README.md`)
- Application shell → Session and permissions: uses (evidence: `frontend/react/src/App.js`)
- Application shell → Notifications: renders (evidence: `frontend/react/src/App.js`)
- Application shell → Quote management: renders (evidence: `frontend/react/src/App.js`)
- Application shell → Invoice management: renders (evidence: `frontend/react/src/App.js`)
- Application shell → Payment management: renders (evidence: `frontend/react/src/App.js`)
- Application shell → HTTP API client: loads data
- Client management → HTTP API client: requests data
- Quote management → HTTP API client: requests data
- Invoice management → HTTP API client: requests data
- Payment management → HTTP API client: requests data
- HTTP API client → Laravel API: sends HTTP (evidence: `README.md`)
- Laravel API → MySQL database: reads and writes (evidence: `README.md`)
- Laravel API → Authentication: routes requests
- Quote endpoints → Quote rules: delegates (evidence: `backend/laravel/app/Http/Controllers/Api/DevisController.php`)
- Quote endpoints → Invoice rules: converts quote (evidence: `backend/laravel/app/Http/Controllers/Api/DevisController.php`)
- Invoice endpoints → Invoice rules: delegates (evidence: `backend/laravel/app/Http/Controllers/Api/FactureController.php`)
- Payments and reminders → Payment rules: checks balance (evidence: `backend/laravel/app/Http/Controllers/Api/RelanceController.php`)
- Quote rules → Document line builder: uses (evidence: `backend/laravel/app/Services/DevisService.php`)
- Invoice rules → Document line builder: uses (evidence: `backend/laravel/app/Services/FactureService.php`)
- Quote rules → Document numbering: assigns number (evidence: `backend/laravel/app/Services/DevisService.php`)
- Invoice rules → Document numbering: assigns number (evidence: `backend/laravel/app/Services/FactureService.php`)
- Invoice rules → Money calculations: calculates totals (evidence: `backend/laravel/app/Services/FactureService.php`)
- Payment rules → Money calculations: calculates amounts (evidence: `backend/laravel/app/Services/PaiementService.php`)
- Payment rules → Notification generation: generates notices (evidence: `backend/laravel/app/Services/PaiementService.php`)
- Quote rules → Quote records: persists quote (evidence: `backend/laravel/app/Services/DevisService.php`)
- Invoice rules → Invoice records: persists invoice (evidence: `backend/laravel/app/Services/FactureService.php`)
- Invoice rules → Client records: resolves client (evidence: `backend/laravel/app/Services/FactureService.php`)
- Client records → User records: belongs to (evidence: `backend/laravel/app/Models/Client.php`)
- Quote records → Client records: belongs to (evidence: `backend/laravel/app/Models/Devis.php`)
- Invoice records → Client records: belongs to (evidence: `backend/laravel/app/Models/Facture.php`)
