How nikeshjainj007-dev/ofds works
CampusCanteen is a campus food-ordering web app with customer ordering and an operational dashboard. The main journey is browsing campus dishes, adding items and delivery details, paying, then viewing order history or tracking; staff manage orders, menu, riders and related operations. The app also includes authentication, feedback and complaints. Several connections are supported by the source index rather than full excerpts; where unsampled modules leave behavior unclear, the graph omits speculative links.
Main entry points: App.tsx App shell · CartContext.tsx Cart and orders · DashboardModal.tsx Dashboard sections · AuthContext.tsx Authentication state
Components 24
Application
- App shell
src/App.tsx
Customer Ordering
- Catalog data
src/data/mockData.ts - Browse menu
src/components/RestaurantList.tsx - Category filters
src/components/CategoryFilter.tsx - Dish selection
src/components/DishCard.tsx - Cart and checkout
src/components/CartDrawer.tsx - Order history
src/components/OrderHistoryModal.tsx - Order tracking
src/components/OrderTrackingModal.tsx - Sign-in and profile
src/components/AuthModal.tsx
Canteen Operations
- Dashboard state
src/context/DashboardContext.tsx - Operations seed data
src/data/dashboardMockData.ts - Dashboard sections
src/components/dashboard/DashboardModal.tsx - Complaints
src/components/dashboard/ComplaintsTab.tsx - Feedback
src/components/FeedbackModal.tsx
State And Services
- Cart and orders
src/context/CartContext.tsx - Razorpay payment
src/lib/razorpay.ts - Authentication state
src/context/AuthContext.tsx - Supabase client
src/lib/supabaseClient.ts - OTP endpoints
api/send-otp.js - Browser storage
src/lib/storage.ts - Campus ordering schedule
src/lib/campusSchedule.ts - Toast notifications
src/context/ToastContext.tsx
Other components
- Campus customer
- Razorpay
Connections 30
- Campus customer → App shell: uses
- App shell → Browse menu: renders
src/App.tsx - App shell → Category filters: renders
src/App.tsx - App shell → Dish selection: renders
src/App.tsx - App shell → Cart and checkout: renders
src/App.tsx - App shell → Sign-in and profile: renders
src/App.tsx - App shell → Order tracking: renders
src/App.tsx - App shell → Order history: renders
src/App.tsx - App shell → Dashboard sections: renders
src/App.tsx - Browse menu → Catalog data: reads
src/components/RestaurantList.tsx - Category filters → Catalog data: reads
src/components/CategoryFilter.tsx - Dish selection → Cart and orders: adds items
src/components/DishCard.tsx - Dish selection → Campus ordering schedule: checks timing
src/components/DishCard.tsx - Cart and checkout → Cart and orders: reads and updates
src/components/CartDrawer.tsx - Cart and checkout → Razorpay payment: initiates
src/components/CartDrawer.tsx - Razorpay payment → Razorpay: processes payment
- Cart and orders → Browser storage: persists cart
src/context/CartContext.tsx - Cart and orders → Catalog data: loads coupons
src/context/CartContext.tsx - Order history → Cart and orders: reads orders
src/components/OrderHistoryModal.tsx - Order tracking → Cart and orders: reads order state
src/components/OrderTrackingModal.tsx - Sign-in and profile → Authentication state: uses
src/components/AuthModal.tsx - Authentication state → Supabase client: authenticates
src/context/AuthContext.tsx - Authentication state → Browser storage: persists profile
src/context/AuthContext.tsx - Authentication state → OTP endpoints: requests codes
src/context/AuthContext.tsx - Dashboard sections → Dashboard state: uses state
src/components/dashboard/DashboardModal.tsx - Dashboard sections → Complaints: renders
src/components/dashboard/DashboardModal.tsx - Dashboard sections → Feedback: renders
src/components/dashboard/DashboardModal.tsx - Dashboard state → Browser storage: persists operations
src/context/DashboardContext.tsx - Dashboard state → Operations seed data: loads initial data
src/context/DashboardContext.tsx - Operations seed data → Catalog data: seeds dishes
src/data/dashboardMockData.ts