How nigler10/3d-frontend-and-backend works
This is a custom-cake e-commerce application: customers browse products or configure a cake, manage a cart, check out, then track orders and contact support; administrators manage products, orders, and support. The frontend also includes a substantial 3D topping-placement subsystem. Backend excerpts establish the Django/Channels chat and order-status messaging, data models, and payment-gateway capability. Several page implementations and API views were not sampled, so those relationships are shown only where routing, imports, or excerpts support them.
Main entry points: App.jsx Web app routes · admin_views.py Order administration API · BuildBentoPage.jsx Cake builder · consumers.py WebSocket consumers
Components 29
Customer shopping
- Web app routes
frontend/src/App.jsx - Product catalog
frontend/src/pages/ProductList.jsx - Product details
frontend/src/pages/ProductDetails.jsx - Cart state
frontend/src/context/CartContext.jsx - Checkout
frontend/src/pages/CheckoutPage.jsx - Customer orders
frontend/src/pages/customer/CustomerOrdersPage.jsx - Order detail
frontend/src/pages/customer/CustomerOrderDetailPage.jsx - Order status notifications
frontend/src/hooks/useOrderStatusNotifications.js
Cake customization
- Cake builder
frontend/src/pages/BuildBentoPage.jsx - Customization state
frontend/src/contexts/Customization.jsx - Topping controls
frontend/src/components/ToppingDragControls.jsx - Drag controller
frontend/src/utils/toppingDragController.js - Placement geometry
frontend/src/utils/toppingDragPlacement.js
Operations
- Order operations
frontend/src/pages/admin/AdminDashboard.jsx - Product administration
frontend/src/pages/admin/AdminProductList.jsx
Backend services
- Authentication
frontend/src/utils/auth.js - Store API
backend/store/views.py - Store and order data
backend/store/models.py - Order model
backend/orders/models.py - Payment gateway service
backend/payments/services.py - Order administration API
backend/orders/admin_views.py
Messaging
- Customer support
frontend/src/pages/customer/CustomerSupportPage.jsx - Admin support
frontend/src/pages/admin/AdminSupportPage.jsx - Chat data
backend/chat/models.py - Chat and broadcast service
backend/chat/services.py - WebSocket consumers
backend/chat/consumers.py - WebSocket routes
backend/chat/routing.py - ASGI entry
backend/backend/asgi.py
Other components
- Customer
Connections 31
- Customer → Web app routes: uses
- Web app routes → Product catalog: routes to
frontend/src/App.jsx - Web app routes → Cake builder: routes to
frontend/src/App.jsx - Web app routes → Checkout: routes to
frontend/src/App.jsx - Web app routes → Customer orders: routes to
frontend/src/App.jsx - Web app routes → Order detail: routes to
frontend/src/App.jsx - Web app routes → Order operations: routes to
frontend/src/App.jsx - Web app routes → Product administration: routes to
frontend/src/App.jsx - Web app routes → Customer support: routes to
frontend/src/App.jsx - Web app routes → Admin support: routes to
frontend/src/App.jsx - Cake builder → Customization state: uses
frontend/src/pages/BuildBentoPage.jsx - Cake builder → Cart state: adds items
frontend/src/pages/BuildBentoPage.jsx - Cake builder → Topping controls: renders
frontend/src/pages/BuildBentoPage.jsx - Topping controls → Drag controller: delegates to
frontend/src/components/ToppingDragControls.jsx - Drag controller → Placement geometry: uses geometry
frontend/src/utils/toppingDragController.js - Checkout → Cart state: reads cart
- Order detail → Order status notifications: shows updates
- Order status notifications → Authentication: gets token
frontend/src/hooks/useOrderStatusNotifications.js - Store API → Store and order data: reads and writes
backend/store/views.py - Order administration API → Store and order data: updates orders
backend/orders/admin_views.py - Order administration API → Chat data: uses quotations
backend/orders/admin_views.py - Order administration API → Chat and broadcast service: calls
backend/orders/admin_views.py - Order administration API → Payment gateway service: calls
backend/orders/admin_views.py - Order model → Store and order data: references
backend/orders/models.py - Chat data → Store and order data: links orders
backend/chat/models.py - Chat and broadcast service → Chat data: persists messages
backend/chat/services.py - WebSocket consumers → Chat data: uses
backend/chat/consumers.py - WebSocket consumers → Chat and broadcast service: calls
backend/chat/consumers.py - WebSocket routes → WebSocket consumers: dispatches to
backend/chat/routing.py - ASGI entry → WebSocket routes: loads routes
backend/backend/asgi.py - Order status notifications → WebSocket consumers: receives status events