How usuf08593-prog/app_for_seller_customer_courier works
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: App.jsx Route layout · main.py FastAPI application · API.jsx HTTP client · database.py SQLAlchemy database
Components 34
Web application
- App entry
src/main.jsx - Route layout
src/App.jsx - HTTP client
src/context/API.jsx
Identity and access
- Authorization page
src/pages/Authorization.jsx - Login form
src/components/regis/AccountAuth.jsx - User registration
src/components/regis/AccountRegis.jsx - JWT and route access
src/context/jwt.js - Password and token security
src/backend/core/security.py
Marketplace workflows
- Shop browsing
src/pages/Shop.jsx - Product details
src/pages/ProductDetails.jsx - Seller workspace
src/pages/protected/AccountSeller.jsx - Seller listings
src/pages/protected/SellerProducts.jsx - Seller order management
src/components/SellerOrders.jsx - Customer account
src/pages/protected/AccountCustomer.jsx - AI shopping chat
src/pages/Chat_AI.jsx
Delivery operations
- Courier account
src/pages/protected/AccountCourier.jsx - Available orders
src/pages/protected/AvailableOrdersCurer.jsx - Courier orders
src/pages/protected/MyOrdersCurer.jsx - Customer tracking
src/pages/protected/CustomerOrderTracking.jsx
Backend services
- FastAPI application
src/backend/main.py - Authentication API
src/backend/routers/authUsers.py - Registration API
src/backend/routers/registrationUsers.py - Product catalog API
src/backend/routers/product.py - Seller API
src/backend/routers/seller.py - Seller products API
src/backend/routers/SellerProducts.py - Orders API
src/backend/routers/order.py - Courier API
src/backend/routers/courier.py - Tracking API
src/backend/routers/tracking.py - AI chat API
src/backend/routers/AI_chat.py - User functions API
src/backend/routers/function_route.py
Persistence
- SQLAlchemy database
src/backend/db/database.py - User model
src/backend/models/user.py - Order model
src/backend/models/order.py
Other components
- Marketplace user
Connections 48
- Marketplace user → App entry: opens app
- App entry → Route layout: renders
src/main.jsx - Route layout → Shop browsing: routes to
src/App.jsx - Route layout → Product details: routes to
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
src/pages/Authorization.jsx - Authorization page → User registration: renders
src/pages/Authorization.jsx - Login form → HTTP client: submits login
src/components/regis/AccountAuth.jsx - Login form → JWT and route access: stores token
src/components/regis/AccountAuth.jsx - Route layout → JWT and route access: checks identity
- Product details → HTTP client: loads product
src/pages/ProductDetails.jsx - Product details → HTTP client: submits order
src/pages/ProductDetails.jsx - Shop browsing → HTTP client: requests catalog
src/pages/Shop.jsx - AI shopping chat → HTTP client: calls API
src/pages/Chat_AI.jsx - Seller workspace → HTTP client: calls API
src/pages/protected/AccountSeller.jsx - Seller listings → HTTP client: calls API
src/pages/protected/SellerProducts.jsx - Seller order management → HTTP client: calls API
src/components/SellerOrders.jsx - Available orders → HTTP client: calls API
src/pages/protected/AvailableOrdersCurer.jsx - Courier orders → HTTP client: calls API
src/pages/protected/MyOrdersCurer.jsx - Customer tracking → HTTP client: calls API
src/pages/protected/CustomerOrderTracking.jsx - FastAPI application → SQLAlchemy database: creates tables
src/backend/main.py - FastAPI application → Registration API: mounts router
src/backend/main.py - FastAPI application → Authentication API: mounts router
src/backend/main.py - FastAPI application → User functions API: mounts router
src/backend/main.py - FastAPI application → Seller products API: mounts router
src/backend/main.py - FastAPI application → Product catalog API: mounts router
src/backend/main.py - FastAPI application → Orders API: mounts router
src/backend/main.py - FastAPI application → AI chat API: mounts router
src/backend/main.py - FastAPI application → Courier API: mounts router
src/backend/main.py - FastAPI application → Seller API: mounts router
src/backend/main.py - FastAPI application → Tracking API: mounts router
src/backend/main.py - Authentication API → Password and token security: verifies credentials
src/backend/routers/authUsers.py - Authentication API → User model: looks up user
src/backend/routers/authUsers.py - Authentication API → SQLAlchemy database: gets session
src/backend/routers/authUsers.py - Registration API → SQLAlchemy database: gets session
src/backend/routers/registrationUsers.py - Registration API → Password and token security: hashes password
src/backend/routers/registrationUsers.py - Product catalog API → SQLAlchemy database: gets session
src/backend/routers/product.py - Seller API → SQLAlchemy database: gets session
src/backend/routers/seller.py - Seller products API → SQLAlchemy database: gets session
src/backend/routers/SellerProducts.py