# yocswar/lovelace-ceramique architecture

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

- Interactive diagram: https://gitdiagram.com/yocswar/lovelace-ceramique
- Repository: https://github.com/yocswar/lovelace-ceramique

## Overview

PotterPilot supports organization setup and sign-in, then lets workshop users create orders and follow individual pieces as tickets across production stages, with assignment and loss handling. The main path is browser routes → order/Kanban screens → routed PHP API controllers → domain models and JSON views → PostgreSQL. The README also describes stage, deadline, task, and loss goals; sampled code confirms Kanban, assignment, and ticket recreation, but not all of those capabilities. Unshown UI/API links are omitted or marked unverified.

Main entry points: [`backend/controllers/CommandeController.php`](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/CommandeController.php) (Orders API), [`backend/controllers/TicketController.php`](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/TicketController.php) (Tickets API), [`backend/public/index.php`](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/public/index.php) (HTTP router), [`backend/controllers/UtilisateurController.php`](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/UtilisateurController.php) (Organization users API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workshop interface"]
  node_app["Route shell<br/>[App.jsx]"]
  node_signup["Organization setup"]
  node_login["Sign-in form"]
  node_home["Workshop home<br/>[Accueil.jsx]"]
  node_orders_ui["Order list<br/>[Commandes.jsx]"]
  node_order_form["Order creation"]
  node_kanban["Production board<br/>[Kanban.jsx]"]
  node_ticket_menu["Ticket actions<br/>[TicketMenu.jsx]"]
  node_toast["Status feedback<br/>[Toast.jsx]"]
  node_success["Success screen<br/>[EcranSucces.jsx]"]
end

subgraph group_api["HTTP application"]
  node_router["HTTP router<br/>[index.php]"]
  node_auth["Authentication API<br/>[AuthController.php]"]
  node_users_api["Organization users API"]
  node_orders_api["Orders API"]
  node_pieces_api["Piece catalog API"]
  node_tickets_api["Tickets API"]
  node_health_api["Health check API"]
  node_orders_view["Order responses<br/>[CommandeView.php]"]
  node_tickets_view["Ticket responses<br/>[TicketView.php]"]
  node_pieces_view["Piece responses<br/>[PieceView.php]"]
  node_health_view["Health response"]
end

subgraph group_domain["Workshop domain"]
  node_order_model["Order operations<br/>[CommandeModel.php]"]
  node_ticket_model["Ticket operations<br/>[TicketModel.php]"]
  node_piece_model["Piece catalog<br/>[PieceModel.php]"]
  node_stage_model["Production stages<br/>[EtapeModel.php]"]
  node_user_model["User records"]
  node_org_model["Organization records"]
  node_validator["User validation"]
  node_health_model["Database probe"]
end

subgraph group_infrastructure["Persistence and access"]
  node_jwt["JWT verification<br/>[JwtAuth.php]"]
  node_db_config["PDO connection<br/>[db.php]"]
end

node_artisan(("Workshop user"))
node_postgres[("PostgreSQL")]

node_artisan -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_order_form
node_login -.->|"submits credentials"| node_auth
node_signup -.->|"creates account"| node_users_api
node_home -->|"renders"| node_orders_ui
node_orders_ui -->|"renders"| node_kanban
node_orders_ui -->|"uses"| node_ticket_menu
node_order_form -->|"shows"| node_success
node_kanban -->|"loads and updates"| node_tickets_api
node_kanban -->|"renders"| node_toast
node_order_form -.->|"submits order"| node_orders_api
node_order_form -.->|"loads catalog"| node_pieces_api
node_router -->|"dispatches"| node_auth
node_router -->|"dispatches"| node_users_api
node_router -->|"dispatches"| node_orders_api
node_router -->|"dispatches"| node_pieces_api
node_router -->|"dispatches"| node_tickets_api
node_router -->|"dispatches"| node_health_api
node_auth -->|"opens connection"| node_db_config
node_auth -->|"checks credentials"| node_user_model
node_users_api -->|"validates"| node_validator
node_users_api -->|"opens connection"| node_db_config
node_users_api -->|"creates organization"| node_org_model
node_users_api -->|"creates or lists"| node_user_model
node_orders_api -->|"checks token"| node_jwt
node_orders_api -->|"opens connection"| node_db_config
node_orders_api -->|"checks pieces"| node_piece_model
node_orders_api -->|"creates or lists"| node_order_model
node_orders_api -->|"formats response"| node_orders_view
node_tickets_api -->|"opens connection"| node_db_config
node_tickets_api -->|"loads stages"| node_stage_model
node_tickets_api -->|"loads tickets"| node_ticket_model
node_tickets_api -->|"checks piece"| node_piece_model
node_tickets_api -->|"formats response"| node_tickets_view
node_pieces_api -->|"checks token"| node_jwt
node_pieces_api -->|"opens connection"| node_db_config
node_pieces_api -->|"loads pieces"| node_piece_model
node_pieces_api -->|"formats response"| node_pieces_view
node_health_api -->|"checks database"| node_health_model
node_health_api -->|"formats response"| node_health_view
node_db_config -->|"connects"| node_postgres

click node_app "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/App.jsx"
click node_signup "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireOrganisation/FormulaireOrganisation.jsx"
click node_login "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireConnexion/FormulaireConnexion.jsx"
click node_home "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Accueil/Accueil.jsx"
click node_orders_ui "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Commandes/Commandes.jsx"
click node_order_form "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireCommande/FormulaireCommande.jsx"
click node_kanban "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Kanban/Kanban.jsx"
click node_ticket_menu "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/TicketMenu/TicketMenu.jsx"
click node_toast "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Toast/Toast.jsx"
click node_success "https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/EcranSucces/EcranSucces.jsx"
click node_router "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/public/index.php"
click node_auth "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/AuthController.php"
click node_users_api "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/UtilisateurController.php"
click node_orders_api "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/CommandeController.php"
click node_pieces_api "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/PieceController.php"
click node_tickets_api "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/TicketController.php"
click node_health_api "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/HealthcheckController.php"
click node_order_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/CommandeModel.php"
click node_ticket_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/TicketModel.php"
click node_piece_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/PieceModel.php"
click node_stage_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/EtapeModel.php"
click node_user_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/UtilisateurModel.php"
click node_org_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/OrganisationModel.php"
click node_validator "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/services/UtilisateurValidator.php"
click node_jwt "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/services/JwtAuth.php"
click node_db_config "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/config/db.php"
click node_orders_view "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/CommandeView.php"
click node_tickets_view "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/TicketView.php"
click node_pieces_view "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/PieceView.php"
click node_health_model "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/HealthcheckModel.php"
click node_health_view "https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/HealthcheckView.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_app,node_signup,node_login,node_home,node_orders_ui,node_order_form,node_kanban,node_ticket_menu,node_toast,node_success,node_artisan toneBlue
class node_router,node_auth,node_users_api,node_orders_api,node_pieces_api,node_tickets_api,node_health_api,node_orders_view,node_tickets_view,node_pieces_view,node_health_view,node_postgres toneAmber
class node_order_model,node_ticket_model,node_piece_model,node_stage_model,node_user_model,node_org_model,node_validator,node_health_model toneMint
class node_jwt,node_db_config toneRose
```

## Components

### Workshop interface

- [Route shell](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Organization setup](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireOrganisation/FormulaireOrganisation.jsx): `frontend/src/components/FormulaireOrganisation/FormulaireOrganisation.jsx`
- [Sign-in form](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireConnexion/FormulaireConnexion.jsx): `frontend/src/components/FormulaireConnexion/FormulaireConnexion.jsx`
- [Workshop home](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Accueil/Accueil.jsx): `frontend/src/components/Accueil/Accueil.jsx`
- [Order list](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Commandes/Commandes.jsx): `frontend/src/components/Commandes/Commandes.jsx`
- [Order creation](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/FormulaireCommande/FormulaireCommande.jsx): `frontend/src/components/FormulaireCommande/FormulaireCommande.jsx`
- [Production board](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Kanban/Kanban.jsx): `frontend/src/components/Kanban/Kanban.jsx`
- [Ticket actions](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/TicketMenu/TicketMenu.jsx): `frontend/src/components/TicketMenu/TicketMenu.jsx`
- [Status feedback](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/Toast/Toast.jsx): `frontend/src/components/Toast/Toast.jsx`
- [Success screen](https://github.com/yocswar/lovelace-ceramique/blob/main/frontend/src/components/EcranSucces/EcranSucces.jsx): `frontend/src/components/EcranSucces/EcranSucces.jsx`

### HTTP application

- [HTTP router](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/public/index.php): `backend/public/index.php`
- [Authentication API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/AuthController.php): `backend/controllers/AuthController.php`
- [Organization users API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/UtilisateurController.php): `backend/controllers/UtilisateurController.php`
- [Orders API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/CommandeController.php): `backend/controllers/CommandeController.php`
- [Piece catalog API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/PieceController.php): `backend/controllers/PieceController.php`
- [Tickets API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/TicketController.php): `backend/controllers/TicketController.php`
- [Health check API](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/controllers/HealthcheckController.php): `backend/controllers/HealthcheckController.php`
- [Order responses](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/CommandeView.php): `backend/views/CommandeView.php`
- [Ticket responses](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/TicketView.php): `backend/views/TicketView.php`
- [Piece responses](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/PieceView.php): `backend/views/PieceView.php`
- [Health response](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/views/HealthcheckView.php): `backend/views/HealthcheckView.php`

### Workshop domain

- [Order operations](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/CommandeModel.php): `backend/models/CommandeModel.php`
- [Ticket operations](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/TicketModel.php): `backend/models/TicketModel.php`
- [Piece catalog](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/PieceModel.php): `backend/models/PieceModel.php`
- [Production stages](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/EtapeModel.php): `backend/models/EtapeModel.php`
- [User records](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/UtilisateurModel.php): `backend/models/UtilisateurModel.php`
- [Organization records](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/OrganisationModel.php): `backend/models/OrganisationModel.php`
- [User validation](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/services/UtilisateurValidator.php): `backend/services/UtilisateurValidator.php`
- [Database probe](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/models/HealthcheckModel.php): `backend/models/HealthcheckModel.php`

### Persistence and access

- [JWT verification](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/services/JwtAuth.php): `backend/services/JwtAuth.php`
- [PDO connection](https://github.com/yocswar/lovelace-ceramique/blob/main/backend/config/db.php): `backend/config/db.php`

### Other components

- **Workshop user**
- **PostgreSQL**

## Connections

- Workshop user → Route shell: uses (evidence: `README.md`)
- Route shell → Sign-in form: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Organization setup: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Workshop home: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Order creation: routes to (evidence: `frontend/src/App.jsx`)
- Sign-in form → Authentication API: submits credentials
- Organization setup → Organization users API: creates account
- Workshop home → Order list: renders (evidence: `frontend/src/components/Accueil/Accueil.jsx`)
- Order list → Production board: renders (evidence: `frontend/src/components/Commandes/Commandes.jsx`)
- Order list → Ticket actions: uses (evidence: `frontend/src/components/Commandes/Commandes.jsx`)
- Order creation → Success screen: shows (evidence: `frontend/src/components/FormulaireCommande/FormulaireCommande.jsx`)
- Production board → Tickets API: loads and updates (evidence: `frontend/src/components/Kanban/Kanban.jsx`)
- Production board → Status feedback: renders (evidence: `frontend/src/components/Kanban/Kanban.jsx`)
- Order creation → Orders API: submits order
- Order creation → Piece catalog API: loads catalog
- HTTP router → Authentication API: dispatches (evidence: `backend/public/index.php`)
- HTTP router → Organization users API: dispatches (evidence: `backend/public/index.php`)
- HTTP router → Orders API: dispatches (evidence: `backend/public/index.php`)
- HTTP router → Piece catalog API: dispatches (evidence: `backend/public/index.php`)
- HTTP router → Tickets API: dispatches (evidence: `backend/public/index.php`)
- HTTP router → Health check API: dispatches (evidence: `backend/public/index.php`)
- Authentication API → PDO connection: opens connection (evidence: `backend/controllers/AuthController.php`)
- Authentication API → User records: checks credentials (evidence: `backend/controllers/AuthController.php`)
- Organization users API → User validation: validates (evidence: `backend/controllers/UtilisateurController.php`)
- Organization users API → PDO connection: opens connection (evidence: `backend/controllers/UtilisateurController.php`)
- Organization users API → Organization records: creates organization (evidence: `backend/controllers/UtilisateurController.php`)
- Organization users API → User records: creates or lists (evidence: `backend/controllers/UtilisateurController.php`)
- Orders API → JWT verification: checks token (evidence: `backend/controllers/CommandeController.php`)
- Orders API → PDO connection: opens connection (evidence: `backend/controllers/CommandeController.php`)
- Orders API → Piece catalog: checks pieces (evidence: `backend/controllers/CommandeController.php`)
- Orders API → Order operations: creates or lists (evidence: `backend/controllers/CommandeController.php`)
- Orders API → Order responses: formats response (evidence: `backend/controllers/CommandeController.php`)
- Tickets API → PDO connection: opens connection (evidence: `backend/controllers/TicketController.php`)
- Tickets API → Production stages: loads stages (evidence: `backend/controllers/TicketController.php`)
- Tickets API → Ticket operations: loads tickets (evidence: `backend/controllers/TicketController.php`)
- Tickets API → Piece catalog: checks piece (evidence: `backend/controllers/TicketController.php`)
- Tickets API → Ticket responses: formats response (evidence: `backend/controllers/TicketController.php`)
- Piece catalog API → JWT verification: checks token (evidence: `backend/controllers/PieceController.php`)
- Piece catalog API → PDO connection: opens connection (evidence: `backend/controllers/PieceController.php`)
- Piece catalog API → Piece catalog: loads pieces (evidence: `backend/controllers/PieceController.php`)
- Piece catalog API → Piece responses: formats response (evidence: `backend/controllers/PieceController.php`)
- Health check API → Database probe: checks database (evidence: `backend/controllers/HealthcheckController.php`)
- Health check API → Health response: formats response (evidence: `backend/controllers/HealthcheckController.php`)
- PDO connection → PostgreSQL: connects (evidence: `README.md`)
