How anthonyjoshuamalabanan-code/coffeeshots-public works
Coffe Shot is a two-branch coffee-shop website with menu browsing, pickup and delivery checkout, staff order management, and PayMongo payments. Customers browse the menu, submit an order, and—if paying online—continue to PayMongo; staff sign in to manage order status and payment. The README documents the backend function roles and payment flow. Some frontend and function internals were not excerpted, so those documented connections are represented without claiming additional implementation details.
Main entry points: MenuPage.jsx Menu browsing · App.jsx Page routing · AdminPage.jsx Staff order board · supabase.js Supabase backend
Components 21
Website
- Page routing
src/App.jsx - Home content
src/pages/HomePage.jsx - Policy pages
src/components/PolicyLayout.jsx - Branch details
src/data/branches.js
Ordering
- Menu browsing
src/pages/MenuPage.jsx - Menu loading
src/lib/useMenu.js - Sample menu
src/data/menu.js - Cart and checkout
src/components/OrderPanel.jsx - Order and payment calls
src/lib/orders.js - Receipt display
src/components/ReceiptSlip.jsx
Staff operations
- Staff order board
src/pages/AdminPage.jsx - Counter orders
src/components/CounterOrder.jsx - Order export
src/components/OrderExport.jsx
Backend and payments
- Staff account function
supabase/functions/staff-account/index.ts - Order placement function
supabase/functions/place-order/index.ts - PayMongo checkout function
supabase/functions/paymongo-checkout/index.ts - Payment webhook
supabase/functions/paymongo-webhook/index.ts - Supabase backend
src/lib/supabase.js
Other components
- Customer
- Staff member
- PayMongo
Connections 25
- Customer → Page routing: opens site
- Page routing → Menu browsing: routes to
src/App.jsx - Page routing → Home content: routes to
src/App.jsx - Page routing → Policy pages: routes to
src/App.jsx - Policy pages → Branch details: shows contacts
src/components/PolicyLayout.jsx - Menu browsing → Menu loading: loads menu
src/pages/MenuPage.jsx - Menu loading → Supabase backend: reads menu
src/lib/useMenu.js - Menu loading → Sample menu: uses fallback
src/lib/useMenu.js - Menu browsing → Cart and checkout: renders checkout
src/pages/MenuPage.jsx - Cart and checkout → Menu browsing: submits details
src/components/OrderPanel.jsx - Menu browsing → Order and payment calls: submits order
src/pages/MenuPage.jsx - Order and payment calls → Order placement function: places order
- Order placement function → Supabase backend: saves order
- Menu browsing → PayMongo checkout function: starts payment
- PayMongo checkout function → PayMongo: creates checkout
- PayMongo → Payment webhook: sends paid event
- Payment webhook → PayMongo: confirms payment
- Payment webhook → Supabase backend: marks paid
- Menu browsing → Receipt display: shows receipt
src/pages/MenuPage.jsx - Staff member → Page routing: opens admin
- Page routing → Staff order board: routes to
src/App.jsx - Staff order board → Staff account function: invokes login
src/pages/AdminPage.jsx - Staff order board → Counter orders: renders counter orders
src/pages/AdminPage.jsx - Staff order board → Order export: renders export
src/pages/AdminPage.jsx - Staff order board → Supabase backend: manages orders
src/pages/AdminPage.jsx