How mulgold/group-7---gipskitchen-repo. works
This is a restaurant ordering and operations application: customers browse a menu, manage a cart, and place or track orders, while staff and administrators use point-of-sale, inventory, menu, account, and reporting features. The React app routes these experiences and provides shared authentication and cart state; API services communicate with an Express/MongoDB backend. The sampled excerpts show routing, selected API behavior, and order-side email calls; several page and route implementations were not sampled, so their internal links are omitted.
Main entry points: App.tsx Route application · productService.ts Product API service · orderRoutes.ts Order operations · orderService.ts Order API service
Components 20
Web application
- Route application
src/App.tsx - Authentication state
src/context/AuthContext.tsx
Customer ordering
- Cart state
src/context/CartContext.tsx - Menu browsing
src/pages/Catalog.tsx - Checkout
src/pages/Checkout.tsx - Customer order history
src/pages/CustomerOrderHistory.tsx - Customer dashboard
src/components/CustomerDashboard.tsx
Staff operations
- Point of sale
src/pages/POS.tsx - Menu management
src/pages/ManageMenu.tsx - Inventory management
src/pages/ManageInventory.tsx - Sales reporting
src/pages/SalesReport.tsx - Account management
src/pages/AccountManagement.tsx
Backend services
- Product API service
src/api/productService.ts - Inventory API service
src/api/inventoryService.ts - Order API service
src/api/orderService.ts - HTTP server
server.ts - Order operations
server/routes/orderRoutes.ts
Persistence and messaging
- Order email
server/email.ts - MongoDB and fallback state
server/db.ts
Other components
- Customer or staff
Connections 25
- Customer or staff → Route application: uses
- Route application → Authentication state: provides state
src/App.tsx - Route application → Menu browsing: routes to
src/App.tsx - Route application → Checkout: routes to
src/App.tsx - Route application → Point of sale: routes to
src/App.tsx - Route application → Menu management: routes to
src/App.tsx - Route application → Inventory management: routes to
src/App.tsx - Route application → Account management: routes to
src/App.tsx - Route application → Customer order history: routes to
src/App.tsx - Cart state → Authentication state: reads user
src/context/CartContext.tsx - Customer dashboard → Order API service: uses
src/components/CustomerDashboard.tsx - Customer dashboard → Product API service: uses
src/components/CustomerDashboard.tsx - Point of sale → Product API service: fetches products
src/pages/POS.tsx - Point of sale → Order API service: submits orders
src/pages/POS.tsx - Menu management → Product API service: manages products
src/pages/ManageMenu.tsx - Menu management → Inventory API service: reads inventory
src/pages/ManageMenu.tsx - Inventory management → Inventory API service: manages stock
src/pages/ManageInventory.tsx - Sales reporting → Order API service: loads sales
src/pages/SalesReport.tsx - Sales reporting → Product API service: loads products
src/pages/SalesReport.tsx - Sales reporting → Inventory API service: loads inventory
src/pages/SalesReport.tsx - Product API service → Inventory API service: fetches inventory
src/api/productService.ts - Order API service → Order operations: HTTP requests
- HTTP server → Order operations: registers routes
server.ts - Order operations → MongoDB and fallback state: checks connection
server/routes/orderRoutes.ts - Order operations → Order email: sends status email
server/routes/orderRoutes.ts