How chiragbansal511/quickcrave works
Project Type and Purpose
• This is a full-stack food-ordering platform (“QuickCrave”) with two React frontends (customer and admin) and a centralized Node.js/Express backend.
• Purpose: enable customers to browse restaurants and place orders, and enable restaurant administrators to manage menus and receive real-time order notifications.
File Structure Analysis
• Top-level:
• backend/ → Node.js entry point (app.js), Express routes, Socket.IO integration
• frontend/hungerbox/ → Customer React app
• frontend/userhungerbox/ → Admin React app
• Each frontend uses React Router, Axios for API calls, and Tailwind/PostCSS for styling.
• Authentication: JWT handled in backend.
• Real-time: Socket.IO server in backend, rooms keyed by restaurant.
• Persistence: MongoDB via Mongoose, dynamic collections per restaurant.
Key README Insights
• Dual-interface architecture with role-based JWT authentication.
• Core flows: customer browsing & ordering, admin menu management & real-time order tracking.
• Data flow model outlined with HTTP and WebSocket (Socket.IO) interactions.
Detail
• Every protected API route and whether it’s customer-only or admin-only.
• Dynamic collection creation for menus by restaurant name.
• Role separation: which frontend can call which backend controller.
• Real-time feedback loop: customer places order → backend emits to Socket.IO room → admin client receives event.