How tinashenyoni/kwaterry-restaurant works
KwaTerry is a public restaurant-and-lodge storefront with an owner-managed admin dashboard. Visitors browse live-or-seed content, submit bookings, reviews, and contact messages; the owner signs in to manage content and submissions. The graph preserves the documented public showcase, SEO, gallery, and admin capabilities. Connections for unsampled pages and route families rely on README documentation; source-index imports and sampled handler code support the remaining links.
Main entry points: supabase.ts Supabase clients · page.tsx Storefront · Gallery.tsx Gallery and lightbox · admin Admin dashboard
Components 26
Public storefront
- Storefront
src/app/(site)/page.tsx - Story and experiences
src/components/sections - Menu and lodge
src/components/sections - Gallery and lightbox
src/components/sections/Gallery.tsx - Testimonials
src/components/sections - Site navigation and footer
src/components/layout/Footer.tsx - SEO metadata
src/app
Visitor requests
- Reservation form
src/components/sections/ReservationForm.tsx - Contact form
src/components/sections/ContactForm.tsx - Review form
src/components/sections/ReviewForm.tsx - Reservation intake
src/app/api/reservations/route.ts - Contact intake
src/app/api/contact/route.ts - Review intake
src/app/api/reviews/route.ts
Owner dashboard
- Admin dashboard
src/app/admin - Admin sign-in
src/app/api/admin/auth/login/route.ts - Content and workflow APIs
src/app/api/admin - Media upload
src/app/api/admin/upload/route.ts
Data and services
- Session validation
src/lib/auth.ts - Admin API guard
src/lib/api.ts - Live data with fallback
src/lib/use-site-data.ts - Seed content
src/data/seed-data.ts - Supabase clients
src/lib/supabase.ts - Storage cleanup and paths
src/lib/storage.ts - Media URL resolver
src/lib/media.ts
Other components
- Visitor
- Supabase database and storage
Connections 39
- Visitor → Storefront: browses
README.md - Storefront → Story and experiences: presents
README.md - Storefront → Menu and lodge: presents
README.md - Storefront → Gallery and lightbox: presents
README.md - Storefront → Testimonials: presents
README.md - Storefront → Site navigation and footer: uses
README.md - Storefront → SEO metadata: includes
README.md - Menu and lodge → Live data with fallback: reads live content
src/components/sections/Gallery.tsx - Gallery and lightbox → Live data with fallback: loads content
src/components/sections/Gallery.tsx - Gallery and lightbox → Media URL resolver: resolves media
src/components/sections/Gallery.tsx - Gallery and lightbox → Seed content: uses fallback
src/components/sections/Gallery.tsx - Gallery and lightbox → Supabase clients: loads gallery
src/components/sections/Gallery.tsx - Gallery and lightbox → Visitor: opens lightbox
- Visitor → Reservation form: requests booking
README.md - Visitor → Contact form: sends message
README.md - Visitor → Review form: submits review
README.md - Reservation form → Reservation intake: submits booking
- Contact form → Contact intake: submits message
- Review form → Review intake: submits review
- Reservation intake → Supabase clients: inserts pending booking
src/app/api/reservations/route.ts - Contact intake → Supabase clients: inserts message
src/app/api/contact/route.ts - Review intake → Supabase clients: inserts pending review
src/app/api/reviews/route.ts - Supabase clients → Supabase database and storage: reads and writes
src/lib/supabase.ts - Visitor → Admin dashboard: manages site
- Admin dashboard → Admin sign-in: signs in
- Admin dashboard → Content and workflow APIs: manages content
- Admin dashboard → Media upload: uploads media
- Admin sign-in → Session validation: signs session
src/app/api/admin/auth/login/route.ts - Content and workflow APIs → Admin API guard: checks access
src/lib/api.ts - Admin API guard → Session validation: validates session
src/lib/api.ts - Content and workflow APIs → Supabase clients: manages records
src/app/api/admin/gallery/route.ts - Content and workflow APIs → Seed content: serves demo data
src/app/api/admin/gallery/route.ts - Media upload → Admin API guard: checks access
src/app/api/admin/upload/route.ts - Media upload → Storage cleanup and paths: builds object paths
src/app/api/admin/upload/route.ts - Media upload → Supabase clients: uploads files
src/app/api/admin/upload/route.ts - Storage cleanup and paths → Supabase clients: removes stored files
src/lib/storage.ts - Live data with fallback → Supabase clients: loads site data
src/lib/use-site-data.ts - Live data with fallback → Seed content: falls back to
README.md - Media URL resolver → Supabase database and storage: uses optional storage
README.md