How youssef-atef-20/abonagy-menu works
Abo Nagy Menu is a read-only, Arabic RTL customer menu, typically opened after scanning the restaurant QR code. Its workflow loads active restaurant, category, product, and available-variant data from Supabase, assembles a sorted hierarchy, then presents category navigation and priced product variants. The page also provides theme switching and loading, error/retry, and empty states. The README documents responsive layouts and animations; sampled page code confirms AOS use. Components and calls below are supported by the excerpts or README; the external QR entry is documented as the customer access pattern.
Main entry points: MenuPage.tsx Menu page · supabase.ts Supabase client · useMenu.ts Menu loader · App.tsx App entry
Components 16
Menu data
- Supabase client
src/lib/supabase.ts - Menu loader
src/hooks/useMenu.ts
Menu experience
- App entry
src/App.tsx - Menu page
src/pages/MenuPage.tsx - Theme preference
src/hooks/useTheme.ts
Menu presentation
- Menu header
src/components/menu/MenuHeader.tsx - Category navigation
src/components/menu/CategoryNav.tsx - Category section
src/components/menu/CategorySection.tsx - Product card
src/components/menu/ProductCard.tsx - Variant prices
src/components/menu/VariantList.tsx - Price display
src/components/ui/Price.tsx
Page states
- Loading state
src/components/ui/LoadingState.tsx - Error state
src/components/ui/ErrorState.tsx - Empty state
src/components/ui/EmptyState.tsx
Other components
- Customer
- Supabase
Connections 15
- Customer → App entry: opens menu
README.md - App entry → Menu page: renders
src/App.tsx - Menu page → Menu loader: loads data
src/pages/MenuPage.tsx - Menu loader → Supabase client: queries through
src/hooks/useMenu.ts - Supabase client → Supabase: reads menu
- Menu page → Theme preference: uses theme
src/pages/MenuPage.tsx - Menu page → Menu header: renders
src/pages/MenuPage.tsx - Menu page → Category navigation: renders
src/pages/MenuPage.tsx - Menu page → Category section: renders
src/pages/MenuPage.tsx - Category section → Product card: renders
src/components/menu/CategorySection.tsx - Product card → Variant prices: renders
src/components/menu/ProductCard.tsx - Variant prices → Price display: renders
src/components/menu/VariantList.tsx - Menu page → Loading state: shows while loading
src/pages/MenuPage.tsx - Menu page → Error state: shows on failure
src/pages/MenuPage.tsx - Menu page → Empty state: shows when empty
src/pages/MenuPage.tsx