How eric-moschen/clandestino-cardapio works
O Clandestino is a restaurant digital menu and service platform: guests browse products or request table service, while staff claim and complete calls; administrators manage catalog, tables, staff, and call history. The map preserves the documented media uploads, push notifications, and admin capabilities. Edges use README statements or indexed excerpts; unsampled admin pages and SQL-backed behavior are represented only where documentation supports them.
Main entry points: server.ts Server Supabase client · route.ts Call registration and push · staff-call-board.tsx Staff call board · catalog.ts Catalog actions
Components 34
Guest experience
- Home and table selection
app/page.tsx - Table request page
app/mesa/page.tsx - Public menu route
app/cardapio/page.tsx - Menu and product details
components/menu.tsx
Table service
- Guest call controls
components/calls/landing-actions.tsx - Table call button
components/calls/call-waiter-button.tsx - Call registration and push
app/api/calls/route.ts - Staff login
app/garcom/login/page.tsx - Staff authentication
lib/actions/staff-auth.ts - Staff call board
components/calls/staff-call-board.tsx - Claim call endpoint
app/api/calls/[id]/claim/route.ts - Complete call endpoint
app/api/calls/[id]/complete/route.ts - Push subscription controls
components/calls/enable-push.tsx - Subscribe endpoint
app/api/push/subscribe/route.ts - Unsubscribe endpoint
app/api/push/unsubscribe/route.ts - Push service worker
public/sw.js
Administration
- Admin login
app/admin/login/page.tsx - Admin dashboard
app/admin/(protected)/page.tsx - Catalog management
app/admin/(protected)/products/page.tsx - Category management
app/admin/(protected)/categories/page.tsx - Product editor
components/admin/product-form.tsx - Image upload
components/admin/image-upload.tsx - Video upload
components/admin/video-upload.tsx - Table management
app/admin/(protected)/tables/page.tsx - Staff management
app/admin/(protected)/staff/page.tsx - Call history
app/admin/(protected)/calls/page.tsx
Backend services
- Admin authorization
lib/supabase/admin.ts - Catalog actions
lib/actions/catalog.ts - Operations actions
lib/actions/operations.ts - Supabase database and storage
- Server Supabase client
lib/supabase/server.ts - Service-role client
lib/supabase/service.ts
Other components
- Guest
- Administrator
Connections 39
- Guest → Home and table selection: opens
app/page.tsx - Home and table selection → Guest call controls: renders
app/page.tsx - Guest → Public menu route: opens
README.md - Public menu route → Menu and product details: renders
app/cardapio/page.tsx - Guest → Table request page: opens
README.md - Table request page → Table call button: renders
app/mesa/page.tsx - Guest call controls → Table call button: renders
- Table call button → Call registration and push: submits request
- Call registration and push → Supabase database and storage: records call
app/api/calls/route.ts - Call registration and push → Service-role client: loads push recipients
app/api/calls/route.ts - Call registration and push → Staff call board: notifies staff
README.md - Staff login → Staff authentication: uses sign-in
app/garcom/login/page.tsx - Staff authentication → Server Supabase client: authenticates
lib/actions/staff-auth.ts - Staff call board → Claim call endpoint: claims calls
- Staff call board → Complete call endpoint: completes calls
- Staff call board → Push subscription controls: pairs with
app/garcom/page.tsx - Push subscription controls → Subscribe endpoint: submits subscription
- Push subscription controls → Unsubscribe endpoint: removes subscription
- Subscribe endpoint → Supabase database and storage: saves subscription
app/api/push/subscribe/route.ts - Unsubscribe endpoint → Supabase database and storage: deactivates subscription
app/api/push/unsubscribe/route.ts - Push service worker → Guest: displays push
- Administrator → Admin login: signs in
README.md - Admin login → Server Supabase client: authenticates
app/admin/login/page.tsx - Admin authorization → Server Supabase client: checks membership
lib/supabase/admin.ts - Admin dashboard → Admin authorization: requires access
README.md - Catalog management → Catalog actions: invokes changes
app/admin/(protected)/products/page.tsx - Category management → Catalog actions: invokes changes
app/admin/(protected)/categories/page.tsx - Product editor → Catalog actions: submits product
components/admin/product-form.tsx - Product editor → Image upload: renders
components/admin/product-form.tsx - Product editor → Video upload: renders
components/admin/product-form.tsx - Catalog actions → Supabase database and storage: writes catalog
README.md - Image upload → Supabase database and storage: uploads image
README.md - Video upload → Supabase database and storage: uploads video
README.md - Table management → Operations actions: manages tables
app/admin/(protected)/tables/page.tsx - Staff management → Operations actions: manages staff
app/admin/(protected)/staff/page.tsx - Call history → Operations actions: manages calls
app/admin/(protected)/calls/page.tsx - Operations actions → Supabase database and storage: updates operations
README.md - Public menu route → Server Supabase client: loads menu data
app/cardapio/page.tsx - Home and table selection → Server Supabase client: loads active tables
app/page.tsx