# christever/mydevis architecture

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

- Interactive diagram: https://gitdiagram.com/christever/mydevis
- Repository: https://github.com/christever/mydevis

## Overview

MS PEINTURE is a French quote-management web application for managing clients, estimates and company settings. A signed-in user can choose or create a client, create a draft quote, add priced lines, review totals and update its status; the home page summarizes activity. React contexts hold domain state: client and settings data use Firestore, while quote data is currently in memory, consistent with the README’s temporary-data caveat. The sampled files show routing, context wiring and key calculations; some capabilities below are documented in the README but their implementations were not sampled.

Main entry points: [`src/Layout/MainLayout.jsx`](https://github.com/christever/mydevis/blob/main/src/Layout/MainLayout.jsx) (Application layout), [`src/contexts/devis-context.jsx`](https://github.com/christever/mydevis/blob/main/src/contexts/devis-context.jsx) (Quote state and lifecycle), [`src/pages/Devis/DevisDetails.jsx`](https://github.com/christever/mydevis/blob/main/src/pages/Devis/DevisDetails.jsx) (Quote detail), [`src/contexts/clients-context.jsx`](https://github.com/christever/mydevis/blob/main/src/contexts/clients-context.jsx) (Client state and storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_routes["Route access<br/>[routes.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_auth["Authentication and profile<br/>[auth-context.jsx]"]
  node_layout["Application layout<br/>[MainLayout.jsx]"]
  node_home["Activity overview<br/>[Home.jsx]"]
end

subgraph group_clients["Client management"]
  node_clients_page["Client directory<br/>[Clients.jsx]"]
  node_client_dialog["Client editor<br/>[ClientDialog.jsx]"]
  node_client_form["Client form<br/>[ClientForm.jsx]"]
  node_clients_state["Client state and storage"]
end

subgraph group_quotes["Quote management"]
  node_quotes_page["Quote list<br/>[Devis.jsx]"]
  node_quote_editor["Quote creation<br/>[DevisDialog.jsx]"]
  node_quote_state["Quote state and lifecycle<br/>[devis-context.jsx]"]
  node_quote_detail["Quote detail<br/>[DevisDetails.jsx]"]
  node_line_editor["Quote line editor"]
  node_quote_math["Quote calculations<br/>[devis-calculs.js]"]
end

subgraph group_settings["Business settings"]
  node_parameters_page["Settings screen<br/>[Parametres.jsx]"]
  node_parameter_state["Settings state and storage"]
end

node_user(("User"))
node_firebase_config["Firebase connection<br/>[config.js]"]
node_firebase[("Firebase services")]

node_user -->|"navigates"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"protects routes"| node_layout
node_layout -->|"hosts"| node_home
node_layout -->|"hosts"| node_clients_page
node_layout -->|"hosts"| node_quotes_page
node_layout -->|"hosts"| node_quote_detail
node_layout -->|"hosts"| node_parameters_page
node_layout -->|"provides"| node_clients_state
node_layout -->|"provides"| node_quote_state
node_layout -->|"provides"| node_parameter_state
node_login -->|"signs in"| node_auth
node_auth -->|"uses services"| node_firebase_config
node_clients_page -->|"reads and updates"| node_clients_state
node_clients_page -->|"opens editor"| node_client_dialog
node_client_dialog -->|"renders"| node_client_form
node_clients_state -->|"reads and writes"| node_firebase_config
node_firebase_config -->|"connects"| node_firebase
node_quotes_page -->|"reads quotes"| node_quote_state
node_quotes_page -->|"opens editor"| node_quote_editor
node_quote_editor -->|"selects clients"| node_clients_state
node_quote_editor -.->|"creates quote"| node_quote_state
node_quote_detail -->|"reads quote"| node_quote_state
node_quote_detail -->|"opens editor"| node_line_editor
node_line_editor -->|"adds or updates line"| node_quote_state
node_quote_state -->|"calculates totals"| node_quote_math
node_quote_detail -->|"calculates display total"| node_quote_math
node_home -->|"summarizes quotes"| node_quote_state
node_parameters_page -->|"reads and changes"| node_parameter_state
node_parameter_state -->|"reads and writes"| node_firebase_config
node_quote_state -->|"uses quote settings"| node_parameter_state

click node_routes "https://github.com/christever/mydevis/blob/main/src/router/routes.jsx"
click node_login "https://github.com/christever/mydevis/blob/main/src/pages/Login/Login.jsx"
click node_auth "https://github.com/christever/mydevis/blob/main/src/contexts/auth-context.jsx"
click node_layout "https://github.com/christever/mydevis/blob/main/src/Layout/MainLayout.jsx"
click node_home "https://github.com/christever/mydevis/blob/main/src/pages/Home/Home.jsx"
click node_clients_page "https://github.com/christever/mydevis/blob/main/src/pages/Clients/Clients.jsx"
click node_client_dialog "https://github.com/christever/mydevis/blob/main/src/components/Clients/ClientDialog.jsx"
click node_client_form "https://github.com/christever/mydevis/blob/main/src/components/Clients/ClientForm.jsx"
click node_clients_state "https://github.com/christever/mydevis/blob/main/src/contexts/clients-context.jsx"
click node_quotes_page "https://github.com/christever/mydevis/blob/main/src/pages/Devis/Devis.jsx"
click node_quote_editor "https://github.com/christever/mydevis/blob/main/src/components/Devis/DevisDialog.jsx"
click node_quote_state "https://github.com/christever/mydevis/blob/main/src/contexts/devis-context.jsx"
click node_quote_detail "https://github.com/christever/mydevis/blob/main/src/pages/Devis/DevisDetails.jsx"
click node_line_editor "https://github.com/christever/mydevis/blob/main/src/components/Devis/DevisLigneDialog.jsx"
click node_quote_math "https://github.com/christever/mydevis/blob/main/src/utils/devis-calculs.js"
click node_parameters_page "https://github.com/christever/mydevis/blob/main/src/pages/Parametres/Parametres.jsx"
click node_parameter_state "https://github.com/christever/mydevis/blob/main/src/contexts/parametres-context.jsx"
click node_firebase_config "https://github.com/christever/mydevis/blob/main/src/firebase/config.js"

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_routes,node_login,node_auth,node_layout,node_home,node_user toneBlue
class node_clients_page,node_client_dialog,node_client_form,node_clients_state,node_firebase toneAmber
class node_quotes_page,node_quote_editor,node_quote_state,node_quote_detail,node_line_editor,node_quote_math toneMint
class node_parameters_page,node_parameter_state toneRose
class node_firebase_config toneTeal
```

## Components

### Access and navigation

- [Route access](https://github.com/christever/mydevis/blob/main/src/router/routes.jsx): `src/router/routes.jsx`
- [Sign in](https://github.com/christever/mydevis/blob/main/src/pages/Login/Login.jsx): `src/pages/Login/Login.jsx`
- [Authentication and profile](https://github.com/christever/mydevis/blob/main/src/contexts/auth-context.jsx): `src/contexts/auth-context.jsx`
- [Application layout](https://github.com/christever/mydevis/blob/main/src/Layout/MainLayout.jsx): `src/Layout/MainLayout.jsx`
- [Activity overview](https://github.com/christever/mydevis/blob/main/src/pages/Home/Home.jsx): `src/pages/Home/Home.jsx`

### Client management

- [Client directory](https://github.com/christever/mydevis/blob/main/src/pages/Clients/Clients.jsx): `src/pages/Clients/Clients.jsx`
- [Client editor](https://github.com/christever/mydevis/blob/main/src/components/Clients/ClientDialog.jsx): `src/components/Clients/ClientDialog.jsx`
- [Client form](https://github.com/christever/mydevis/blob/main/src/components/Clients/ClientForm.jsx): `src/components/Clients/ClientForm.jsx`
- [Client state and storage](https://github.com/christever/mydevis/blob/main/src/contexts/clients-context.jsx): `src/contexts/clients-context.jsx`

### Quote management

- [Quote list](https://github.com/christever/mydevis/blob/main/src/pages/Devis/Devis.jsx): `src/pages/Devis/Devis.jsx`
- [Quote creation](https://github.com/christever/mydevis/blob/main/src/components/Devis/DevisDialog.jsx): `src/components/Devis/DevisDialog.jsx`
- [Quote state and lifecycle](https://github.com/christever/mydevis/blob/main/src/contexts/devis-context.jsx): `src/contexts/devis-context.jsx`
- [Quote detail](https://github.com/christever/mydevis/blob/main/src/pages/Devis/DevisDetails.jsx): `src/pages/Devis/DevisDetails.jsx`
- [Quote line editor](https://github.com/christever/mydevis/blob/main/src/components/Devis/DevisLigneDialog.jsx): `src/components/Devis/DevisLigneDialog.jsx`
- [Quote calculations](https://github.com/christever/mydevis/blob/main/src/utils/devis-calculs.js): `src/utils/devis-calculs.js`

### Business settings

- [Settings screen](https://github.com/christever/mydevis/blob/main/src/pages/Parametres/Parametres.jsx): `src/pages/Parametres/Parametres.jsx`
- [Settings state and storage](https://github.com/christever/mydevis/blob/main/src/contexts/parametres-context.jsx): `src/contexts/parametres-context.jsx`

### Other components

- **User**
- [Firebase connection](https://github.com/christever/mydevis/blob/main/src/firebase/config.js): `src/firebase/config.js`
- **Firebase services**

## Connections

- User → Route access: navigates (evidence: `src/router/routes.jsx`)
- Route access → Sign in: routes to (evidence: `src/router/routes.jsx`)
- Route access → Application layout: protects routes (evidence: `src/router/routes.jsx`)
- Application layout → Activity overview: hosts (evidence: `src/router/routes.jsx`)
- Application layout → Client directory: hosts (evidence: `src/router/routes.jsx`)
- Application layout → Quote list: hosts (evidence: `src/router/routes.jsx`)
- Application layout → Quote detail: hosts (evidence: `src/router/routes.jsx`)
- Application layout → Settings screen: hosts (evidence: `src/router/routes.jsx`)
- Application layout → Client state and storage: provides (evidence: `src/Layout/MainLayout.jsx`)
- Application layout → Quote state and lifecycle: provides (evidence: `src/Layout/MainLayout.jsx`)
- Application layout → Settings state and storage: provides (evidence: `src/Layout/MainLayout.jsx`)
- Sign in → Authentication and profile: signs in (evidence: `src/pages/Login/Login.jsx`)
- Authentication and profile → Firebase connection: uses services (evidence: `src/contexts/auth-context.jsx`)
- Client directory → Client state and storage: reads and updates (evidence: `src/pages/Clients/Clients.jsx`)
- Client directory → Client editor: opens editor (evidence: `src/pages/Clients/Clients.jsx`)
- Client editor → Client form: renders (evidence: `src/components/Clients/ClientDialog.jsx`)
- Client state and storage → Firebase connection: reads and writes (evidence: `src/contexts/clients-context.jsx`)
- Firebase connection → Firebase services: connects (evidence: `src/firebase/config.js`)
- Quote list → Quote state and lifecycle: reads quotes (evidence: `src/pages/Devis/Devis.jsx`)
- Quote list → Quote creation: opens editor (evidence: `src/pages/Devis/Devis.jsx`)
- Quote creation → Client state and storage: selects clients (evidence: `src/components/Devis/DevisDialog.jsx`)
- Quote creation → Quote state and lifecycle: creates quote
- Quote detail → Quote state and lifecycle: reads quote (evidence: `src/pages/Devis/DevisDetails.jsx`)
- Quote detail → Quote line editor: opens editor (evidence: `src/pages/Devis/DevisDetails.jsx`)
- Quote line editor → Quote state and lifecycle: adds or updates line (evidence: `src/components/Devis/DevisLigneDialog.jsx`)
- Quote state and lifecycle → Quote calculations: calculates totals (evidence: `src/contexts/devis-context.jsx`)
- Quote detail → Quote calculations: calculates display total (evidence: `src/pages/Devis/DevisDetails.jsx`)
- Activity overview → Quote state and lifecycle: summarizes quotes (evidence: `src/pages/Home/Home.jsx`)
- Settings screen → Settings state and storage: reads and changes (evidence: `src/pages/Parametres/Parametres.jsx`)
- Settings state and storage → Firebase connection: reads and writes (evidence: `src/contexts/parametres-context.jsx`)
- Quote state and lifecycle → Settings state and storage: uses quote settings (evidence: `src/contexts/devis-context.jsx`)
