How aj110arjun/dinebook works
DineBook is a React frontend for restaurant discovery and customer account access, with a separate admin portal also present in the source tree. The main customer journey routes visitors through session-aware sign-in or registration to a curated discovery home; discovery content is sample data, and reservations are presentation-only. Customer credentials and session checks use a separately hosted API. The graph reflects documented routes and indexed imports; unsampled modules are represented only where the tree or README supports their role.
Main entry points: App.jsx Route table · CustomerLandingPage.jsx Discovery home · authApi.js Credentialed API client · CustomerRegisterPage.jsx Account registration
Components 31
Routing and access
- Route table
src/App.jsx - Guest guard
src/components/auth/GuestOnlyRoute.jsx - Customer guard
src/components/auth/ProtectedRoute.jsx - Admin guard
src/components/auth/AdminProtectedRoute.jsx
Customer account
- Customer sign-in
src/pages/customer/CustomerLoginPage.jsx - Account registration
src/pages/customer/CustomerRegisterPage.jsx - Recovery placeholder
src/pages/customer/CustomerRecoveryPage.jsx - Password change
src/pages/customer/CustomerChangePasswordPage.jsx - Email verification
src/pages/customer/CustomerEmailVerificationPage.jsx - Auth form fields
src/components/auth/FormField.jsx - Customer auth layout
src/components/auth/AuthLayout.jsx - Form feedback
src/components/auth/Notice.jsx - Credentialed API client
src/lib/authApi.js - Demo identity
src/data/demoCustomer.js
Restaurant discovery
- Discovery home
src/pages/customer/CustomerLandingPage.jsx - Customer navigation
src/components/landing/CustomerHeader.jsx - Cuisine filters
src/components/landing/CuisineGrid.jsx - Restaurant sections
src/components/landing/RestaurantSection.jsx - Signature dishes
src/components/landing/DishSection.jsx - Curated content
src/data/landingData.js - Discovery hero
src/components/landing/HeroBanner.jsx - Offers banner
src/components/landing/PromoBanner.jsx - How it works
src/components/landing/HowItWorks.jsx - Guest testimonials
src/components/landing/Testimonials.jsx - Landing footer
src/components/landing/LandingFooter.jsx
Administration
- Admin sign-in
src/pages/admin/AdminLoginPage.jsx - Admin dashboard
src/pages/admin/AdminDashboardPage.jsx - Admin restaurants
src/pages/admin/AdminRestaurantsPage.jsx - Admin layout
src/components/admin/AdminLayout.jsx
Other components
- Visitor
- DineBook API
Connections 48
- Visitor → Route table: opens routes
src/App.jsx - Route table → Guest guard: guards guests
src/App.jsx - Route table → Customer guard: routes through
src/App.jsx - Route table → Admin guard: routes through
src/App.jsx - Route table → Customer sign-in: routes to
src/App.jsx - Route table → Account registration: routes to
src/App.jsx - Route table → Recovery placeholder: routes to
src/App.jsx - Route table → Password change: routes to
src/App.jsx - Route table → Email verification: routes to
src/App.jsx - Route table → Discovery home: routes to
src/App.jsx - Route table → Admin sign-in: routes to
src/App.jsx - Route table → Admin dashboard: routes to
src/App.jsx - Route table → Admin restaurants: routes to
src/App.jsx - Guest guard → Credentialed API client: checks session
src/components/auth/GuestOnlyRoute.jsx - Guest guard → Demo identity: checks demo
src/components/auth/GuestOnlyRoute.jsx - Customer guard → Credentialed API client: checks session
src/components/auth/ProtectedRoute.jsx - Customer guard → Demo identity: checks demo
src/components/auth/ProtectedRoute.jsx - Customer sign-in → Credentialed API client: submits credentials
src/pages/customer/CustomerLoginPage.jsx - Account registration → Credentialed API client: creates account
src/pages/customer/CustomerRegisterPage.jsx - Account registration → Email verification: navigates after
src/pages/customer/CustomerRegisterPage.jsx - Customer sign-in → Customer auth layout: renders within
src/pages/customer/CustomerLoginPage.jsx - Account registration → Customer auth layout: renders within
src/pages/customer/CustomerRegisterPage.jsx - Customer sign-in → Auth form fields: renders fields
src/pages/customer/CustomerLoginPage.jsx - Account registration → Auth form fields: renders fields
src/pages/customer/CustomerRegisterPage.jsx - Customer sign-in → Form feedback: renders feedback
src/pages/customer/CustomerLoginPage.jsx - Account registration → Form feedback: renders feedback
src/pages/customer/CustomerRegisterPage.jsx - Password change → Credentialed API client: checks and changes
README.md - Email verification → Credentialed API client: uses API client
src/pages/customer/CustomerEmailVerificationPage.jsx - Credentialed API client → DineBook API: sends requests
README.md - Discovery home → Credentialed API client: checks session
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Demo identity: uses preview identity
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Customer navigation: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Cuisine filters: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Restaurant sections: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Signature dishes: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Discovery hero: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Offers banner: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → How it works: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Guest testimonials: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Landing footer: renders
src/pages/customer/CustomerLandingPage.jsx - Discovery home → Curated content: filters content
src/pages/customer/CustomerLandingPage.jsx - Customer navigation → Credentialed API client: logs out through
src/components/landing/CustomerHeader.jsx - Customer navigation → Demo identity: checks demo session
src/components/landing/CustomerHeader.jsx - Cuisine filters → Curated content: reads cuisines
src/components/landing/CuisineGrid.jsx - Restaurant sections → Curated content: reads restaurant data
- Signature dishes → Curated content: reads dishes
src/components/landing/DishSection.jsx - Admin sign-in → Credentialed API client: submits credentials
src/pages/admin/AdminLoginPage.jsx - Admin sign-in → Auth form fields: renders fields
src/pages/admin/AdminLoginPage.jsx