# lucasramiandrisoa/e-commerce-vente-de-vanille- architecture

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

- Interactive diagram: https://gitdiagram.com/lucasramiandrisoa/e-commerce-vente-de-vanille-
- Repository: https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-

## Overview

Plateforme e-commerce full-stack pour vendre et exporter de la vanille de Madagascar. Le parcours principal mène du catalogue filtrable au panier, puis à la validation de commande et au paiement; les clients peuvent aussi consulter leurs commandes et contacter le service client. L’administration couvre le catalogue, les stocks, les commandes et les messages. Les extraits confirment les appels de catalogue, de commande et d’administration visibles; les autres liaisons d’API sont omises ou indiquées comme non vérifiées.

Main entry points: [`frontend/src/App.js`](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/App.js) (Routes frontend), [`backend/routes.py`](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/routes.py) (API et opérations), [`frontend/src/components/CheckoutModal.jsx`](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/components/CheckoutModal.jsx) (Validation commande), [`frontend/src/pages/Home.jsx`](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Home.jsx) (Catalogue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Navigation et accès"]
  node_app["Routes frontend<br/>[App.js]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_login["Connexion<br/>[Login.jsx]"]
  node_register["Inscription<br/>[Register.jsx]"]
end

subgraph group_shopping["Achat et client"]
  node_home["Catalogue<br/>[Home.jsx]"]
  node_product["Détail produit<br/>[ProductDetail.jsx]"]
  node_cart["Panier<br/>[Cart.jsx]"]
  node_checkout["Validation commande<br/>[CheckoutModal.jsx]"]
  node_orders["Commandes client<br/>[Orders.jsx]"]
  node_contact["Contact<br/>[Contact.jsx]"]
  node_admin["Administration<br/>[AdminDashboard.jsx]"]
end

subgraph group_server["API et domaine"]
  node_api_client["Client API<br/>[axios.js]"]
  node_backend["Application Flask<br/>[app.py]"]
  node_routes["API et opérations<br/>[routes.py]"]
end

subgraph group_state["État et données"]
  node_models["Modèles métier<br/>[models.py]"]
  node_database[("Base de données<br/>[models.py]")]
  node_cart_state["État du panier<br/>[cartStore.js]"]
  node_theme_state["Préférences thème<br/>[themeStore.js]"]
end

subgraph group_payments["Paiements externes"]
  node_mvola["MVola"]
  node_orange_money["Orange Money"]
  node_stripe["Stripe"]
  node_bni["Virement BNI"]
end

node_shopper(("Client"))

node_shopper -->|"utilise"| node_app
node_app -->|"affiche"| node_navbar
node_app -->|"route vers"| node_home
node_app -->|"route vers"| node_login
node_app -->|"route vers"| node_register
node_app -->|"route vers"| node_product
node_app -->|"route vers"| node_cart
node_app -->|"route vers"| node_orders
node_app -->|"route vers"| node_contact
node_app -->|"route vers"| node_admin
node_home -->|"charge produits"| node_api_client
node_home -->|"ajoute articles"| node_cart_state
node_home -->|"ouvre paiement"| node_checkout
node_product -->|"ajoute article"| node_cart_state
node_cart -->|"lit panier"| node_cart_state
node_cart -->|"ouvre paiement"| node_checkout
node_navbar -->|"lit panier"| node_cart_state
node_navbar -->|"lit thème"| node_theme_state
node_checkout -->|"soumet commande"| node_routes
node_orders -->|"appelle API"| node_api_client
node_admin -->|"appelle API"| node_api_client
node_api_client -->|"cible API"| node_backend
node_backend -->|"enregistre routes"| node_routes
node_backend -->|"initialise modèles"| node_models
node_routes -->|"interroge modèles"| node_models
node_models -.->|"persiste données"| node_database
node_routes -->|"redirige paiement"| node_mvola
node_routes -->|"redirige paiement"| node_orange_money
node_checkout -.->|"option de paiement"| node_stripe
node_checkout -.->|"option de paiement"| node_bni
node_contact -.->|"envoie message"| node_routes

click node_app "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/App.js"
click node_navbar "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/components/Navbar.jsx"
click node_login "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Login.jsx"
click node_register "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Register.jsx"
click node_home "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Home.jsx"
click node_product "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/ProductDetail.jsx"
click node_cart "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Cart.jsx"
click node_checkout "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/components/CheckoutModal.jsx"
click node_orders "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Orders.jsx"
click node_contact "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Contact.jsx"
click node_admin "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_api_client "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/api/axios.js"
click node_backend "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/app.py"
click node_routes "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/routes.py"
click node_models "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/models.py"
click node_database "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/models.py"
click node_cart_state "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/store/cartStore.js"
click node_theme_state "https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/store/themeStore.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_app,node_navbar,node_login,node_register,node_shopper toneBlue
class node_home,node_product,node_cart,node_checkout,node_orders,node_contact,node_admin toneAmber
class node_api_client,node_backend,node_routes toneMint
class node_models,node_database,node_cart_state,node_theme_state toneRose
class node_mvola,node_orange_money,node_stripe,node_bni toneIndigo
```

## Components

### Navigation et accès

- [Routes frontend](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Navigation](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Connexion](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Inscription](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`

### Achat et client

- [Catalogue](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Détail produit](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/ProductDetail.jsx): `frontend/src/pages/ProductDetail.jsx`
- [Panier](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Cart.jsx): `frontend/src/pages/Cart.jsx`
- [Validation commande](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/components/CheckoutModal.jsx): `frontend/src/components/CheckoutModal.jsx`
- [Commandes client](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Orders.jsx): `frontend/src/pages/Orders.jsx`
- [Contact](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/Contact.jsx): `frontend/src/pages/Contact.jsx`
- [Administration](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`

### API et domaine

- [Client API](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`
- [Application Flask](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/app.py): `backend/app.py`
- [API et opérations](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/routes.py): `backend/routes.py`

### État et données

- [Modèles métier](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/models.py): `backend/models.py`
- [Base de données](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/backend/models.py): `backend/models.py`
- [État du panier](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/store/cartStore.js): `frontend/src/store/cartStore.js`
- [Préférences thème](https://github.com/lucasramiandrisoa/e-commerce-vente-de-vanille-/blob/main/frontend/src/store/themeStore.js): `frontend/src/store/themeStore.js`

### Paiements externes

- **MVola**
- **Orange Money**
- **Stripe**
- **Virement BNI**

### Other components

- **Client**

## Connections

- Client → Routes frontend: utilise (evidence: `frontend/src/App.js`)
- Routes frontend → Navigation: affiche (evidence: `frontend/src/App.js`)
- Routes frontend → Catalogue: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Connexion: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Inscription: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Détail produit: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Panier: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Commandes client: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Contact: route vers (evidence: `frontend/src/App.js`)
- Routes frontend → Administration: route vers (evidence: `frontend/src/App.js`)
- Catalogue → Client API: charge produits (evidence: `frontend/src/pages/Home.jsx`)
- Catalogue → État du panier: ajoute articles (evidence: `frontend/src/pages/Home.jsx`)
- Catalogue → Validation commande: ouvre paiement (evidence: `frontend/src/pages/Home.jsx`)
- Détail produit → État du panier: ajoute article (evidence: `frontend/src/pages/ProductDetail.jsx`)
- Panier → État du panier: lit panier (evidence: `frontend/src/pages/Cart.jsx`)
- Panier → Validation commande: ouvre paiement (evidence: `frontend/src/pages/Cart.jsx`)
- Navigation → État du panier: lit panier (evidence: `frontend/src/components/Navbar.jsx`)
- Navigation → Préférences thème: lit thème (evidence: `frontend/src/components/Navbar.jsx`)
- Validation commande → API et opérations: soumet commande (evidence: `frontend/src/components/CheckoutModal.jsx`)
- Commandes client → Client API: appelle API (evidence: `frontend/src/pages/Orders.jsx`)
- Administration → Client API: appelle API (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Client API → Application Flask: cible API (evidence: `frontend/src/api/axios.js`)
- Application Flask → API et opérations: enregistre routes (evidence: `backend/app.py`)
- Application Flask → Modèles métier: initialise modèles (evidence: `backend/app.py`)
- API et opérations → Modèles métier: interroge modèles (evidence: `backend/routes.py`)
- Modèles métier → Base de données: persiste données (evidence: `backend/models.py`)
- API et opérations → MVola: redirige paiement (evidence: `backend/routes.py`)
- API et opérations → Orange Money: redirige paiement (evidence: `backend/routes.py`)
- Validation commande → Stripe: option de paiement (evidence: `README.md`)
- Validation commande → Virement BNI: option de paiement (evidence: `README.md`)
- Contact → API et opérations: envoie message (evidence: `README.md`)
