How flashfoods2024/flashfoods works
FlashFoods is a college-canteen pre-ordering application with student, vendor, and admin workflows; its package description also identifies OTP pickup verification. The likely core journey is account access, browsing a shop menu, placing an order, and vendor fulfillment, with payment and pickup stages. The sampled code confirms server routing, authentication persistence, Razorpay webhook handling, vendor pending-order counts, and browser push-token registration. The README is only a placeholder, and unsampled route implementations limit confidence about the detailed ordering and menu-import wiring.
Main entry points: server.js Web application · webhooks.js Payment webhooks · index.js Live order counts · auth.js Account access
Components 26
Access and identity
- Account access
routes/auth.js - Identity API
routes/api/authMe.js - Session identity
middleware/auth.js - Users
models/User.js - Profile
routes/profile.js
Canteen ordering
- Shop discovery
routes/shops.js - Menus
routes/menu.js - Cart
routes/cart.js - Order handling
routes/orders.js - Orders
models/Order.js - Menu items
models/MenuItem.js - Shops
models/Shop.js
Vendor operations
- Vendor operations
routes/vendor.js - Administration
routes/admin.js - Menu import
menu-import
Platform services
- Web application
server.js - Payment webhooks
routes/webhooks.js - Live order counts
socket/index.js - Push registration
public/js/firebase-client.js - Push API
routes/api/fcm.js - Order notifications
utils/notification-dispatch.js
Other components
- Student
- Vendor
- Admin
- Razorpay
- Vendor browser
public/js/notification-manager.js
Connections 26
- Student → Web application: uses
- Vendor → Web application: uses
- Admin → Web application: uses
- Web application → Account access: mounts
- Web application → Identity API: mounts
- Web application → Shop discovery: mounts
- Web application → Menus: mounts
- Web application → Cart: mounts
- Web application → Order handling: mounts
- Web application → Vendor operations: mounts
- Web application → Administration: mounts
- Web application → Profile: mounts
- Web application → Payment webhooks: mounts
- Web application → Push API: mounts
- Web application → Session identity: loads identity
- Session identity → Users: reads user
- Account access → Users: reads/writes users
- Razorpay → Payment webhooks: sends events
- Payment webhooks → Orders: reads/writes orders
- Payment webhooks → Shops: reads shop settings
- Payment webhooks → Live order counts: refreshes counts
- Payment webhooks → Order notifications: dispatches notification
- Vendor browser → Live order counts: joins shop
- Live order counts → Orders: counts paid orders
- Live order counts → Vendor browser: sends pending count
- Push registration → Push API: registers token