# usuf08593-prog/app_for_seller_customer_courier architecture

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

- Interactive diagram: https://gitdiagram.com/usuf08593-prog/app_for_seller_customer_courier
- Repository: https://github.com/usuf08593-prog/app_for_seller_customer_courier

## Overview

This repository implements a role-based marketplace: users browse products and place orders, while sellers manage listings and orders and couriers handle delivery and tracking. The React application routes users into these flows and calls a FastAPI backend; backend routers implement authentication, catalog, order, seller, courier, tracking, and AI-chat capabilities over SQLAlchemy models and a configured database. The README is only the default React/Vite template, so product capabilities are inferred from the source tree and sampled code; links between unsampled screens and backend routes are omitted where calls are not evidenced.

Main entry points: [`src/App.jsx`](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/App.jsx) (Route layout), [`src/backend/main.py`](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/main.py) (FastAPI application), [`src/context/API.jsx`](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/context/API.jsx) (HTTP client), [`src/backend/db/database.py`](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/db/database.py) (SQLAlchemy database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_entry["App entry<br/>[main.jsx]"]
  node_routes["Route layout<br/>[App.jsx]"]
  node_api["HTTP client<br/>[API.jsx]"]
end

subgraph group_identity["Identity and access"]
  node_authpage["Authorization page<br/>[Authorization.jsx]"]
  node_login["Login form<br/>[AccountAuth.jsx]"]
  node_registration["User registration<br/>[AccountRegis.jsx]"]
  node_access["JWT and route access<br/>[jwt.js]"]
  node_security["Password and token security<br/>[security.py]"]
end

subgraph group_market["Marketplace workflows"]
  node_shop["Shop browsing<br/>[Shop.jsx]"]
  node_product["Product details<br/>[ProductDetails.jsx]"]
  node_sellerui["Seller workspace<br/>[AccountSeller.jsx]"]
  node_sellerproducts["Seller listings<br/>[SellerProducts.jsx]"]
  node_sellerorders["Seller order management<br/>[SellerOrders.jsx]"]
  node_customer["Customer account"]
  node_chat["AI shopping chat<br/>[Chat_AI.jsx]"]
end

subgraph group_delivery["Delivery operations"]
  node_courier["Courier account<br/>[AccountCourier.jsx]"]
  node_available["Available orders"]
  node_myorders["Courier orders<br/>[MyOrdersCurer.jsx]"]
  node_trackingui["Customer tracking"]
end

subgraph group_server["Backend services"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_authrouter["Authentication API<br/>[authUsers.py]"]
  node_registerrouter["Registration API"]
  node_catalogrouter["Product catalog API<br/>[product.py]"]
  node_sellerrouter["Seller API<br/>[seller.py]"]
  node_sellerproductrouter["Seller products API<br/>[SellerProducts.py]"]
  node_ordersrouter["Orders API<br/>[order.py]"]
  node_courierrouter["Courier API<br/>[courier.py]"]
  node_trackingrouter["Tracking API<br/>[tracking.py]"]
  node_chatrouter["AI chat API<br/>[AI_chat.py]"]
  node_functionsrouter["User functions API<br/>[function_route.py]"]
end

subgraph group_storage["Persistence"]
  node_database[("SQLAlchemy database<br/>[database.py]")]
  node_users["User model<br/>[user.py]"]
  node_orders["Order model<br/>[order.py]"]
end

node_visitor(("Marketplace user"))

node_visitor -.->|"opens app"| node_entry
node_entry -->|"renders"| node_routes
node_routes -->|"routes to"| node_shop
node_routes -->|"routes to"| node_product
node_routes -->|"routes to"| node_authpage
node_routes -->|"routes to"| node_sellerui
node_routes -->|"routes to"| node_sellerproducts
node_routes -->|"routes to"| node_sellerorders
node_routes -->|"routes to"| node_customer
node_routes -->|"routes to"| node_chat
node_routes -->|"routes to"| node_courier
node_routes -->|"routes to"| node_available
node_routes -->|"routes to"| node_myorders
node_routes -->|"routes to"| node_trackingui
node_authpage -->|"renders"| node_login
node_authpage -->|"renders"| node_registration
node_login -->|"submits login"| node_api
node_login -->|"stores token"| node_access
node_routes -->|"checks identity"| node_access
node_product -->|"loads product"| node_api
node_product -->|"submits order"| node_api
node_shop -->|"requests catalog"| node_api
node_chat -->|"calls API"| node_api
node_sellerui -->|"calls API"| node_api
node_sellerproducts -->|"calls API"| node_api
node_sellerorders -->|"calls API"| node_api
node_available -->|"calls API"| node_api
node_myorders -->|"calls API"| node_api
node_trackingui -->|"calls API"| node_api
node_backend -->|"creates tables"| node_database
node_backend -->|"mounts router"| node_registerrouter
node_backend -->|"mounts router"| node_authrouter
node_backend -->|"mounts router"| node_functionsrouter
node_backend -->|"mounts router"| node_sellerproductrouter
node_backend -->|"mounts router"| node_catalogrouter
node_backend -->|"mounts router"| node_ordersrouter
node_backend -->|"mounts router"| node_chatrouter
node_backend -->|"mounts router"| node_courierrouter
node_backend -->|"mounts router"| node_sellerrouter
node_backend -->|"mounts router"| node_trackingrouter
node_authrouter -->|"verifies credentials"| node_security
node_authrouter -->|"looks up user"| node_users
node_authrouter -->|"gets session"| node_database
node_registerrouter -->|"gets session"| node_database
node_registerrouter -->|"hashes password"| node_security
node_catalogrouter -->|"gets session"| node_database
node_sellerrouter -->|"gets session"| node_database
node_sellerproductrouter -->|"gets session"| node_database

click node_entry "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/main.jsx"
click node_routes "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/App.jsx"
click node_shop "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Shop.jsx"
click node_product "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/ProductDetails.jsx"
click node_sellerui "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountSeller.jsx"
click node_sellerproducts "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/SellerProducts.jsx"
click node_sellerorders "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/SellerOrders.jsx"
click node_authpage "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Authorization.jsx"
click node_login "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/regis/AccountAuth.jsx"
click node_registration "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/regis/AccountRegis.jsx"
click node_access "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/context/jwt.js"
click node_customer "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountCustomer.jsx"
click node_chat "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Chat_AI.jsx"
click node_courier "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountCourier.jsx"
click node_available "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AvailableOrdersCurer.jsx"
click node_myorders "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/MyOrdersCurer.jsx"
click node_trackingui "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/CustomerOrderTracking.jsx"
click node_api "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/context/API.jsx"
click node_backend "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/main.py"
click node_authrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/authUsers.py"
click node_registerrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/registrationUsers.py"
click node_catalogrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/product.py"
click node_sellerrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/seller.py"
click node_sellerproductrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/SellerProducts.py"
click node_ordersrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/order.py"
click node_courierrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/courier.py"
click node_trackingrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/tracking.py"
click node_chatrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/AI_chat.py"
click node_functionsrouter "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/function_route.py"
click node_security "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/core/security.py"
click node_database "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/db/database.py"
click node_users "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/models/user.py"
click node_orders "https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/models/order.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_entry,node_routes,node_api,node_visitor toneBlue
class node_authpage,node_login,node_registration,node_access,node_security toneAmber
class node_shop,node_product,node_sellerui,node_sellerproducts,node_sellerorders,node_customer,node_chat toneMint
class node_courier,node_available,node_myorders,node_trackingui toneRose
class node_backend,node_authrouter,node_registerrouter,node_catalogrouter,node_sellerrouter,node_sellerproductrouter,node_ordersrouter,node_courierrouter,node_trackingrouter,node_chatrouter,node_functionsrouter toneIndigo
class node_database,node_users,node_orders toneTeal
```

## Components

### Web application

- [App entry](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/main.jsx): `src/main.jsx`
- [Route layout](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/App.jsx): `src/App.jsx`
- [HTTP client](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/context/API.jsx): `src/context/API.jsx`

### Identity and access

- [Authorization page](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Authorization.jsx): `src/pages/Authorization.jsx`
- [Login form](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/regis/AccountAuth.jsx): `src/components/regis/AccountAuth.jsx`
- [User registration](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/regis/AccountRegis.jsx): `src/components/regis/AccountRegis.jsx`
- [JWT and route access](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/context/jwt.js): `src/context/jwt.js`
- [Password and token security](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/core/security.py): `src/backend/core/security.py`

### Marketplace workflows

- [Shop browsing](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Shop.jsx): `src/pages/Shop.jsx`
- [Product details](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/ProductDetails.jsx): `src/pages/ProductDetails.jsx`
- [Seller workspace](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountSeller.jsx): `src/pages/protected/AccountSeller.jsx`
- [Seller listings](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/SellerProducts.jsx): `src/pages/protected/SellerProducts.jsx`
- [Seller order management](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/components/SellerOrders.jsx): `src/components/SellerOrders.jsx`
- [Customer account](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountCustomer.jsx): `src/pages/protected/AccountCustomer.jsx`
- [AI shopping chat](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/Chat_AI.jsx): `src/pages/Chat_AI.jsx`

### Delivery operations

- [Courier account](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AccountCourier.jsx): `src/pages/protected/AccountCourier.jsx`
- [Available orders](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/AvailableOrdersCurer.jsx): `src/pages/protected/AvailableOrdersCurer.jsx`
- [Courier orders](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/MyOrdersCurer.jsx): `src/pages/protected/MyOrdersCurer.jsx`
- [Customer tracking](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/pages/protected/CustomerOrderTracking.jsx): `src/pages/protected/CustomerOrderTracking.jsx`

### Backend services

- [FastAPI application](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/main.py): `src/backend/main.py`
- [Authentication API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/authUsers.py): `src/backend/routers/authUsers.py`
- [Registration API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/registrationUsers.py): `src/backend/routers/registrationUsers.py`
- [Product catalog API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/product.py): `src/backend/routers/product.py`
- [Seller API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/seller.py): `src/backend/routers/seller.py`
- [Seller products API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/SellerProducts.py): `src/backend/routers/SellerProducts.py`
- [Orders API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/order.py): `src/backend/routers/order.py`
- [Courier API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/courier.py): `src/backend/routers/courier.py`
- [Tracking API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/tracking.py): `src/backend/routers/tracking.py`
- [AI chat API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/AI_chat.py): `src/backend/routers/AI_chat.py`
- [User functions API](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/routers/function_route.py): `src/backend/routers/function_route.py`

### Persistence

- [SQLAlchemy database](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/db/database.py): `src/backend/db/database.py`
- [User model](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/models/user.py): `src/backend/models/user.py`
- [Order model](https://github.com/usuf08593-prog/app_for_seller_customer_courier/blob/main/src/backend/models/order.py): `src/backend/models/order.py`

### Other components

- **Marketplace user**

## Connections

- Marketplace user → App entry: opens app
- App entry → Route layout: renders (evidence: `src/main.jsx`)
- Route layout → Shop browsing: routes to (evidence: `src/App.jsx`)
- Route layout → Product details: routes to (evidence: `src/App.jsx`)
- Route layout → Authorization page: routes to
- Route layout → Seller workspace: routes to
- Route layout → Seller listings: routes to
- Route layout → Seller order management: routes to
- Route layout → Customer account: routes to
- Route layout → AI shopping chat: routes to
- Route layout → Courier account: routes to
- Route layout → Available orders: routes to
- Route layout → Courier orders: routes to
- Route layout → Customer tracking: routes to
- Authorization page → Login form: renders (evidence: `src/pages/Authorization.jsx`)
- Authorization page → User registration: renders (evidence: `src/pages/Authorization.jsx`)
- Login form → HTTP client: submits login (evidence: `src/components/regis/AccountAuth.jsx`)
- Login form → JWT and route access: stores token (evidence: `src/components/regis/AccountAuth.jsx`)
- Route layout → JWT and route access: checks identity
- Product details → HTTP client: loads product (evidence: `src/pages/ProductDetails.jsx`)
- Product details → HTTP client: submits order (evidence: `src/pages/ProductDetails.jsx`)
- Shop browsing → HTTP client: requests catalog (evidence: `src/pages/Shop.jsx`)
- AI shopping chat → HTTP client: calls API (evidence: `src/pages/Chat_AI.jsx`)
- Seller workspace → HTTP client: calls API (evidence: `src/pages/protected/AccountSeller.jsx`)
- Seller listings → HTTP client: calls API (evidence: `src/pages/protected/SellerProducts.jsx`)
- Seller order management → HTTP client: calls API (evidence: `src/components/SellerOrders.jsx`)
- Available orders → HTTP client: calls API (evidence: `src/pages/protected/AvailableOrdersCurer.jsx`)
- Courier orders → HTTP client: calls API (evidence: `src/pages/protected/MyOrdersCurer.jsx`)
- Customer tracking → HTTP client: calls API (evidence: `src/pages/protected/CustomerOrderTracking.jsx`)
- FastAPI application → SQLAlchemy database: creates tables (evidence: `src/backend/main.py`)
- FastAPI application → Registration API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Authentication API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → User functions API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Seller products API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Product catalog API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Orders API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → AI chat API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Courier API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Seller API: mounts router (evidence: `src/backend/main.py`)
- FastAPI application → Tracking API: mounts router (evidence: `src/backend/main.py`)
- Authentication API → Password and token security: verifies credentials (evidence: `src/backend/routers/authUsers.py`)
- Authentication API → User model: looks up user (evidence: `src/backend/routers/authUsers.py`)
- Authentication API → SQLAlchemy database: gets session (evidence: `src/backend/routers/authUsers.py`)
- Registration API → SQLAlchemy database: gets session (evidence: `src/backend/routers/registrationUsers.py`)
- Registration API → Password and token security: hashes password (evidence: `src/backend/routers/registrationUsers.py`)
- Product catalog API → SQLAlchemy database: gets session (evidence: `src/backend/routers/product.py`)
- Seller API → SQLAlchemy database: gets session (evidence: `src/backend/routers/seller.py`)
- Seller products API → SQLAlchemy database: gets session (evidence: `src/backend/routers/SellerProducts.py`)
