How nereu-vitor/localeats works
LocalEats is a restaurant digital-menu and lightweight merchant-management web app. Customers browse a live product menu, filter by search and categories, build a Redux cart, choose delivery, pickup, or dine-in, and submit checkout; the server formats the order for WhatsApp and optionally emails it through Resend. Merchants enter the PIN-gated admin panel to review products, change availability, and add or delete products. The graph reflects sampled source and README capabilities; some menu and admin UI wiring is documented but its implementation was not sampled.
Main entry points: supabase.ts Supabase client · page.tsx Public menu page · menu-view.tsx Menu browsing · cart-sheet.tsx Cart interface
Components 19
Customer menu
- Public menu page
src/app/page.tsx - Menu browsing
src/components/menu/menu-view.tsx - Category tabs
src/components/menu/category-tabs.tsx - Product cards
src/components/menu/product-card.tsx - Search header
src/components/menu/menu-header.tsx
Cart and checkout
- Cart interface
src/components/menu/cart-sheet.tsx - Checkout details
src/components/menu/checkout-modal.tsx - Order formatting
src/app/api/checkout/route.ts - Cart state
src/store/cartSlice.ts - Redux store
src/store/store.ts - Redux provider
src/providers/redux-provider.tsx
Merchant management
- PIN admin panel
src/app/admin/page.tsx - Product creation
src/components/admin/add-product-modal.tsx
Data and services
- Supabase client
src/lib/supabase.ts - Products table
- Restaurant WhatsApp
- Resend email
Other components
- Customer
- Merchant
Connections 22
- Customer → Public menu page: opens menu
- Public menu page → Supabase client: queries products
- Supabase client → Products table: reads products
- Public menu page → Menu browsing: passes products
- Menu browsing → Search header: provides search
- Menu browsing → Category tabs: shows categories
- Menu browsing → Product cards: renders products
- Product cards → Cart state: adds product
- Public menu page → Redux provider: renders within
- Redux provider → Redux store: provides store
- Redux store → Cart state: registers reducer
- Customer → Cart interface: opens cart
- Cart interface → Cart state: updates and reads
- Cart interface → Checkout details: opens checkout
- Checkout details → Order formatting: posts order
- Order formatting → Restaurant WhatsApp: returns order link
- Order formatting → Resend email: sends email
- Merchant → PIN admin panel: enters PIN
- PIN admin panel → Supabase client: loads and deletes products
- PIN admin panel → Product creation: opens form
- Product creation → Supabase client: inserts product
- Supabase client → Products table: reads and writes