How dryn-23/amfaye-bites-web-base-system works
Amfaye Bites is a bakery storefront and staff operations system. Customers browse products, manage a cart, check out, pay, track orders, and communicate with staff; administrators and cashiers manage orders, preparation, inventory, sales, and customer-facing content. The backend exposes these capabilities through an Express API and persists domain records in MongoDB. The README is empty, and several route/controller implementations were not sampled, so the graph shows documented entry points and sampled call relationships without asserting unsampled wiring.
Main entry points: app.js Express API · App.jsx Routed storefront · index.js Commerce records · chatRoutes.js Order chat and images
Components 28
Web application
- Routed storefront
amfaye-bites/frontend/src/App.jsx - Auth and cart state
amfaye-bites/frontend/src/context/AuthContext.jsx - Browse and checkout
amfaye-bites/frontend/src/pages/Checkout.jsx - Orders and messages
amfaye-bites/frontend/src/pages/MyOrders.jsx - HTTP client
amfaye-bites/frontend/src/services/api.js
API and domain
- Express API
amfaye-bites/backend/app.js - Authentication routes
amfaye-bites/backend/routes/authRoutes.js - Product routes
amfaye-bites/backend/routes/productRoutes.js - Order routes
amfaye-bites/backend/routes/orderRoutes.js - Payment routes
amfaye-bites/backend/routes/paymentRoutes.js - Review moderation
amfaye-bites/backend/routes/reviewRoutes.js - Order chat and images
amfaye-bites/backend/routes/chatRoutes.js - Catalog and stock status
amfaye-bites/backend/controllers/productController.js - Order and stock workflow
amfaye-bites/backend/services/orderService.js - Demo and cash payments
amfaye-bites/backend/controllers/paymentController.js - Conversation service
amfaye-bites/backend/services/chatService.js - Chat image storage
amfaye-bites/backend/services/chatImageService.js - Order notifications
amfaye-bites/backend/services/notificationService.js
Persistent data
- MongoDB
amfaye-bites/backend/config/database.js - Commerce records
amfaye-bites/backend/models/index.js - Chat records
amfaye-bites/backend/models/ChatConversation.js - Image files
amfaye-bites/backend/services/chatImageService.js
Staff operations
- Staff workspace
amfaye-bites/frontend/src/pages/admin/Dashboard.jsx - Inventory routes
amfaye-bites/backend/routes/inventoryRoutes.js - Preparation queue
amfaye-bites/backend/routes/preparationRoutes.js - Reports service
amfaye-bites/backend/services/reportService.js
Other components
- Customer
- Admin or cashier
Connections 31
- Customer → Routed storefront: uses storefront
- Admin or cashier → Routed storefront: uses workspace
- Routed storefront → Browse and checkout: routes to
- Routed storefront → Orders and messages: routes to
- Routed storefront → Staff workspace: routes to
- Routed storefront → Auth and cart state: provides state
- Browse and checkout → HTTP client: requests data
- Orders and messages → HTTP client: requests data
- Staff workspace → HTTP client: requests data
- HTTP client → Express API: sends API requests
- Express API → Authentication routes: mounts
- Express API → Product routes: mounts
- Express API → Order routes: mounts
- Express API → Payment routes: mounts
- Express API → Inventory routes: mounts
- Express API → Preparation queue: mounts
- Express API → Review moderation: mounts
- Express API → Order chat and images: mounts
- Catalog and stock status → Commerce records: reads and writes
- Order and stock workflow → Commerce records: reads and writes
- Demo and cash payments → Order and stock workflow: records payment
- Demo and cash payments → Commerce records: reads and writes
- Order and stock workflow → Order notifications: notifies status
- Order chat and images → Conversation service: dispatches actions
- Order chat and images → Chat records: reads and writes
- Order chat and images → Chat image storage: stores images
- Chat image storage → Image files: stores files
- Conversation service → Chat records: reads and writes
- Commerce records → MongoDB: persists records
- Chat records → MongoDB: persists records
- Reports service → Commerce records: reads records