# apextradebt/phonep2c architecture

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

- Interactive diagram: https://gitdiagram.com/apextradebt/phonep2c
- Repository: https://github.com/apextradebt/phonep2c

## Overview

Nexus is a phone-recovery operations frontend: users can prepare unitary or fleet quotes, review market-based pricing advice, and monitor expertise and order progress. The app also exposes catalogue, market, user, and account settings areas. The graph follows explicit route wiring and sampled calls; several page implementations and quote-step connections were not sampled, so their internal relationships are left out. Market-analysis providers are shown only as optional integrations described by the UI.

Main entry points: [`src/App.tsx`](https://github.com/apextradebt/phonep2c/blob/main/src/App.tsx) (App routes), [`src/pages/Devis.tsx`](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis.tsx) (Quote entry), [`src/pages/Devis/DevisUnitaireForm.tsx`](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis/DevisUnitaireForm.tsx) (Unitary quote), [`src/pages/Settings.tsx`](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Settings.tsx) (Account settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App routes<br/>[App.tsx]"]
  node_layout["App layout<br/>[LayoutContent.tsx]"]
end

subgraph group_quotes["Quotes and pricing"]
  node_devis["Quote entry<br/>[Devis.tsx]"]
  node_unitform["Unitary quote"]
  node_unit1["Device details<br/>[U_step1.tsx]"]
  node_unit2["Condition<br/>[U_step2.tsx]"]
  node_unit3["Quote details<br/>[U_step3.tsx]"]
  node_unit4["Market pricing<br/>[U_step4.tsx]"]
  node_fleet["Fleet intake<br/>[F_step1.tsx]"]
  node_reprise["Recovery choice<br/>[ChoiceReprise.tsx]"]
  node_final["Quote finalization<br/>[FinalStep.tsx]"]
  node_pdf["Quote PDF<br/>[DevisPDF.tsx]"]
end

subgraph group_operations["Recovery operations"]
  node_logistics["Logistics board<br/>[Index.tsx]"]
  node_orders["Orders<br/>[Commandes.tsx]"]
  node_notifications["Logistics notifications<br/>[Notifications.tsx]"]
end

subgraph group_reference["Market and catalogue"]
  node_market["Market analysis<br/>[Marche.tsx]"]
  node_catalogue["Phone catalogue<br/>[Catalogue.tsx]"]
  node_catalogstate["Catalogue context<br/>[CatalogContext.tsx]"]
  node_overrides[("Browser overrides")]
end

subgraph group_account["Identity and account"]
  node_login["Sign-in page<br/>[Connexion.tsx]"]
  node_settings["Account settings<br/>[Settings.tsx]"]
  node_userstate["User context<br/>[UserContext.tsx]"]
end

node_user(("Operator"))
node_auth{{"Auth0"}}
node_api{{"Application API"}}
node_marketplaces{{"Resale marketplaces"}}

node_user -->|"opens"| node_app
node_app -->|"authenticates with"| node_auth
node_app -->|"renders routes"| node_layout
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_devis
node_app -->|"routes to"| node_market
node_app -->|"routes to"| node_catalogue
node_app -->|"routes to"| node_logistics
node_app -->|"routes to"| node_settings
node_devis -->|"provides form"| node_unitform
node_unitform -->|"uses step"| node_unit1
node_unitform -->|"uses step"| node_unit2
node_unitform -->|"uses step"| node_unit3
node_unitform -->|"uses step"| node_unit4
node_devis -->|"offers fleet intake"| node_fleet
node_devis -->|"offers recovery choice"| node_reprise
node_devis -->|"offers finalization"| node_final
node_final -->|"renders document"| node_pdf
node_unit4 -.->|"shows market sources"| node_marketplaces
node_catalogue -->|"uses catalogue"| node_catalogstate
node_catalogstate -->|"reads and writes"| node_overrides
node_logistics -->|"renders tab"| node_orders
node_logistics -->|"renders tab"| node_notifications
node_settings -->|"gets token"| node_auth
node_settings -->|"refreshes profile"| node_userstate
node_settings -->|"sends account requests"| node_api

click node_app "https://github.com/apextradebt/phonep2c/blob/main/src/App.tsx"
click node_layout "https://github.com/apextradebt/phonep2c/blob/main/src/components/LayoutContent.tsx"
click node_login "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Connexion.tsx"
click node_devis "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis.tsx"
click node_unitform "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis/DevisUnitaireForm.tsx"
click node_unit1 "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step1.tsx"
click node_unit2 "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step2.tsx"
click node_unit3 "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step3.tsx"
click node_unit4 "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step4.tsx"
click node_fleet "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/flotte/F_step1.tsx"
click node_reprise "https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/ChoiceReprise.tsx"
click node_final "https://github.com/apextradebt/phonep2c/blob/main/src/components/FinalStep.tsx"
click node_pdf "https://github.com/apextradebt/phonep2c/blob/main/src/components/DevisPDF.tsx"
click node_market "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Marche.tsx"
click node_catalogue "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Catalogue.tsx"
click node_catalogstate "https://github.com/apextradebt/phonep2c/blob/main/src/lib/CatalogContext.tsx"
click node_logistics "https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Index.tsx"
click node_orders "https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Commandes.tsx"
click node_notifications "https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Notifications.tsx"
click node_settings "https://github.com/apextradebt/phonep2c/blob/main/src/pages/Settings.tsx"
click node_userstate "https://github.com/apextradebt/phonep2c/blob/main/src/lib/UserContext.tsx"

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_layout toneBlue
class node_devis,node_unitform,node_unit1,node_unit2,node_unit3,node_unit4,node_fleet,node_reprise,node_final,node_pdf toneAmber
class node_logistics,node_orders,node_notifications,node_api toneMint
class node_market,node_catalogue,node_catalogstate,node_overrides toneRose
class node_login,node_settings,node_userstate,node_user,node_auth,node_marketplaces toneIndigo
```

## Components

### Application shell

- [App routes](https://github.com/apextradebt/phonep2c/blob/main/src/App.tsx): `src/App.tsx`
- [App layout](https://github.com/apextradebt/phonep2c/blob/main/src/components/LayoutContent.tsx): `src/components/LayoutContent.tsx`

### Quotes and pricing

- [Quote entry](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis.tsx): `src/pages/Devis.tsx`
- [Unitary quote](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Devis/DevisUnitaireForm.tsx): `src/pages/Devis/DevisUnitaireForm.tsx`
- [Device details](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step1.tsx): `src/components/devis/unitaire/U_step1.tsx`
- [Condition](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step2.tsx): `src/components/devis/unitaire/U_step2.tsx`
- [Quote details](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step3.tsx): `src/components/devis/unitaire/U_step3.tsx`
- [Market pricing](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/unitaire/U_step4.tsx): `src/components/devis/unitaire/U_step4.tsx`
- [Fleet intake](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/flotte/F_step1.tsx): `src/components/devis/flotte/F_step1.tsx`
- [Recovery choice](https://github.com/apextradebt/phonep2c/blob/main/src/components/devis/ChoiceReprise.tsx): `src/components/devis/ChoiceReprise.tsx`
- [Quote finalization](https://github.com/apextradebt/phonep2c/blob/main/src/components/FinalStep.tsx): `src/components/FinalStep.tsx`
- [Quote PDF](https://github.com/apextradebt/phonep2c/blob/main/src/components/DevisPDF.tsx): `src/components/DevisPDF.tsx`

### Recovery operations

- [Logistics board](https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Index.tsx): `src/pages/logistique/Index.tsx`
- [Orders](https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Commandes.tsx): `src/pages/logistique/Commandes.tsx`
- [Logistics notifications](https://github.com/apextradebt/phonep2c/blob/main/src/pages/logistique/Notifications.tsx): `src/pages/logistique/Notifications.tsx`

### Market and catalogue

- [Market analysis](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Marche.tsx): `src/pages/Marche.tsx`
- [Phone catalogue](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Catalogue.tsx): `src/pages/Catalogue.tsx`
- [Catalogue context](https://github.com/apextradebt/phonep2c/blob/main/src/lib/CatalogContext.tsx): `src/lib/CatalogContext.tsx`
- **Browser overrides**

### Identity and account

- [Sign-in page](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Connexion.tsx): `src/pages/Connexion.tsx`
- [Account settings](https://github.com/apextradebt/phonep2c/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [User context](https://github.com/apextradebt/phonep2c/blob/main/src/lib/UserContext.tsx): `src/lib/UserContext.tsx`

### Other components

- **Operator**
- **Auth0**
- **Application API**
- **Resale marketplaces**

## Connections

- Operator → App routes: opens
- App routes → Auth0: authenticates with
- App routes → App layout: renders routes
- App routes → Sign-in page: routes to
- App routes → Quote entry: routes to
- App routes → Market analysis: routes to
- App routes → Phone catalogue: routes to
- App routes → Logistics board: routes to
- App routes → Account settings: routes to
- Quote entry → Unitary quote: provides form
- Unitary quote → Device details: uses step
- Unitary quote → Condition: uses step
- Unitary quote → Quote details: uses step
- Unitary quote → Market pricing: uses step
- Quote entry → Fleet intake: offers fleet intake
- Quote entry → Recovery choice: offers recovery choice
- Quote entry → Quote finalization: offers finalization
- Quote finalization → Quote PDF: renders document
- Market pricing → Resale marketplaces: shows market sources
- Phone catalogue → Catalogue context: uses catalogue
- Catalogue context → Browser overrides: reads and writes
- Logistics board → Orders: renders tab
- Logistics board → Logistics notifications: renders tab
- Account settings → Auth0: gets token
- Account settings → User context: refreshes profile
- Account settings → Application API: sends account requests
