# exocoms-teams/e-commerce architecture

> Architecture diagram of the GitHub repository exocoms-teams/e-commerce, 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/exocoms-teams/e-commerce
- Repository: https://github.com/exocoms-teams/e-commerce

## Overview

This repository combines three Odoo product areas: a sneaker storefront, a product-trend intelligence service, and Revolut payment and business-account integrations. The trend workflow collects marketplace or ad data, exposes dashboard/product views, and maintains scored trend records; the excerpts show parts of this flow but not every ingestion-to-record dispatch. Storefront capabilities are represented by their routes, models and browser modules, but their internal wiring was not sampled. Revolut webhook and authorization calls are directly visible; unsampled reconciliation behavior is shown without guessed links.

Main entry points: [`exocoms_payment_revolut/controllers/main.py`](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/controllers/main.py) (Payment return and webhook), [`exocoms_revolut_reconciliation/controllers/main.py`](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/controllers/main.py) (Authorization callback), [`produits_tendance/models/trend_product.py`](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_product.py) (Trend products), [`produits_tendance/controllers/dashboard_api.py`](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/controllers/dashboard_api.py) (Dashboard API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Sneaker storefront"]
  node_storefront_routes["Storefront routes<br/>[main.py]"]
  node_shop_browse["Browse and search<br/>[shop.js]"]
  node_product_view["Product view<br/>[product.js]"]
  node_cart_checkout["Cart and checkout<br/>[checkout.js]"]
  node_cart_ui["Cart interactions<br/>[cart.js]"]
  node_wishlist["Wishlist<br/>[wishlist.js]"]
  node_confirmation["Order confirmation<br/>[confirmation.js]"]
  node_shipping["Shipping methods"]
  node_newsletter["Newsletter signup<br/>[newsletter.py]"]
  node_brand_catalog["Brand and product models"]
end

subgraph group_trends["Trend intelligence"]
  node_ebay_ingest["eBay collection<br/>[ebay_ingestor.py]"]
  node_meta_ingest["Meta ad collection<br/>[meta_ingestor.py]"]
  node_trend_routes["Trend routes<br/>[main.py]"]
  node_dashboard_api["Dashboard API<br/>[dashboard_api.py]"]
  node_trend_products[("Trend products<br/>[trend_product.py]")]
  node_trend_ads[("Trend ads<br/>[trend_ad.py]")]
  node_scoring["Score calculation<br/>[scoring_engine.py]"]
  node_score_history[("Score history<br/>[trend_score.py]")]
  node_score_alerts["Score alerts"]
  node_webhook_queue["Alert webhook queue"]
  node_trend_dashboard_js["Dashboard interactions"]
end

subgraph group_payments["Revolut payments"]
  node_payment_routes["Payment return and webhook<br/>[main.py]"]
  node_payment_provider["Payment provider"]
  node_payment_transaction[("Payment transaction")]
end

subgraph group_reconciliation["Reconciliation"]
  node_business_callback["Authorization callback<br/>[main.py]"]
  node_business_connection[("Business connection")]
  node_journal[("Bank journal<br/>[account_journal.py]")]
  node_statement_line[("Statement lines")]
end

node_shopper(("Shopper"))
node_trend_operator(("Trend operator"))
node_revolut_customer(("Payment customer"))
node_revolut_service["Revolut"]
node_business_user(("Business account user"))
node_revolut_business["Revolut Business"]

node_trend_routes -->|"calls detail API"| node_dashboard_api
node_dashboard_api -->|"loads ad data"| node_trend_ads
node_trend_products -->|"selects latest ads"| node_trend_ads
node_trend_products -->|"calculates score"| node_scoring
node_payment_routes -->|"verifies signature"| node_payment_provider
node_payment_routes -->|"processes payment"| node_payment_transaction
node_payment_routes -->|"fetches order"| node_revolut_service
node_revolut_customer -.->|"returns or notifies"| node_payment_routes
node_business_user -.->|"completes authorization"| node_business_callback
node_business_callback -->|"exchanges code"| node_business_connection
node_revolut_business -.->|"returns code"| node_business_callback

click node_storefront_routes "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/controllers/main.py"
click node_shop_browse "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/shop.js"
click node_product_view "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/product.js"
click node_cart_checkout "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/checkout.js"
click node_cart_ui "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/cart.js"
click node_wishlist "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/wishlist.js"
click node_confirmation "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/confirmation.js"
click node_shipping "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/delivery_carrier.py"
click node_newsletter "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/newsletter.py"
click node_brand_catalog "https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/product_template.py"
click node_ebay_ingest "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/collecte_scrapers/ebay_ingestor.py"
click node_meta_ingest "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/collecte_scrapers/meta_ingestor.py"
click node_trend_routes "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/controllers/main.py"
click node_dashboard_api "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/controllers/dashboard_api.py"
click node_trend_products "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_product.py"
click node_trend_ads "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_ad.py"
click node_scoring "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/services/scoring_engine.py"
click node_score_history "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_score.py"
click node_score_alerts "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_score_alert.py"
click node_webhook_queue "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_webhook_queue.py"
click node_trend_dashboard_js "https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/static/src/js/winners_dashboard.js"
click node_payment_routes "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/controllers/main.py"
click node_payment_provider "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/models/payment_provider.py"
click node_payment_transaction "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/models/payment_transaction.py"
click node_business_callback "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/controllers/main.py"
click node_business_connection "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/revolut_business_connection.py"
click node_journal "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/account_journal.py"
click node_statement_line "https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/account_bank_statement_line.py"

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_storefront_routes,node_shop_browse,node_product_view,node_cart_checkout,node_cart_ui,node_wishlist,node_confirmation,node_shipping,node_newsletter,node_brand_catalog,node_business_user toneBlue
class node_ebay_ingest,node_meta_ingest,node_trend_routes,node_dashboard_api,node_trend_products,node_trend_ads,node_scoring,node_score_history,node_score_alerts,node_webhook_queue,node_trend_dashboard_js toneAmber
class node_payment_routes,node_payment_provider,node_payment_transaction toneMint
class node_business_callback,node_business_connection,node_journal,node_statement_line toneRose
class node_shopper,node_trend_operator,node_revolut_customer,node_revolut_service,node_revolut_business toneIndigo
```

## Components

### Sneaker storefront

- [Storefront routes](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/controllers/main.py): `sneakers/controllers/main.py`
- [Browse and search](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/shop.js): `sneakers/static/src/js/shop.js`
- [Product view](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/product.js): `sneakers/static/src/js/product.js`
- [Cart and checkout](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/checkout.js): `sneakers/static/src/js/checkout.js`
- [Cart interactions](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/cart.js): `sneakers/static/src/js/cart.js`
- [Wishlist](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/wishlist.js): `sneakers/static/src/js/wishlist.js`
- [Order confirmation](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/static/src/js/confirmation.js): `sneakers/static/src/js/confirmation.js`
- [Shipping methods](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/delivery_carrier.py): `sneakers/models/delivery_carrier.py`
- [Newsletter signup](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/newsletter.py): `sneakers/models/newsletter.py`
- [Brand and product models](https://github.com/exocoms-teams/e-commerce/blob/main/sneakers/models/product_template.py): `sneakers/models/product_template.py`

### Trend intelligence

- [eBay collection](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/collecte_scrapers/ebay_ingestor.py): `produits_tendance/collecte_scrapers/ebay_ingestor.py`
- [Meta ad collection](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/collecte_scrapers/meta_ingestor.py): `produits_tendance/collecte_scrapers/meta_ingestor.py`
- [Trend routes](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/controllers/main.py): `produits_tendance/controllers/main.py`
- [Dashboard API](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/controllers/dashboard_api.py): `produits_tendance/controllers/dashboard_api.py`
- [Trend products](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_product.py): `produits_tendance/models/trend_product.py`
- [Trend ads](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_ad.py): `produits_tendance/models/trend_ad.py`
- [Score calculation](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/services/scoring_engine.py): `produits_tendance/services/scoring_engine.py`
- [Score history](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_score.py): `produits_tendance/models/trend_score.py`
- [Score alerts](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_score_alert.py): `produits_tendance/models/trend_score_alert.py`
- [Alert webhook queue](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/models/trend_webhook_queue.py): `produits_tendance/models/trend_webhook_queue.py`
- [Dashboard interactions](https://github.com/exocoms-teams/e-commerce/blob/main/produits_tendance/static/src/js/winners_dashboard.js): `produits_tendance/static/src/js/winners_dashboard.js`

### Revolut payments

- [Payment return and webhook](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/controllers/main.py): `exocoms_payment_revolut/controllers/main.py`
- [Payment provider](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/models/payment_provider.py): `exocoms_payment_revolut/models/payment_provider.py`
- [Payment transaction](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_payment_revolut/models/payment_transaction.py): `exocoms_payment_revolut/models/payment_transaction.py`

### Reconciliation

- [Authorization callback](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/controllers/main.py): `exocoms_revolut_reconciliation/controllers/main.py`
- [Business connection](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/revolut_business_connection.py): `exocoms_revolut_reconciliation/models/revolut_business_connection.py`
- [Bank journal](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/account_journal.py): `exocoms_revolut_reconciliation/models/account_journal.py`
- [Statement lines](https://github.com/exocoms-teams/e-commerce/blob/main/exocoms_revolut_reconciliation/models/account_bank_statement_line.py): `exocoms_revolut_reconciliation/models/account_bank_statement_line.py`

### Other components

- **Shopper**
- **Trend operator**
- **Payment customer**
- **Revolut**
- **Business account user**
- **Revolut Business**

## Connections

- Trend routes → Dashboard API: calls detail API (evidence: `produits_tendance/controllers/main.py`)
- Dashboard API → Trend ads: loads ad data (evidence: `produits_tendance/controllers/dashboard_api.py`)
- Trend products → Trend ads: selects latest ads (evidence: `produits_tendance/models/trend_product.py`)
- Trend products → Score calculation: calculates score (evidence: `produits_tendance/models/trend_product.py`)
- Payment return and webhook → Payment provider: verifies signature (evidence: `exocoms_payment_revolut/controllers/main.py`)
- Payment return and webhook → Payment transaction: processes payment (evidence: `exocoms_payment_revolut/controllers/main.py`)
- Payment return and webhook → Revolut: fetches order (evidence: `exocoms_payment_revolut/controllers/main.py`)
- Payment customer → Payment return and webhook: returns or notifies
- Business account user → Authorization callback: completes authorization
- Authorization callback → Business connection: exchanges code (evidence: `exocoms_revolut_reconciliation/controllers/main.py`)
- Revolut Business → Authorization callback: returns code
