How revaldo007/e-commerce-platform works
Sable is a full-stack e-commerce storefront with customer shopping and a built-in admin catalog. Customers browse products, manage a locally persisted cart, authenticate, and submit checkout; the backend creates and tracks orders, using demo payment or Stripe, and the frontend presents confirmation and order history. Admins manage products, images, categories, and orders. The graph reflects documented capabilities and source-index references; some frontend-to-backend links are therefore shown as unverified rather than as directly inspected calls.
Main entry points: client.js HTTP client · App.jsx Route application · orders.py Checkout and orders · main.py FastAPI application
Components 26
Storefront
- Route application
frontend/src/App.jsx - Product browsing
frontend/src/pages/Home.jsx - Product detail
frontend/src/pages/ProductDetail.jsx - Cart and checkout
frontend/src/pages/Cart.jsx - Cart state
frontend/src/context/CartContext.jsx - Order views
frontend/src/pages/Orders.jsx - Order confirmation
frontend/src/pages/OrderConfirmation.jsx - Admin panel
frontend/src/pages/admin/AdminHome.jsx - Product management
frontend/src/pages/admin/AdminProducts.jsx - Category management
frontend/src/pages/admin/AdminCategories.jsx - Order management
frontend/src/pages/admin/AdminOrders.jsx
Identity
- Authentication state
frontend/src/context/AuthContext.jsx - HTTP client
frontend/src/api/client.js - Auth endpoints
backend/app/routers/auth.py - JWT and access control
backend/app/auth.py
Commerce API
- FastAPI application
backend/app/main.py - Product endpoints
backend/app/routers/products.py - Category endpoints
backend/app/routers/categories.py - Checkout and orders
backend/app/routers/orders.py - API schemas
backend/app/schemas.py - Money serializers
backend/app/serializers.py
Data and integrations
- Commerce models
backend/app/models.py - Database sessions
backend/app/database.py - PostgreSQL
- Stripe Checkout
Other components
- Shopper
Connections 42
- Shopper → Route application: uses storefront
frontend/src/App.jsx - Route application → Product browsing: routes to
frontend/src/App.jsx - Route application → Product detail: routes to
frontend/src/App.jsx - Route application → Cart and checkout: routes to
frontend/src/App.jsx - Route application → Order views: routes to
frontend/src/App.jsx - Route application → Order confirmation: routes to
frontend/src/App.jsx - Route application → Admin panel: routes to
frontend/src/App.jsx - Cart and checkout → Cart state: uses cart state
frontend/src/pages/Cart.jsx - Product browsing → HTTP client: requests data
frontend/src/pages/Home.jsx - Product detail → HTTP client: requests data
frontend/src/pages/ProductDetail.jsx - Cart and checkout → HTTP client: submits checkout
frontend/src/pages/Cart.jsx - Order views → HTTP client: requests history
frontend/src/pages/Orders.jsx - Order confirmation → HTTP client: loads order
frontend/src/pages/OrderConfirmation.jsx - Admin panel → Product management: routes to
frontend/src/pages/admin/AdminHome.jsx - Admin panel → Category management: routes to
frontend/src/pages/admin/AdminHome.jsx - Admin panel → Order management: routes to
frontend/src/pages/admin/AdminHome.jsx - Authentication state → HTTP client: sends credentials
frontend/src/context/AuthContext.jsx - HTTP client → FastAPI application: calls API
- FastAPI application → Auth endpoints: registers router
backend/app/main.py - FastAPI application → Product endpoints: registers router
backend/app/main.py - FastAPI application → Category endpoints: registers router
backend/app/main.py - FastAPI application → Checkout and orders: registers router
backend/app/main.py - Auth endpoints → JWT and access control: uses JWT helpers
backend/app/routers/auth.py - Product endpoints → Database sessions: uses sessions
backend/app/routers/products.py - Category endpoints → Database sessions: uses sessions
backend/app/routers/categories.py - Checkout and orders → Database sessions: uses sessions
backend/app/routers/orders.py - Checkout and orders → Stripe Checkout: creates checkout
README.md - Stripe Checkout → Checkout and orders: confirms by webhook
README.md - Product endpoints → Money serializers: converts money
backend/app/routers/products.py - Checkout and orders → Money serializers: serializes amounts
backend/app/routers/orders.py - Database sessions → PostgreSQL: connects to
README.md - Auth endpoints → API schemas: validates payloads
backend/app/routers/auth.py - Product endpoints → API schemas: uses product schemas
backend/app/routers/products.py - Checkout and orders → API schemas: uses order schemas
backend/app/routers/orders.py - Product endpoints → Commerce models: queries products
backend/app/routers/products.py - Category endpoints → Commerce models: queries categories
backend/app/routers/categories.py - Checkout and orders → Commerce models: creates orders
backend/app/routers/orders.py - Auth endpoints → Commerce models: queries users
backend/app/routers/auth.py - Commerce models → Database sessions: uses declarative base
backend/app/models.py - Product management → HTTP client: manages catalog
- Category management → HTTP client: manages categories
frontend/src/pages/admin/AdminCategories.jsx - Order management → HTTP client: manages orders