How babireddy009/restaurant-app-frontend works
This is a restaurant ordering frontend with customer, staff, and driver experiences. Customers browse the menu, add food to a persistent cart, check out and pay, then track orders and contact delivery; staff manage orders and analytics, while drivers handle delivery workflows. The sampled code establishes routing, shared auth/cart state, API access, and several page-to-feature calls. Other page and integration details are represented only where the source index or excerpts support them; the README is still the generic Vite template.
Main entry points: App.jsx Routes and layouts · endpoints.js API operations · AuthContext.jsx Authentication state · CheckoutPage.jsx Checkout and payment
Components 30
Application shell
- Routes and layouts
src/App.jsx - Driver layout
src/components/DriverLayout.jsx
Customer ordering
- Home
src/pages/HomePage.jsx - Menu
src/pages/MenuPage.jsx - Gallery
src/pages/GalleryPage.jsx - Food card
src/components/FoodCard.jsx - Cart drawer
src/components/CartDrawer.jsx - Checkout and payment
src/pages/CheckoutPage.jsx - Order confirmation
src/components/SuccessOverlay.jsx - Order history
src/pages/OrdersPage.jsx - Order tracking
src/pages/OrderDetailPage.jsx
Order operations
- Delivery chat
src/components/DeliveryChat.jsx - Staff order desk
src/pages/StaffDashboard.jsx - Staff analytics
src/pages/AnalyticsPage.jsx - Driver login
src/pages/DriverLogin.jsx - Driver registration
src/pages/DriverRegister.jsx - Driver dashboard
src/pages/DriverDashboard.jsx - Driver order view
src/pages/DriverPortal.jsx
Shared platform
- Cart state
src/context/CartContext.jsx - Customer login
src/pages/LoginPage.jsx - Customer registration
src/pages/RegisterPage.jsx - Authentication state
src/context/AuthContext.jsx - API operations
src/api/endpoints.js - HTTP client
src/api/client.js - Notification sound
src/utils/audio.js
Other components
- Customer
- Staff
- Driver
- Restaurant API
- Razorpay
Connections 48
- Customer → Routes and layouts: uses
- Staff → Routes and layouts: uses
- Driver → Routes and layouts: uses
- Routes and layouts → Home: routes
src/App.jsx - Routes and layouts → Menu: routes
src/App.jsx - Routes and layouts → Gallery: routes
src/App.jsx - Routes and layouts → Checkout and payment: routes
src/App.jsx - Routes and layouts → Order history: routes
src/App.jsx - Routes and layouts → Order tracking: routes
src/App.jsx - Routes and layouts → Customer login: routes
src/App.jsx - Routes and layouts → Customer registration: routes
src/App.jsx - Routes and layouts → Staff order desk: routes
src/App.jsx - Routes and layouts → Staff analytics: routes
src/App.jsx - Routes and layouts → Driver layout: routes
src/App.jsx - Routes and layouts → Driver login: routes
src/App.jsx - Routes and layouts → Driver registration: routes
src/App.jsx - Routes and layouts → Driver dashboard: routes
src/App.jsx - Routes and layouts → Driver order view: routes
src/App.jsx - Routes and layouts → Authentication state: provides
src/App.jsx - Routes and layouts → Cart state: provides
src/App.jsx - Home → API operations: loads menu
src/pages/HomePage.jsx - Home → Food card: renders
src/pages/HomePage.jsx - Menu → API operations: loads menu
src/pages/MenuPage.jsx - Menu → Food card: renders
src/pages/MenuPage.jsx - Gallery → API operations: loads images
src/pages/GalleryPage.jsx - Food card → Cart state: adds items
src/components/FoodCard.jsx - Cart drawer → Cart state: reads and updates
src/components/CartDrawer.jsx - Checkout and payment → Cart state: reads and clears
src/pages/CheckoutPage.jsx - Checkout and payment → Authentication state: reads user
src/pages/CheckoutPage.jsx - Checkout and payment → API operations: creates and verifies
src/pages/CheckoutPage.jsx - Checkout and payment → Order confirmation: shows
src/pages/CheckoutPage.jsx - Checkout and payment → Razorpay: initiates payment
- Order history → API operations: loads orders
src/pages/OrdersPage.jsx - Order history → Cart state: uses
src/pages/OrdersPage.jsx - Order tracking → API operations: loads and updates
src/pages/OrderDetailPage.jsx - Order tracking → Delivery chat: opens
src/pages/OrderDetailPage.jsx - Delivery chat → Notification sound: plays
src/components/DeliveryChat.jsx - Customer login → Authentication state: authenticates
src/pages/LoginPage.jsx - Customer registration → API operations: registers
src/pages/RegisterPage.jsx - Customer registration → Authentication state: uses
src/pages/RegisterPage.jsx - Authentication state → API operations: loads profile
src/context/AuthContext.jsx - Authentication state → HTTP client: auth requests
src/context/AuthContext.jsx - Staff order desk → API operations: loads and updates
src/pages/StaffDashboard.jsx - Staff order desk → Delivery chat: opens
src/pages/StaffDashboard.jsx - Staff order desk → Notification sound: plays
src/pages/StaffDashboard.jsx - Staff analytics → API operations: loads analytics
src/pages/AnalyticsPage.jsx - Driver login → Authentication state: authenticates
src/pages/DriverLogin.jsx - Driver registration → API operations: registers driver
src/pages/DriverRegister.jsx