How lacoustre/food_delivery_app works
This repository contains a restaurant ordering and operations product: a Next.js customer storefront, an admin panel, and shared Supabase-backed order workflows. Customers browse meals, build a cart, check out, pay, and receive order updates; staff manage orders and dispatch delivery. Payment webhooks can recover order creation if the browser-side flow fails. Reviews, promotions, restaurant settings, and reporting are additional capabilities indicated by the tree. Source excerpts confirm several server-side integrations and persistence actions; links for unsampled UI and edge-function wiring are omitted where call ownership cannot be established.
Main entry points: create-payment-intent/route.ts Payment intent · create-order/route.ts Create order · supabase.ts Supabase · stripe/route.ts Payment webhook
Components 25
Customer storefront
- Storefront pages
cuisine-webapp/src/app - Dish details
cuisine-webapp/src/app/meal/page.tsx - Cart
cuisine-webapp/src/app/cart/page.tsx - Checkout
cuisine-webapp/src/app/checkout/page.tsx - Reviews
cuisine-webapp/src/lib/reviewsService.ts
Ordering and fulfillment
- Payment intent
cuisine-webapp/src/app/api/create-payment-intent/route.ts - Create order
cuisine-webapp/src/app/api/create-order/route.ts - Payment webhook
cuisine-webapp/src/app/api/webhooks/stripe/route.ts - Delivery quote
cuisine-webapp/src/app/api/quote-delivery/route.ts - Courier dispatch
cuisine-webapp/src/app/api/dispatch-delivery/route.ts
Restaurant operations
- Admin panel
admin-panel/src/App.tsx - Order management
admin-panel/src/pages/Orders.tsx - Analytics
admin-panel/src/pages/Analytics.tsx - Meal management
admin-panel/src/pages/Meals.tsx - Refund processing
cuisine-webapp/src/app/api/refund/route.ts - Status notification
cuisine-webapp/src/app/api/notify-order-status/route.ts
Data and integrations
- Supabase
cuisine-webapp/src/lib/supabase.ts - Pricing rules
cuisine-webapp/src/lib/pricing.ts - Cart pricing
cuisine-webapp/src/lib/cartPricing.ts - Stripe
- Clover POS
cuisine-webapp/src/lib/clover.ts - Uber Direct
cuisine-webapp/src/lib/uberDirect.ts - Email service
cuisine-webapp/src/lib/emailService.ts
Other components
- Customer
- Restaurant staff
Connections 32
- Customer → Storefront pages: browses
- Customer → Dish details: views
- Customer → Cart: builds
- Customer → Checkout: checks out
- Checkout → Payment intent: requests payment
- Payment intent → Cart pricing: prices items
- Payment intent → Pricing rules: calculates total
- Payment intent → Uber Direct: quotes delivery
- Payment intent → Stripe: creates intent
- Payment intent → Supabase: stores pending order
- Checkout → Create order: submits order
- Create order → Cart pricing: validates prices
- Create order → Pricing rules: calculates total
- Create order → Uber Direct: quotes delivery
- Create order → Supabase: writes order
- Create order → Clover POS: pushes ticket
- Stripe → Payment webhook: sends event
- Payment webhook → Supabase: reads and writes orders
- Payment webhook → Clover POS: pushes ticket
- Payment webhook → Email service: sends alert
- Delivery quote → Uber Direct: requests quote
- Restaurant staff → Admin panel: manages restaurant
- Order management → Refund processing: requests refund
- Refund processing → Stripe: issues refund
- Refund processing → Supabase: reads and updates order
- Order management → Courier dispatch: requests dispatch
- Courier dispatch → Uber Direct: creates delivery
- Courier dispatch → Supabase: reads and updates order
- Order management → Status notification: requests update email
- Status notification → Supabase: reads order
- Status notification → Email service: sends update
- Reviews → Supabase: reads and writes reviews