How lekhactung/restaurant-management works
This is a multilingual restaurant website with public information and service-request flows, plus branch-scoped administration. Customers browse menus and promotions, submit bookings or feedback, and can ask independent questions through a source-grounded RAG chat. Administrators authenticate to manage bookings, feedback, reports, booking hours, and promotions. The graph preserves these distinct workflows and the documented Supabase and Gemini integrations. Some route and action implementations were not sampled, so their links rely on README statements; unsampled internal call paths are not inferred.
Main entry points: rag.ts RAG retrieval · menu/page.tsx Menu page · BookingForm.tsx Booking form · admin/page.tsx Booking dashboard
Components 34
Public experience
- Public pages
app/(public)/page.tsx - Menu page
app/(public)/menu/page.tsx - Menu data
data/menu.ts - Menu viewer
components/menu/MenuViewer.tsx - Promotions page
app/(public)/promotions/page.tsx - Promotion board
components/promotions/PromotionBoard.tsx
Customer services
- Booking form
components/booking/BookingForm.tsx - Booking action
app/(public)/booking/actions.ts - Booking rules
lib/booking.ts - Feedback form
components/feedback/FeedbackForm.tsx - Feedback action
app/(public)/feedback/actions.ts - Promotion logic
lib/promotions.ts
Branch administration
- Admin login
components/booking/AdminLogin.tsx - Access control
lib/admin-action-access.ts - Booking actions
app/admin/actions.ts - Booking dashboard
app/admin/page.tsx - Feedback management
app/admin/feedback/page.tsx - Reports
app/admin/reports/page.tsx - Booking settings
app/admin/settings/page.tsx - Promotion management
app/admin/promotions/page.tsx - Promotion editor
components/promotions/PromotionForm.tsx
RAG knowledge
- Customer chat
components/chat/CustomerChat.tsx - Chat action
app/(public)/chat-actions.ts - RAG retrieval
lib/rag.ts - Confirmed knowledge
data/rag-knowledge.ts - RAG menu data
data/rag-menu.ts - Tân Bình menu data
data/rag-menu-tan-binh.ts - Suggested questions
data/rag-questions.ts - Vietnamese search
lib/vietnamese-search.ts - RAG language
lib/rag-language.ts
Other components
- Customer
- Gemini API
- Administrator
- Supabase
Connections 41
- Customer → Public pages: browses
- Customer → Menu page: selects menu
- Menu page → Menu viewer: renders
app/(public)/menu/page.tsx - Menu page → Menu data: loads
app/(public)/menu/page.tsx - Menu viewer → Menu data: displays
components/menu/MenuViewer.tsx - Customer → Booking form: requests booking
- Booking form → Booking action: submits
components/booking/BookingForm.tsx - Booking form → Booking rules: uses rules
components/booking/BookingForm.tsx - Customer → Feedback form: sends feedback
- Feedback form → Feedback action: submits
components/feedback/FeedbackForm.tsx - Customer → Promotions page: views offers
- Promotions page → Promotion board: renders
app/(public)/promotions/page.tsx - Promotion board → Promotion logic: uses
- Customer → Customer chat: asks question
- Customer chat → Chat action: sends question
- Chat action → RAG retrieval: retrieves sources
- RAG retrieval → Confirmed knowledge: searches
lib/rag.ts - RAG retrieval → RAG menu data: searches
lib/rag.ts - RAG retrieval → Tân Bình menu data: searches
lib/rag.ts - RAG retrieval → Suggested questions: uses questions
lib/rag.ts - RAG retrieval → Vietnamese search: normalizes queries
lib/rag.ts - RAG retrieval → RAG language: detects language
lib/rag.ts - Chat action → Gemini API: generates answer
- Administrator → Admin login: signs in
- Admin login → Booking actions: calls sign-in
components/booking/AdminLogin.tsx - Booking actions → Access control: checks access
app/admin/actions.ts - Administrator → Booking dashboard: manages bookings
- Booking dashboard → Access control: checks access
app/admin/page.tsx - Booking dashboard → Supabase: reads dashboard
app/admin/page.tsx - Administrator → Feedback management: manages feedback
- Feedback management → Supabase: reads tickets
app/admin/feedback/page.tsx - Administrator → Reports: views reports
- Reports → Supabase: loads reports
app/admin/reports/page.tsx - Administrator → Booking settings: sets booking hours
- Booking settings → Supabase: loads settings
app/admin/settings/page.tsx - Administrator → Promotion management: manages offers
- Promotion management → Promotion editor: renders editor
app/admin/promotions/page.tsx - Promotion editor → Promotion logic: uses
components/promotions/PromotionForm.tsx - Promotion management → Supabase: uses promotion store
app/admin/promotions/page.tsx - Booking action → Supabase: stores request
- Feedback action → Supabase: stores feedback